default CPU affinity

Started by Gordon218, November 27, 2012, 07:54:51 AM

Previous topic - Next topic

Gordon218

Hello, im runing few same (clone) applications on my root, (srcds.exe) when i try to set the default Cpu affinity or cpu priority to one of the .exe it sets to all of them :( is there any solution how to get this work without changing the application name? Or do i oversee some option in that great program?

BenYeeHua

Try create the watchdog as "processname:username" and running the software with other user, or create the shortcut like c:\windows\system32\cmd.exe /C start /affinity 1 notepad.exe   :)

Jeremy Collake

Good call BenYeeHua ;).

Another work-around is to launch the executable from a different pathname. Now, it might be simply a junction point, a link to the original folder. Therefore, you don't have to copy the file, just make a new folder and point the new one to the original folder. Then on the second instance (or whatever) launch from this new path. When it is running in a new path, you can then differentiate it by choosing to also compare pathnames (see bottom of configuration dialogs for default affinities and priorities), and making sure you reference the pathname in your rule.
Software Engineer. Bitsum LLC.

Gordon218

Thanks a lot works for me. Btw im trying to set the watchdog, i do CPU - greater than 1% for 10 second then set CPU priority (high) for example. Also i do - CPU less than 1% for 5 seconds then set CPU priority to (idle) for the same process, the issue what i got is first it detect nice and reduce the priority to idle, after the aplication start to use more cpu and goes above 1% preformance it set it to high BUT after the aplication is not working anymore the watchdog doesnt set it back to the idle priority :'(  how can i get this to work ?

Jeremy Collake

Quote from: Gordon218 on December 07, 2012, 08:58:26 AM
Thanks a lot works for me. Btw im trying to set the watchdog, i do CPU - greater than 1% for 10 second then set CPU priority (high) for example. Also i do - CPU less than 1% for 5 seconds then set CPU priority to (idle) for the same process, the issue what i got is first it detect nice and reduce the priority to idle, after the aplication start to use more cpu and goes above 1% preformance it set it to high BUT after the aplication is not working anymore the watchdog doesnt set it back to the idle priority :'(  how can i get this to work ?

I will have to test this and see if everything is behaving correctly. There could be some blocker preventing this from functioning as you expect... Please hold and I will investigate as soon as I can!
Software Engineer. Bitsum LLC.

Gordon218

Its working so far, but i found another issue. When i try to configure processes to keep running, im using always a long command line (startparameter) here take a look http://s15.postimage.org/7k0prg495/gg1.jpg after i add 4 programs to the keep runing rule, i cant add any more with the command line i want to use.

Jeremy Collake

Hmm... that is odd. I just tested and didn't see any restriction at 4 entries, nor does it make much sense. It seems like you were very specific, but I need a little more info. In what way does it fail? Does it show the 5th entry, but then somehow it disappears? Does it not display the 5th entry? Does the 5th entry depend on its content? Since it makes no sense, I am just trying to figure out what the possible cause is here... Thanks!
Software Engineer. Bitsum LLC.

BenYeeHua

And it seen like you are hosting a Left 4 Dead servers in more than 3 days.
I had a nice time for playing it. ;)
----
Did you try adding a program without command line?

Jeremy Collake

I did - and didn't see the problem. Maybe if the OP would post his INI file?? Perhaps something has gotten confused. Or perhaps that 4th or 5th entry is in some way incompatible with the syntax.
Software Engineer. Bitsum LLC.

BenYeeHua

#9
The only way is waiting the OP giving more detail of the example and his INI file(If he doesn't mind.) :)

Gordon218

#10
So first i add a custom command line for the .exe http://s10.postimage.org/recvt6hvb/gg4.jpg the problems starts from the 5th rule,
after i add it to the list http://s14.postimage.org/in11bj0r3/gg3.jpg the command line doesn't look complete already.
After i add the 6th rule to the list, its kinda confusing because sometimes i get this http://s7.postimage.org/6z2mii6l5/gg5.jpg or the command line stuck at the ...server." as before. I tried to change the -tickrate before -console in the command line to be exactly, but its kinda random when it stuck at the -console or server."  the command line its never complete after the 4th rule. http://s12.postimage.org/3w1hdfb6z/gg7.jpg
it looks like after 4th rule there comes some kinda restriction how long the command line can be.

I hope its the right ini file.
http://speedy.sh/Vvv84/prolasso.ini

I try to add the commad lines direct to the ini file and see what happens.

Jeremy Collake

Thanks for the screenshots. I will try to go step by step today and see what I can discover. I will keep you updated!

I do have other work I'm doing, namely finishing the default memory priorities since they are sitting there disabled. However, this is also a high priority!
Software Engineer. Bitsum LLC.

BenYeeHua

Yup, it just end with "+exec server;0", waiting for you to try direct edit the INI file. :)

Gordon218

nope, it doesnt help, someway it updated the srcds1.exe, but the srcds30.exe not by the ini file which also wont start corectly  http://s1.postimage.org/8ubas85t9/sgdh4.jpg  :(

BenYeeHua

A hard limit on the code of the PL after the 4th rule?
-----
I saw the TimerResolution on your desktop, but I can tell you that, after the Windows Vista, it might be useless as it will running as 1ms for every game that I tested, except servers. ;D
PS:1.006 ms for Windows 8 if I remember right.

Gordon218

Quote from: BenYeeHua on December 17, 2012, 06:28:34 PM
A hard limit on the code of the PL after the 4th rule?
-----
I saw the TimerResolution on your desktop, but I can tell you that, after the Windows Vista, it might be useless as it will running as 1ms for every game that I tested, except servers. ;D
PS:1.006 ms for Windows 8 if I remember right.

I dont really remember what was the default resolution time by the win 2008, anyway its runing now with 0.5ms :)

Jeremy Collake

The Windows high-resolution multimedia timer has an undefined hard-coded default minimum interval. It depends on the hardware.
Software Engineer. Bitsum LLC.

BenYeeHua

And windows. :)
----
I has tried 0.5ms, it don't show any difference between 0.5ms and 1ms for gaming, but did it show any difference for servers?

Jeremy Collake

I doubt that little a difference matters for anything that would matter to us (exceptions always exist somewhere).
Software Engineer. Bitsum LLC.

BenYeeHua

Because we are living at Earth. ;D