Re: Add $daemon_nice to rc.subr

2018-09-04 Thread Alexander Hall
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  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/
> 



Re: Add $daemon_nice to rc.subr

2018-09-04 Thread Antoine Jacoutot
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  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



Re: Add $daemon_nice to rc.subr

2018-09-04 Thread Thomas de Grivel
and it's like 6 new lines in rc.subr no big deal
Le mar. 4 sept. 2018 à 10:53, Thomas de Grivel  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  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/



Re: Add $daemon_nice to rc.subr

2018-09-04 Thread Thomas de Grivel
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  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/