A gift utility for all multicore-processor gamers

This topic is locked from further discussion.

Avatar image for zaigham
zaigham

711

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#1 zaigham
Member since 2003 • 711 Posts
Hi there. I made a very useful utility for truly utlizing multicore processors. The more cores your processor has, the more useful this utility would prove to be. You can download it from my homepage here:

http://www.geocities.com/zaigham_chaudhry/Files/Projects/SourceCodes/ZamsUtilizeMultiCores.zip

Introduction:

If you got a multicore processor, you should know that by default all the applications are set to run at all cores of your processor (Although the application may actually utilize only the default core).

"ZAMs Utilize Multi Cores" utility enables you to set specific applications to run at specific cores of your multicore processor.

For example, for a quad core processor you can set the 4th core of the processor to convert a dvd to avi format, 3rd core to decompress a large file, 1st core for windows explorer and other tasks and the 2nd core to play a game. With this setup, no application will affect others and all the applications will run smoothly almost independant of each other.

For setting an application to a specific core each time it is run, you only need to specify the process name as it appears in the windows task manager.(Don't include ".exe" with the process name).

You can set the cores of specific programs at once and then select to load the utility at each windows startup, so that you don't need to specify cores each time.

The utility also features an "Intelli Core Multi Instance Handling" feature. This feature deals with the case if you run the same application more than once at the same time. If you enable this feature, you can set at what cores the different instances of the same application should run.

For example, If you use WinRar to compress-decompress various large files, you can set the default core to 2. Then you can enable "Multi Instance Handling" feature and then you can specify the Multi-Instance-Cores to "3,4". In this case, the first time you run WinRaR, it will run at core "2". If without closing it, you run another instance of WinRar, it will run at core 3. Another instance at the same time, will run at core 4. Now if you run another instance, it will start again from core default specified "2" and so on.
Avatar image for CheeChee_Macko
CheeChee_Macko

2236

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#2 CheeChee_Macko
Member since 2008 • 2236 Posts
Wow, good job. That is pretty cool.
Avatar image for 060390
060390

383

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#3 060390
Member since 2006 • 383 Posts
Mind if i copy this piece of info in a Word document? I think is very usefull, since i want to buy a multi core processor computer. BTW, you did a good job....
Avatar image for 3ltezorr
3ltezorr

67

Forum Posts

0

Wiki Points

0

Followers

Reviews: 1

User Lists: 0

#4 3ltezorr
Member since 2008 • 67 Posts
Very nice. :)
Avatar image for z4twenny
z4twenny

4898

Forum Posts

0

Wiki Points

0

Followers

Reviews: 7

User Lists: 0

#5 z4twenny
Member since 2006 • 4898 Posts
sweet man, simply sweet, me and a friend of mine use multicores for music recording/programming and this would DEFINATELY be useful as he often has 3 or 4 sessions open at once.
Avatar image for zaigham
zaigham

711

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#6 zaigham
Member since 2003 • 711 Posts

Thanks to all for your kind appreciation.

Also if you want to suggest any other additions for this application, please feel free to do so.

Avatar image for zaigham
zaigham

711

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#7 zaigham
Member since 2003 • 711 Posts

Mind if i copy this piece of info in a Word document? I think is very usefull, since i want to buy a multi core processor computer. BTW, you did a good job....
060390

Yeah, you can. No problem. :-)

Avatar image for cjek
cjek

14327

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#8 cjek
Member since 2003 • 14327 Posts
I always disliked the fact that when in Task Manager you changed which core an application used, it didn't remember this in the future, so you had to reopen Task Manager and change the core again if you exited and reopened that particular process. Multi-instance handling is also really useful. Great application, and it's completely free. Great job.
Avatar image for XaosII
XaosII

16705

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#9 XaosII
Member since 2003 • 16705 Posts

Not bad.

But i think theres a few major ways you can improve this if you really, really want to make this a pretty cool utility.

1) Make it a windows service with a default setting of auto load balancing.

As a windows service, it doesnt require to be on the lower right corner like various applications do. Also, its not something that has to be regularly accessed really. You should also attempt to hook it to the windows right click memu on .exe's and on the task manager to set basic options and settings.

2) Use WMI (windows management instrumentation) to properly gauge how often and how CPU intensive certain programs actually are.

