Nice Performance Tuning For UNIX
Professor writes "Be 'nice' to your computers and examine some general guidelines for tuning server performance. A computer is like an employee who does tasks for you -- it's a good idea to keep from overburdening them. Keep this from happening by using the UNIX 'nice' command."
Yep
In arch/i386/kernel/signal.c [2.6.17-rc1-mm2]
LL
Ah, yes, the extremely bad idea of running updatedb at low priority surfaces again. Then, instead of finishing during the early morning hours, it lasts all day, interferring with real work. Yes, this is what really happens: we tried this quite a while ago in Debian, and it's a Bad Idea(tm). What happens, IIRC, is that updatedb gets CPU so rarely that other tasks end up flushing the file buffers, and updatedb has to re-read the disk, over and over.
If the problem is that your system isn't on all the time, and anacron is running updatedb when you log in, then just disable updatedb. You probably never use 'locate' anyway.
Under FreeBSD default shell is csh and it has its own nice command version. So it is better to use full path if you wanna use /usr/bin/nice. Remember your shell deals with different commands and command line options to process your request: /etc/passwd | wc -l) /etc/passwd > /tmp/names)0 06/02/how-linux-or-unix-understand-which.php
1. Internal commands aka shell builtin command (such as set or nice)
2. External commands (such as clear, date)
3. Aliases (such as alias rm='rm -i')
4. Command substitutions ( such as echo "Today is $(date)")
5. Functions
6. Pipes ( such as cat
7. I/O redirection (such as cat
Src: http://www.cyberciti.biz/nixcraft/vivek/blogger/2
The above post refers to the killall from the psmisc package.
The Sun Solaris "killall" command kills *all* processes.
AIX "killall" kills all processes (except those in its family tree) owned by the calling user (maybe owned by the calling user *and* attached to the current terminal...).
I renice 10 Folding@home so that the computer is actually useable when I need it. When I'm out, it can do what it wants !
Anyone know the historic reason why negative numbers are used for processes with HIGHER priority? It's counterintuitive and everything that's not *nix-like does it differently.
Nice values measure how nice your programs are. Being nice means it gets out of the way for other programs. So a program with a nice value of 10 is nicer than that with a nice value of 0 and will get out of the way.
We could do it the other way around and have a 'mean' program that assigns 'mean' values to programs which then hog the CPU. But only the super user would be able to assign positive values.
Give me Classic Slashdot or give me death!
It's because they changed the metaphor from "having priority" to "being nice." If a process is more nice, it lets other processes use CPU time first. If it is less nice, it hogs it all for itself.
It's confusing if you are used to thinking in terms of priority, but it makes sense after the first few times you see it.
For Mac OS X users trying out the commands in the article, you need to type the following to get the list of processes as shown in the article:
ps -ax -o pid,state,nice,command | less -5Also, on a standard Mac OS X system, the updatedb command to update the locate database is run by cron from the 500.weekly script located in /etc/periodic/weekly/.
The future is in beta
Yes, that's a very good point. It would be nice if it was possible to throttle other resources in a uniform fashion.
:-)
With network bandwidth it's quite application-specific. For example I can tell Azureus (uber-featureful bittorrent client) to only use a certain amount of upload bandwidth. But I can't do this with Gaim, and when I'm sending someone a big file too fast, my web browsing grinds to a halt. It'd be handy to have a uniform way to restrict the bandwidth of apps.
Storage device accesses would be a LOT trickier IMHO. Without knowing the specifics of the device geometry and seek times etc., it's very hard to know how much of a drive's capacity is being used. As I suggested above, it's efficient to have one program read a DVD start-to-finish as fast as it can. It's *HORRIBLY* *AWFULLY* inneficient for TWO programs to do so at once (and from the sound of it, I worry that it will literally break my DVD drive
My bicyles
For Linux news, LWN; for general tech/sci news, Technocrat.
:)
Slashdot has a *lot* more users than either though. Although some times it can seem otherwise, the good comments can show though... you just need to browse at +4 and ignore anything posted = 25 minutes after a story is posted.