[clue-admin] SpamAssasin is Really Bogging the Server

Jed S. Baer thag at frii.com
Mon Mar 14 16:20:55 MST 2005


On Fri, 11 Mar 2005 22:01:49 -0700
Jeff Cann wrote:

> Not being an SysAdmin, I didn't think about telling the kernel to give
> less time to spamd via nice.  If someone can give me a quick tip on how
> to do this, I'm happy to.

Well, a quick look at the manpage for nice indicates we'd have to get to
the command(s) which invoke SpamAssasin, and change them so they're
invoked using nice, i.e:

  nice 2 {whole command string here}

would drop the priority by 2 from the default, noting that, if I'm reading
this correctly, priorities are reverse, i.e. -20 is highest, 19 is lowest,
so I infer that a positive number moves the task to a lower priority.

Also, the info page mentions that most shells have a nice builtin, but a
check of the bash manpage doesn't show one, so not an issue on the CLUE
box.

Aha! Looking at /etc/rc.d/init.d/spamassasin I see the variable
$NICELEVEL, which I guess would be set in the /etc/sysconfig/spamassasin
file. And, looking at /etc/rc.d/init.d/functions, it looks like you just
pass a [+|-]integer the same as invoking nice from the shell.

> Thanks for being observant, Jed.

Eh? Blind pig in this case. :)

Not really sure how much effect changing priority would do. Depends on the
kernel scheduling algorithm. But I doubt it would hurt.

OTOH, I could UP Apache's priority.

jed
-- 
http://s88369986.onlinehome.us/freedomsight/
Key fingerprint = B027 FEFB 4281 CC72 67D1  4237 F2D0 D356 077A A30E
... it is poor civic hygiene to install technologies that could someday
facilitate a police state. -- Bruce Schneier



More information about the clue-admin mailing list