With WMI you can make very smart decisions about how and when to delegate processes and task to different cores automatically. Obviously this will be harder to code, but it makes it significantly easier on the user becuase theres no settingup of information and tasks to get immediate use out of it. A dedicated interface to manage this, like the one your program has right now, is great for tweaker - not so great for your average user.

Also, if you do plan to use WMI, make sure to make note if any application is truly using multiple cores to good use and to offload work. Its possible that a user of your program may have unknowingly set a game like Supreme Commander to use only core #2 and then complain about poor performance when the truth is that a game like SC takes advantage of multiple cores quite well. With WMI and auto load balancing you just off load a game like SC to cores 3 and 4, or 2, 3 and 4. Obviously you'll want to allow some way to force the use of just one and only one core.

3) Start with a list of common programs and applications with predefined settings. Browsers, games (maybe just run through a listing of the games in Vista's game explorer), productivity application, etc.

Maybe ask during install (btw, there should probably be an actual, formal install) if the user would like to use predefined settings or would prefer to explicitly manage everything? Of course, youneed to make some tough decisions here when it comes to the predefined portion of stuff. Should an application like Photoshop or 3d modelling programs that WILL make use of 8 cores at 100% easily deserve to be processed on all cores, or on all but one?

4) This one shouldn't be terribly difficult to code provided you used WMI, but you need to be careful: real-time switching of cores and thread priority.

Your program sets the CPU affinity during its launch and remains those settings until its opened again (on a new or another instance). You can code it to switch cores if two more CPU intensive tasks are being ran on the same core. This is, in essence, a true load-balance.

You'll need to be careful, not that it would be hard to figure out when to switch, but that certain programs may not like a sudden switch. For the most part, most programs wouldnt mind or care. But some might. Same goes for changing thread priority. You'll probably never want anything to be set to real-time (the highest priority for thread), but you could try setting priorities higher if multiple cores are loaded up by various programs so you can set precedence. Maybe give higher priority to the window/program that currently has focus?

You'll definitely want to allow the user to enable/disable this real-time switching and probably want it off by default.

Hmm...kinda make me want to start doing this.

Avatar image for Shatilov
Shatilov

4150

Forum Posts

0

Wiki Points

0

Followers

Reviews: 17

User Lists: 0

#10 Shatilov
Member since 2005 • 4150 Posts
:? :? :? i shouldn't talk .
Avatar image for zaigham
zaigham

711

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#11 zaigham
Member since 2003 • 711 Posts

I just made a little change to the interface regarding minimize issue.

Now you can download the updated application from the original link as well as the rapishare link below:
http://rapidshare.com/files/93482508/ZamsUtilizeMultiCores.zip.html

Avatar image for giantraddish
giantraddish

307

Forum Posts

0

Wiki Points

0

Followers

Reviews: 5

User Lists: 0

#12 giantraddish
Member since 2002 • 307 Posts

It's very cool that you can write a program like this. It's great that you share it with the world. As a programming exercise this is great. As a utility for our inner geek to fiddle with low level OS and hardware decision making it's very fun.

[releases the cynic] As an actual tool to improve performance, this is unlikely to help. The OS and the built in logic in the CPU are far more likely to make good decisions about where a process should run. The people who wrote that logic had much more knowledge about the inner workings of their systems than Joe-user like us. I believe you can find anecdotal incidents of bad process -> core choices and performance bumps. But on average, if you compare performance over time between systems where a defined and tested logic system assigns processes and systems where a relatively uninformed humans makes those decisions the software will win. This is especially true in gaming where the most processor hungry games are (slowly but surely) implementing their own logic to utilize multiple cores. [/cynic back in the box]

Avatar image for mazare
mazare

687

Forum Posts

0

Wiki Points

0

Followers

Reviews: 10

User Lists: 0

#13 mazare
Member since 2005 • 687 Posts
Error (0xc00000135) if I run this. Any1 can help me?
Avatar image for zaigham
zaigham

711

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#14 zaigham
Member since 2003 • 711 Posts

It's very cool that you can write a program like this. It's great that you share it with the world. As a programming exercise this is great. As a utility for our inner geek to fiddle with low level OS and hardware decision making it's very fun.

