<div dir="auto"><div>Try: man start-stop-daemon</div><div dir="auto"><br></div><div dir="auto">The command adds -N10 to the call of start-stop-daemon<br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Wed, 10 Feb 2021, 12:00 , <<a href="mailto:webmaster@vbox.com.au">webmaster@vbox.com.au</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thank you Dominic, I have run this command, checked the chane, done a <br>
reboot to be certain, checked again and it appears to have done the job. <br>
  Much appreciated. :)<br>
<br>
I spent a lot of time on this one, and if you can spare a bit of your <br>
time give me an insight on how this command works, so I can understand <br>
more clearly what has been done.<br>
<br>
TIA, Greg<br>
<br>
> I think this should work (and it writes a backup copy to amavis.bak):<br>
<br>
> sed -i.bak 's/daemon \(${START}\)/daemon -N10 \1/' /etc/init.d/amavis<br>
<br>
> On 2021-02-09 14:16, <a href="mailto:webmaster@vbox.com.au" target="_blank" rel="noreferrer">webmaster@vbox.com.au</a> wrote:<br>
> Thankyou Dominic.<br>
> <br>
> Yes I do want to limit amavis, as it does use a bit of memory when<br>
> active.  No need for speed on the mail server side of things as only a<br>
> small number of domains/mail accounts.  Using iRedMail BTW.<br>
> <br>
> I have already set ClamAV to a suitable nice level using a method like <br>
> this:<br>
> =><br>
> <a href="https://blog.christosoft.de/2018/07/debian-stretch-cpu-nice-level-of-daemons-like-spamassasin/" rel="noreferrer noreferrer" target="_blank">https://blog.christosoft.de/2018/07/debian-stretch-cpu-nice-level-of-daemons-like-spamassasin/</a><br>
> <br>
> I've created a file in /etc/systemd/system/amavis.service with this <br>
> directive.<br>
> ++++<br>
> ## Added to recduce the load on other service<br>
> Nice=10<br>
> ++++<br>
> However, this method doesn't work for amavis on Ubuntu 18 as the<br>
> directives are created by "systemd-sysv-generator" as note below.  I<br>
> cannot find where that config file is so I can set the nice level in<br>
> the file it writes desired the nice level to the generated file.<br>
> <br>
> More ideas welcome, thank you.<br>
</blockquote></div></div></div>