Re: [exim] nice / lowering exim priority

Page principale
Supprimer ce message
Répondre à ce message
Auteur: 韓家標 W B Hacker
Date:  
À: exim users
Sujet: Re: [exim] nice / lowering exim priority
Zbigniew Szalbot wrote:
> Hello,
>
> I am curious if there is a way to lower exim's priority while it is
> being run.


Depends on the OS, but generally 'yes'.

I had a situation where having been blocked by Yahoo I
> ended up with some 8K emails in queue. This would be all right but my
> machine so far is humble Pentium III 866 with 512 MB RAM. So while
> watching the CPU, I noticed that all day long it was being used at
> 100% (no idle time). I have dealt with the queue problem temporarily
> but I wonder whether in situations like this there is a way to lower
> exim thread's priority to leave some cycles for other tasks?
>
> I have never done it before. I tried nice -n 15 mailnull (mailnull is
> the user exim is run as) but this didn't work. I did not find out how
> to do it properly but I also wonder if lowering priority may have some
> serious side effects?
>
> Many thanks for your advice, not least for your patience with me :)
>


It is easier to 'nice' the daemon when you start it. So long as there
are adequate resources, it will run just as fast.

In the 'heat of battle', an appropriate 'nice' can at least insure that
your essential, and hopefully higher-priority 'ssh' session can attach
and remain responsive enough to regain control even under a crippling
DoS attack.

And the better the job you can do of shedding vermin early-on, the less
frequently you'll need SA and friends chewing up machine-cycles.

As to whether you apply 'nice' to a binary, a UID, or a PID, where, and
when on *your* OS:

'man nice'