[releases the cynic] As an actual tool to improve performance, this is unlikely to help. The OS and the built in logic in the CPU are far more likely to make good decisions about where a process should run. The people who wrote that logic had much more knowledge about the inner workings of their systems than Joe-user like us. I believe you can find anecdotal incidents of bad process -> core choices and performance bumps. But on average, if you compare performance over time between systems where a defined and tested logic system assigns processes and systems where a relatively uninformed humans makes those decisions the software will win. This is especially true in gaming where the most processor hungry games are (slowly but surely) implementing their own logic to utilize multiple cores. [/cynic back in the box]

giantraddish

Agreed to some extent.

The problem is OS loads all the processes at all the cores. OS will migrate threads for mult-threaded applications from core to core, but what about single threaded applications?

Latest games that are using their own logic to utilize multi cores are, ofcourse, good at it. Such games try to share load among different cores by balancing their different threads to different cores. The problem is such games might not take into account the other parallel running CPU intensive tasks.

Anyhow this application addresses a different scenerio at all. Lets say you have a Q6600. You start 2 instances of some DVD-to-AVI conversion program for converting two 1-hour video DVDs into AVIs. At the same time you run crysis (which is said to use multi cores). You can try it practically and you will see that crysis won't run that smooth and at the same time the FPS gained in the resulted video conversion would be jerky.

In such scenerio, this application really helps. Try it.

Avatar image for zaigham
zaigham

711

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#15 zaigham
Member since 2003 • 711 Posts

Error (0xc00000135) if I run this. Any1 can help me?mazare

This application requires dot net framework 2.0. You can download it for free.

Also how can you expect it to work on your single core athlon 3000+. Just wondering!

Avatar image for zaigham
zaigham

711

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#16 zaigham
Member since 2003 • 711 Posts

Not bad.

But i think theres a few major ways you can improve this if you really, really want to make this a pretty cool utility.

1) Make it a windows service with a default setting of auto load balancing.

As a windows service, it doesnt require to be on the lower right corner like various applications do. Also, its not something that has to be regularly accessed really. You should also attempt to hook it to the windows right click memu on .exe's and on the task manager to set basic options and settings.

2) Use WMI (windows management instrumentation) to properly gauge how often and how CPU intensive certain programs actually are.

With WMI you can make very smart decisions about how and when to delegate processes and task to different cores automatically. Obviously this will be harder to code, but it makes it significantly easier on the user becuase theres no settingup of information and tasks to get immediate use out of it. A dedicated interface to manage this, like the one your program has right now, is great for tweaker - not so great for your average user.

Also, if you do plan to use WMI, make sure to make note if any application is truly using multiple cores to good use and to offload work. Its possible that a user of your program may have unknowingly set a game like Supreme Commander to use only core #2 and then complain about poor performance when the truth is that a game like SC takes advantage of multiple cores quite well. With WMI and auto load balancing you just off load a game like SC to cores 3 and 4, or 2, 3 and 4. Obviously you'll want to allow some way to force the use of just one and only one core.

3) Start with a list of common programs and applications with predefined settings. Browsers, games (maybe just run through a listing of the games in Vista's game explorer), productivity application, etc.

Maybe ask during install (btw, there should probably be an actual, formal install) if the user would like to use predefined settings or would prefer to explicitly manage everything? Of course, youneed to make some tough decisions here when it comes to the predefined portion of stuff. Should an application like Photoshop or 3d modelling programs that WILL make use of 8 cores at 100% easily deserve to be processed on all cores, or on all but one?

4) This one shouldn't be terribly difficult to code provided you used WMI, but you need to be careful: real-time switching of cores and thread priority.

Your program sets the CPU affinity during its launch and remains those settings until its opened again (on a new or another instance). You can code it to switch cores if two more CPU intensive tasks are being ran on the same core. This is, in essence, a true load-balance.

You'll need to be careful, not that it would be hard to figure out when to switch, but that certain programs may not like a sudden switch. For the most part, most programs wouldnt mind or care. But some might. Same goes for changing thread priority. You'll probably never want anything to be set to real-time (the highest priority for thread), but you could try setting priorities higher if multiple cores are loaded up by various programs so you can set precedence. Maybe give higher priority to the window/program that currently has focus?

You'll definitely want to allow the user to enable/disable this real-time switching and probably want it off by default.

Hmm...kinda make me want to start doing this.

XaosII

Thanks for your cool suggestions.

