Running chess programs under Windows Vista - a question

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

User avatar
smirobth
Posts: 2307
Joined: Wed Mar 08, 2006 8:41 pm
Location: Brownsville Texas USA

Running chess programs under Windows Vista - a question

Post by smirobth »

When running chess engines under WinXP I often used to change a programs priority, using the windows task manager, to "low" or "below normal" (so that my computer wouldn't get bogged down by the chess programs demand for CPU time). I recently switched to Vista and I find that with some programs task manager does not allow me to change the priority, instead giving me an error message (but with some other programs I don't have any problem changing the priority). Has anyone else seen this and is there a work around?
- Robin Smith
Odd Gunnar Malin
Posts: 307
Joined: Wed Mar 08, 2006 9:59 pm
Location: Norway, Vads?
Full name: Odd Gunnar Malin

Re: Running chess programs under Windows Vista - a question

Post by Odd Gunnar Malin »

Hi.

I don't know anything about Vista, but you could try my little tool InBetween.

I have been using it for all external engines in Chess Assistant to lower the priority.

From the readme file:
Setting priority
----------------
The priority for the process are a mix of priorityClass and thread priority. In addition Windows try to
boost certain threads by some guessing. Foreground/stalled/out of sleep etc. You should'nt use
realtime for the priority class or timecritical for priority thread if you don't know what you do, and
never for timeconsume processes like an engine.
Search for 'scheduling priorities' on http://msdn.microsoft.com/ to read more about priorities
in Windows.
In short, the priority for a process is a number between 1 and 31. Priorities above 14 are for
timecritical processes and should normaly not be used.

The Priority class can be set to: idle, below, normal, above, high, or realtime. below and above are
only suported for W2K and later Windows.
To force it to normal you use:

Priority := normal

This can then be adjuste by the thread priority to: idle, lowest, below, normal, above, highest, timecritical
Ex. to force this too to normal you use:

ThreadPriority := normal

In addition you can also stop Windows boost mechanisme by setting
(This only works on Windows NT/2K/XP):

Boost := false

Priority classes
idle = 4
below = 6 (Only for Win2K++)
normal = 8
above = 10 (Only for Win2K++)
high = 13
realtime = 24

Thread priority
idle = Always 1 for all except for realtime class where it is 16.
lowest = -2
below = -1
normal = 0
above = +1
highest = +2
timecritical = Always 15 for all except for realtime class where it is 31.

