Classic playing nicer

Dec 21, '00 06:50:34PM

Contributed by: Anonymous

Frequently, the classic environment monopolizes the system. This makes the whole OS feel sluggish, because the the Window manager is trying to tear through all its code while sharing a huge number of resources with Classic. This happens on a lot of Unix platforms, and Windows as well. Unlike Windows, Unix and OS X provide a fine-grained way of alleviating this problem. It is called "renice". This command line tool wll allow you to finely control the priority of every program running on your system, including Classic. Typing "man renice" at the command line can give you detail descriptions of this tool, but I'll walk you through the basics (read the rest for the details...)

1.Start up a terminal app and create a terminal window, if one isn't created automatically.

2. At the command line type "ps -x" to list all your processes. You will get output that looks like:

  509  ??  Ss    16:43.58  Window Manager
510 ?? Ss 0:01.47 loginwindow
516 ?? S 0:00.80 pbs
520 ?? S 0:06.32 Dock
521 ?? S 0:16.99 Desktop
522 ?? R 1:54.70 Classic
523 ?? R 4:48.62 TruBlueEnvironme
645 ?? S 1:25.55 Clock
658 ?? R 85:03.91 LaunchCFMApp
682 ?? S 0:27.84 CPU Monitor
683 ?? S 0:17.42 ProcessViewer
691 ?? R 0:02.86 Terminal
697 std Rs 0:00.16 tcsh
The numbers on the right are the process ID's, which will be used in the renice command.

3. Using the renice command, increase the "nice" value of the TrueBlueEnvironment and Classic by finding their process ID's. In my case I would type:
renice +15 522
renice +15 523
This will take my setting from the default, 0, to 15. The largest number is 20. The larger the number, the lower the priority. At 20, the classic environment will only get a chance to run whenever nothing else is going on. At 15 you will get a little sluggishness inside of your classic environmnt when it is bogged down, but you won't notice the impact anywhere near as much on the rest of the system.

Be careful when setting your levels however. Only root, or superuser, are able to raise the priority of a task. If you want to return Classic back to normal, by doing something like:
renice 0 522
renice 0 523
then you will have to be logged into your shell as superuser.

[Editor's note: A great explanation of what renice does, and how it works! You can use Nicer (linked at left) to access the renice program throught the GUI]

Comments (3)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20001221185034927