FW: amavis set nice level on ubuntu 18

Dominic Raferd dominic at timedicer.co.uk
Wed Feb 10 13:17:35 CET 2021


Try: man start-stop-daemon

The command adds -N10 to the call of start-stop-daemon

On Wed, 10 Feb 2021, 12:00 , <webmaster at vbox.com.au> wrote:

> Thank you Dominic, I have run this command, checked the chane, done a
> reboot to be certain, checked again and it appears to have done the job.
>   Much appreciated. :)
>
> I spent a lot of time on this one, and if you can spare a bit of your
> time give me an insight on how this command works, so I can understand
> more clearly what has been done.
>
> TIA, Greg
>
> > I think this should work (and it writes a backup copy to amavis.bak):
>
> > sed -i.bak 's/daemon \(${START}\)/daemon -N10 \1/' /etc/init.d/amavis
>
> > On 2021-02-09 14:16, webmaster at vbox.com.au wrote:
> > Thankyou Dominic.
> >
> > Yes I do want to limit amavis, as it does use a bit of memory when
> > active.  No need for speed on the mail server side of things as only a
> > small number of domains/mail accounts.  Using iRedMail BTW.
> >
> > I have already set ClamAV to a suitable nice level using a method like
> > this:
> > =>
> >
> https://blog.christosoft.de/2018/07/debian-stretch-cpu-nice-level-of-daemons-like-spamassasin/
> >
> > I've created a file in /etc/systemd/system/amavis.service with this
> > directive.
> > ++++
> > ## Added to recduce the load on other service
> > Nice=10
> > ++++
> > However, this method doesn't work for amavis on Ubuntu 18 as the
> > directives are created by "systemd-sysv-generator" as note below.  I
> > cannot find where that config file is so I can set the nice level in
> > the file it writes desired the nice level to the generated file.
> >
> > More ideas welcome, thank you.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.amavis.org/pipermail/amavis-users/attachments/20210210/969ab7c8/attachment.htm>


More information about the amavis-users mailing list