Slashdot Mirror


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."

5 of 206 comments (clear)

  1. Re:what about killall by LLuthor · · Score: 4, Informative
    Umm. You can't sigkill init on Linux (at least on moderately recent kernels). I am pretty sure that is also the case on BSD systems.

    Yep ...
    In arch/i386/kernel/signal.c [2.6.17-rc1-mm2]
    563 /*
    564 * Note that 'init' is a special process: it doesn't get signals it doesn't
    565 * want to handle. Thus you cannot kill init even with a SIGKILL even by
    566 * mistake.
    567 */
    568 static void fastcall do_signal(struct pt_regs *regs)
    --
    LL
  2. Worst. Advice. Ever. by V.+Mole · · Score: 3, Informative

    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.

    1. Re:Worst. Advice. Ever. by gowen · · Score: 4, Informative
      Then, instead of finishing during the early morning hours, it lasts all day, interferring with real work.
      If there are no other processes competing for resources, niced and non-niced processes will complete in approximately the same time. If your niced late-night updatedb is taking forever, its because you've chosen to run other processes overnight as well. And if your updatedb runs quickly, then the other processes will "interfere with real work".

      In short : nice doesn't change the total amount of time your processes take (or, at least, not by very much), it just changes which one finishes first.
      --
      Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
  3. Re:what about killall by Stradenko · · Score: 4, Informative

    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...).

  4. nice for the Mac geeks by Been+on+TV · · Score: 3, Informative

    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 -5

    Also, 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