Re: Add $daemon_nice to rc.subr

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Add $daemon_nice to rc.subr

Thomas de Grivel-2
why ? well all interactive process get a quarter range nice priority
advance compared to all daemon tasks, at least for a laptop
environment it really makes sense. sndiod and ntpd are unaffected by
this change.

you're right to criticize in that I did not document my code, the
point of this new variable is that an amendment to daemon priority is
no more than putting one line in /etc/rc.conf.local eg.
sshd_nice=1

or in the rc.d/ file
daemon_nice=whatever

why, because it is a whole lot more readable and usable than
inheriting a whole new login class just to change one parameter, but
if you don't like it nobody foces you huh ?

Le mar. 4 sept. 2018 à 07:57, Alexandre Ratchov <[hidden email]> a écrit :
>
> On Tue, Sep 04, 2018 at 04:58:53AM +0200, Thomas de Grivel wrote:
> >
> > And I still feel the default nice priority of 10 is rather a good
> > idea.
>
> why?



--
 Thomas de Grivel
 http://b.lowh.net/billitch/

Reply | Threaded
Open this post in threaded view
|

Re: Add $daemon_nice to rc.subr

Thomas de Grivel-2
and it's like 6 new lines in rc.subr no big deal
Le mar. 4 sept. 2018 à 10:53, Thomas de Grivel <[hidden email]> a écrit :

>
> why ? well all interactive process get a quarter range nice priority
> advance compared to all daemon tasks, at least for a laptop
> environment it really makes sense. sndiod and ntpd are unaffected by
> this change.
>
> you're right to criticize in that I did not document my code, the
> point of this new variable is that an amendment to daemon priority is
> no more than putting one line in /etc/rc.conf.local eg.
> sshd_nice=1
>
> or in the rc.d/ file
> daemon_nice=whatever
>
> why, because it is a whole lot more readable and usable than
> inheriting a whole new login class just to change one parameter, but
> if you don't like it nobody foces you huh ?
>
> Le mar. 4 sept. 2018 à 07:57, Alexandre Ratchov <[hidden email]> a écrit :
> >
> > On Tue, Sep 04, 2018 at 04:58:53AM +0200, Thomas de Grivel wrote:
> > >
> > > And I still feel the default nice priority of 10 is rather a good
> > > idea.
> >
> > why?
>
>
>
> --
>  Thomas de Grivel
>  http://b.lowh.net/billitch/



--
 Thomas de Grivel
 http://b.lowh.net/billitch/

Reply | Threaded
Open this post in threaded view
|

Re: Add $daemon_nice to rc.subr

Antoine Jacoutot-6
In reply to this post by Thomas de Grivel-2
On Tue, Sep 04, 2018 at 10:53:17AM +0200, Thomas de Grivel wrote:

> why ? well all interactive process get a quarter range nice priority
> advance compared to all daemon tasks, at least for a laptop
> environment it really makes sense. sndiod and ntpd are unaffected by
> this change.
>
> you're right to criticize in that I did not document my code, the
> point of this new variable is that an amendment to daemon priority is
> no more than putting one line in /etc/rc.conf.local eg.
> sshd_nice=1
>
> or in the rc.d/ file
> daemon_nice=whatever
>
> why, because it is a whole lot more readable and usable than
> inheriting a whole new login class just to change one parameter, but
> if you don't like it nobody foces you huh ?

You're not inheriting a whole new login class, you're just modifying the daemon
one and give it a new name.
Feel free to keep your diff locally, I don't see any value in integrating it.


> Le mar. 4 sept. 2018 à 07:57, Alexandre Ratchov <[hidden email]> a écrit :
> >
> > On Tue, Sep 04, 2018 at 04:58:53AM +0200, Thomas de Grivel wrote:
> > >
> > > And I still feel the default nice priority of 10 is rather a good
> > > idea.
> >
> > why?
>
>
>
> --
>  Thomas de Grivel
>  http://b.lowh.net/billitch/
>

--
Antoine

Reply | Threaded
Open this post in threaded view
|

Re: Add $daemon_nice to rc.subr

Alexander Hall
In reply to this post by Thomas de Grivel-2
On Tue, Sep 04, 2018 at 10:53:17AM +0200, Thomas de Grivel wrote:
> why ? well all interactive process get a quarter range nice priority
> advance compared to all daemon tasks, at least for a laptop
> environment it really makes sense. sndiod and ntpd are unaffected by
> this change.
>
> you're right to criticize in that I did not document my code, the
> point of this new variable is that an amendment to daemon priority is
> no more than putting one line in /etc/rc.conf.local eg.
> sshd_nice=1

Yes, it would be simpler. However:

- The functionality already exists, if somewhat more cumbersome
- For the majority of users, it's not needed.
- Antoine wasn't convinced.

That said, if you want your desktop swift, maybe just set priority 10 in
the overall daemon class itself in login.conf?

(And do you really run that CPU intense daemons on your laptop?)

>
> or in the rc.d/ file
> daemon_nice=whatever
>
> why, because it is a whole lot more readable and usable than
> inheriting a whole new login class just to change one parameter, but
> if you don't like it nobody foces you huh ?

Skip the tone.

/Alexander

>
> Le mar. 4 sept. 2018 à 07:57, Alexandre Ratchov <[hidden email]> a écrit :
> >
> > On Tue, Sep 04, 2018 at 04:58:53AM +0200, Thomas de Grivel wrote:
> > >
> > > And I still feel the default nice priority of 10 is rather a good
> > > idea.
> >
> > why?
>
>
>
> --
>  Thomas de Grivel
>  http://b.lowh.net/billitch/
>