Providing a pre-set configuration list of applications and games is a cool idea and its very easy to implement.

Using this utility as a windows service is also cool but I'm afraid a lot of people will find it difficult if they want to stop such a service.

Providing a true dynamic load balance is very good idea, a little difficult though. However imo as giantraddish posted, achieving a dynamic load balance is a thing that can be done better by the OS. The problem is that migrating processes and/or threads among different cores too often through such application will most probably cause a performance degradation. This happens because of several technical factors like reloading processor cache each time a thread is migrated between cores. Here is a good read at this:

http://www2.cs.ucy.ac.cy/carch/xi/papers/MigrationCAN.pdf

I would want this auto-load-balance thing to be a part of my application and I would see what can I do about it without causing too much performance degrade.

Avatar image for giantraddish
giantraddish

307

Forum Posts

0

Wiki Points

0

Followers

Reviews: 5

User Lists: 0

#17 giantraddish
Member since 2002 • 307 Posts

Anyhow this application addresses a different scenerio at all. Lets say you have a Q6600. You start 2 instances of some DVD-to-AVI conversion program for converting two 1-hour video DVDs into AVIs. At the same time you run crysis (which is said to use multi cores). You can try it practically and you will see that crysis won't run that smooth and at the same time the FPS gained in the resulted video conversion would be jerky.

In such scenerio, this application really helps. Try it.

zaigham

This falls pretty squarely in the anecdotal, one-off, test scenario category. That said, you kick ass that you built a tool that allowed you to handle a crazy test case like that and that you put it out there for the world. You deserve acknowledgement and a pat on the back. Kudos.

Avatar image for XaosII
XaosII

16705

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#18 XaosII
Member since 2003 • 16705 Posts
Thanks for your cool suggestions.

Providing a pre-set configuration list of applications and games is a cool idea and its very easy to implement.

Using this utility as a windows service is also cool but I'm afraid a lot of people will find it difficult if they want to stop such a service.

Providing a true dynamic load balance is very good idea, a little difficult though. However imo as giantraddish posted, achieving a dynamic load balance is a thing that can be done better by the OS. The problem is that migrating processes and/or threads among different cores too often through such application will most probably cause a performance degradation. This happens because of several technical factors like reloading processor cache each time a thread is migrated between cores. Here is a good read at this:

http://www2.cs.ucy.ac.cy/carch/xi/papers/MigrationCAN.pdf

I would want this auto-load-balance thing to be a part of my application and I would see what can I do about it without causing too much performance degrade.

zaigham

You're absolutely right, but thats why its so important to deal with WMI. Its what windows uses for its own task bar and performance monitors. Windows does do a job of load balancing when its one program doing multiple threads, but programs themselves don't have load balancing in general. Two programs running at the same time that are CPU intensive (with only one major thread) will clog up core 0 at 100% while leaving other cores hovering at < 1%.

With WMI you can get CPU usage per program, CPU timeslice, program lifetime, and all kind of performance related information. Its probably the best way to get this info without causing any performance degrade.

As for making it a service, i can definitely see what you are saying, except that i think it provides the best middle ground for tweakers (who are certainly aware of services to atleast some extent) and for less tech savvy users. Your utility targets tweakers and its not too practical for non-tweake. Either they dont understand what it does well, or find it too much work. Its part of the reason i argued as a service with defaults. It can work for both kinds of users. But, thats entirely your decision.

EDIT: another middle ground might be making it a service but another entry in the control panel that serves as the UI for managing settings and application profiles.

Avatar image for mazare
mazare

687

Forum Posts

0

Wiki Points

0

Followers

Reviews: 10

User Lists: 0

#19 mazare
Member since 2005 • 687 Posts

[QUOTE="mazare"]Error (0xc00000135) if I run this. Any1 can help me?zaigham

This application requires dot net framework 2.0. You can download it for free.

Also how can you expect it to work on your single core athlon 3000+. Just wondering!

I have to update sig :D I have intel quadcore.

Anyway thx for help :D

Avatar image for A1B2C3CAL
A1B2C3CAL

2332

Forum Posts

0

Wiki Points

0

Followers

Reviews: 27

User Lists: 0

#20 A1B2C3CAL
Member since 2007 • 2332 Posts
Thanks for this! I think this deserves a sticky in every PC forums.