Be aware that Windows add a boost to foreground applications runing with Priority class set to normal.
You may need to adjust this in the controllpanel/system if you try to get a forground app and a background
app to run with same priority (engine match). Or you can start the gui with InBetween and set Boost to false.
You need the latest version of InBetween to get all this to work ( http://utilities.sjakk.biz/download/InBetween.zip )

You can add InBetween to the engine or the gui.

Odd Gunnar
gerold
Posts: 10121
Joined: Thu Mar 09, 2006 12:57 am
Location: van buren,missouri

Re: Running chess programs under Windows Vista - a question

Post by gerold »

smirobth wrote:When running chess engines under WinXP I often used to change a programs priority, using the windows task manager, to "low" or "below normal" (so that my computer wouldn't get bogged down by the chess programs demand for CPU time). I recently switched to Vista and I find that with some programs task manager does not allow me to change the priority, instead giving me an error message (but with some other programs I don't have any problem changing the priority). Has anyone else seen this and is there a work around?
Vista requires more RAM than XP. Its slowed down my computer.
User avatar
smirobth
Posts: 2307
Joined: Wed Mar 08, 2006 8:41 pm
Location: Brownsville Texas USA

Re: Running chess programs under Windows Vista - a question

Post by smirobth »

Odd Gunnar Malin wrote:Hi.

I don't know anything about Vista, but you could try my little tool InBetween.
Hi Odd Gunnar,

Thanks, I will give it a try. I was hoping for an easy solution but have still not found one. When I get a chance to try it out I'll let you know if it works, although I suspect that it might not. Vista has such tight built-in security features that many things that used to be easy are now harder to do.
- Robin Smith
User avatar
smirobth
Posts: 2307
Joined: Wed Mar 08, 2006 8:41 pm
Location: Brownsville Texas USA

Re: Running chess programs under Windows Vista - a question

Post by smirobth »

Odd Gunnar Malin wrote:Hi.

I don't know anything about Vista, but you could try my little tool InBetween.

I have been using it for all external engines in Chess Assistant to lower the priority.

From the readme file:
Setting priority
----------------
The priority for the process are a mix of priorityClass and thread priority. In addition Windows try to
boost certain threads by some guessing. Foreground/stalled/out of sleep etc. You should'nt use
realtime for the priority class or timecritical for priority thread if you don't know what you do, and
never for timeconsume processes like an engine.
Search for 'scheduling priorities' on http://msdn.microsoft.com/ to read more about priorities
in Windows.
In short, the priority for a process is a number between 1 and 31. Priorities above 14 are for
timecritical processes and should normaly not be used.

The Priority class can be set to: idle, below, normal, above, high, or realtime. below and above are
only suported for W2K and later Windows.
To force it to normal you use:

Priority := normal

This can then be adjuste by the thread priority to: idle, lowest, below, normal, above, highest, timecritical
Ex. to force this too to normal you use:

ThreadPriority := normal

In addition you can also stop Windows boost mechanisme by setting
(This only works on Windows NT/2K/XP):

Boost := false

Priority classes
idle = 4
below = 6 (Only for Win2K++)
normal = 8
above = 10 (Only for Win2K++)
high = 13
realtime = 24

Thread priority
idle = Always 1 for all except for realtime class where it is 16.
lowest = -2
below = -1
normal = 0
above = +1
highest = +2
timecritical = Always 15 for all except for realtime class where it is 31.

Be aware that Windows add a boost to foreground applications runing with Priority class set to normal.
You may need to adjust this in the controllpanel/system if you try to get a forground app and a background
app to run with same priority (engine match). Or you can start the gui with InBetween and set Boost to false.
You need the latest version of InBetween to get all this to work ( http://utilities.sjakk.biz/download/InBetween.zip )

You can add InBetween to the engine or the gui.

Odd Gunnar
Hi Odd Gunnar,
I could not get Inbetween to work. I am trying to use it to set the priority of the chessbase 9 GUI (CBase9.exe) to low. First I tried to use .ini files and /p switches etc. When that didn't work I decided to see if I could get it to work without modifying the priorities and simply launching it without a .ini file from a DOS box by typing "Inbetween.exe CBase9.exe". I get an error message: "Error starting server program". Any ideas about what I am doing wrong? Thanks.

-Robin
- Robin Smith
Odd Gunnar Malin
Posts: 307
Joined: Wed Mar 08, 2006 9:59 pm
Location: Norway, Vads?
Full name: Odd Gunnar Malin

Re: Running chess programs under Windows Vista - a question

Post by Odd Gunnar Malin »

smirobth wrote:Hi Odd Gunnar,
I could not get Inbetween to work. I am trying to use it to set the priority of the chessbase 9 GUI (CBase9.exe) to low. First I tried to use .ini files and /p switches etc. When that didn't work I decided to see if I could get it to work without modifying the priorities and simply launching it without a .ini file from a DOS box by typing "Inbetween.exe CBase9.exe". I get an error message: "Error starting server program". Any ideas about what I am doing wrong? Thanks.

-Robin
Hmm. Could it be that Inbetween don't run (correct) on Vista.

I tried it here on XP pro SP2 and it worked.
inbetween cbase9.exe
inbetween /p below cbase9.exe
inbetween /p low cbase9.exe
All worked as expected.

I also tried to do it with help of an inifile.
;----inbetween.ini----
[InBetween]
Priority := below
CommandLine := cbase9.exe
Log := logfile.log
;--- end of file ----

You of course put inbetween.exe (and ev. inbetween.ini) into the c:\Program files\Chessbase\Cbase9 folder, eg. where the cbase9.exe exist.

The ini file have preference so you can't use the commandline method if there exist an inbetween.ini file in the same folder.

I don't have any Vista machine here to test with now.

Do the start command exist on Vista?
If yes, try:

start /LOW cbase9.exe

This work too here on my XP.

Odd Gunnar
User avatar
smirobth
Posts: 2307
Joined: Wed Mar 08, 2006 8:41 pm
Location: Brownsville Texas USA

Re: Running chess programs under Windows Vista - a question

Post by smirobth »

Odd Gunnar Malin wrote:
smirobth wrote:Hi Odd Gunnar,
I could not get Inbetween to work. I am trying to use it to set the priority of the chessbase 9 GUI (CBase9.exe) to low. First I tried to use .ini files and /p switches etc. When that didn't work I decided to see if I could get it to work without modifying the priorities and simply launching it without a .ini file from a DOS box by typing "Inbetween.exe CBase9.exe". I get an error message: "Error starting server program". Any ideas about what I am doing wrong? Thanks.

-Robin
Hmm. Could it be that Inbetween don't run (correct) on Vista.

I tried it here on XP pro SP2 and it worked.
inbetween cbase9.exe
inbetween /p below cbase9.exe
inbetween /p low cbase9.exe
All worked as expected.

I also tried to do it with help of an inifile.
;----inbetween.ini----
[InBetween]
Priority := below
CommandLine := cbase9.exe
Log := logfile.log
;--- end of file ----

You of course put inbetween.exe (and ev. inbetween.ini) into the c:\Program files\Chessbase\Cbase9 folder, eg. where the cbase9.exe exist.

The ini file have preference so you can't use the commandline method if there exist an inbetween.ini file in the same folder.

I don't have any Vista machine here to test with now.

Do the start command exist on Vista?
If yes, try:

start /LOW cbase9.exe

This work too here on my XP.

Odd Gunnar
Hi Odd Gunnar,

I got it to work! I did have Inbetween in the chessbase directory where Cbase9.exe is located, that was not the problem; the problem was Vista needs to have Inbetween's compatability privelege level set to "run as administrator", so that Inbetween has administrator privileges. Without that it didn't work. I have had that same problem with a couple other programs too. With Vista, even if you are the only user on the machine, and you are the machine's administrator, Vista will still run programs without administrator privileges. Part of Vista's security from hell I guess.

Now it is time for me to make some ini files and shortcuts so I can launch it without a DOS box.

Thanks again for both your help and great program. I am very happy.
- Robin Smith