Setting CPU Priority on NT/Citrix?
Broue Master asks: "I was recently faced with the task of finding a way to prevent some users from taking 100% cpu time in Citrix. I'm no MS certified anything (but I am a Citrix certified admin) and I couldn't find a built in way to do this. After someone on the NTSysAdmin List suggested trying to set the CPU priority to low from the command line, I investigated and found a small freeware that did the trick: PrioSet. I don't have a big user base: 3 power users (who are my problem with their Access and Excel use) and 10 regular users (and the people most affected by the problem). I'd like to know if any of you have previously tried this software, or if you've run into the particular problem when one user is getting 99% of the CPU for a long time while all other users only share the spare 1%. Did the software solve the problem or did you solve the situation by other means?"
After someone on the NTSysAdmin List suggested trying to set the CPU priority to low from the command line, I investigated and found a small freeware that did the trick: PrioSet.
/? into the prompt - it can start processes at different priorities. So you can replace direct shortcuts to your applications with .bat files that in fact start the application at a different priority.
Type start
Change the shortcut that users launch Access & Excel with to point a CMD, shell or Perl script that launches Access or Excel, then sets drops the priority. It's pretty easy to use Perl to launch and control office applications.
Another route may be to move the access database to an RDBMS, which may use less CPU horsepower than using Access as a client/server.
Conformity is the jailer of freedom and enemy of growth. -JFK
If the problem is 16 bit DOS apps, Tame can help.
Also, when you installed Office, did you run the appropriate app-tuning script afterward? (Search in x:\wtsrv for *.cmd and you'll find a whole bunch of them.) These scripts can make a big difference with certain versions of Windows.
You might also try the MetaFrame Installation and Tuning Tips. You might find a more recent version if you dig around.
"Lawyers are for sucks."
- Doug McKenzie
As long as the suspensions are done quick and often there is usually no visible difference, except that the process takes a lower percentage of cpu time. Admittedly I've only used this sytem before to make processes self throttling, but there is no reason why it shouldn't work for third party processes.
Obviously it would take a bit of tuning to get right, particularly if the access processes aren't competing with anything else most of the time, but it shouldn't take more than a hundred lines of code.
Erm, yeah, or you could just run them at a lower priority.
Thus, if they run an app for some time (e.g. over a few days) they might run up 30 minutes total CPU time with no real problems. On the other hand, someone could start an app, peg it at 99% for 10 minutes and completely hammer the server.
Operating systems like Solaris have add-ons to achieve system limits like CPU allocations to individual users/groups, but that is NOT ulimit.