Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 636764 - net-misc/openssh add SSHD_NICELEVEL and SSHD_IONICE to conf.d
Summary: net-misc/openssh add SSHD_NICELEVEL and SSHD_IONICE to conf.d
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-07 08:13 UTC by Forza
Modified: 2018-04-11 02:44 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Forza 2017-11-07 08:13:31 UTC
I think it would be good to have the options of SSHD_NICELEVEL and SSHD_IONICE in /etc/conf.d/sshd

This allows me to choose a high I/O priority or a low niceness to sshd daemon so that I can login even if the machine is under heavy load.

# /etc/conf.d/sshd
SSHD_NICELEVEL="-5"
SSHD_IONICE="1"

# /etc/init.d/sshd
start() {
        checkconfig || return 1

        ebegin "Starting ${SVCNAME}"
        start-stop-daemon --start --exec "${SSHD_BINARY}" \
            --pidfile "${SSHD_PIDFILE}" \
            --nicelevel "${SSHD_NICELEVEL}" \
            --ionice "${SSHD_IONICE}" \
            -- ${SSHD_OPTS}
        eend $?
}



What I like to do on one machine is to a have high I/O priority and low niceness on the sshd daemon, but I don't want logged on users to inherit that priority. So I use reinice and ionice in the global bashrc file:

#/etc/bash/bashrc.d/nice_level.sh
renice -n 0 $$ > /dev/null 2>&1
ionice -c 0 -p $$ > /dev/null 2>&1
Comment 1 Larry the Git Cow gentoo-dev 2018-04-11 02:44:09 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b74fc16d7b050757989bd8ebba1366e3b8eeda1

commit 9b74fc16d7b050757989bd8ebba1366e3b8eeda1
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2018-04-11 02:16:28 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2018-04-11 02:43:57 +0000

    net-misc/openssh: Bump to v7.7_p1
    
    Ebuild changes:
    ===============
    - HPN patch set updated to v14.14. MT AES CTR cipher are still not
      working at the moment but we are working on this.
    
    - SCTP patch updated for openssh-7.7_p1.
    
    - LDAP patch is currently not available because patch isn't compatble
      with openssh-7.7_p1 and needs a major rewrite because upstream removed
      auth_parse_options() via commit 7c8568576071.
    
    - X.509 patch updated to v11.3.1.
    
    - Previously, SCTP patch sometimes got applied even when "sctp" USE flag
      wasn't set, this is now fixed.
    
    - We now always expose applied patches in version string (previously
      this was only the case for some patches and was also depending on
      whether the "hpn" USE flag was enabled or not).
    
    - Make sure "/var/empty" gets preserved by package manager. [Bug 647034]
    
    - Runscript: "use" entropy. [Bug 470020]
    
    - Runscript: Use "/run" instead of "/var/run". [Bug 555734]
    
    - Runscript: Verify daemon is really up and running. [Bug 617596]
    
    - Runscript: Simplified (thanks to Michael Orlitzky)
    
    - Runscript: Add prefix support. [Bug 640666]
    
    - Runscript: It is now possible to pass any by start-stop-daemon supported
                 arguments (like "--ionice" or "--nicelevel" for example) to
                 start-stop-daemon. [Bug 636764]
    
    Closes: https://bugs.gentoo.org/470020
    Closes: https://bugs.gentoo.org/555734
    Closes: https://bugs.gentoo.org/617596
    Closes: https://bugs.gentoo.org/636764
    Closes: https://bugs.gentoo.org/640666
    Closes: https://bugs.gentoo.org/647034
    Closes: https://bugs.gentoo.org/652438
    Package-Manager: Portage-2.3.28, Repoman-2.3.9

 net-misc/openssh/Manifest                          |   4 +
 .../openssh/files/openssh-7.7_p1-GSSAPI-dns.patch  | 351 ++++++++++++++++++
 net-misc/openssh/files/sshd-r1.confd               |  33 ++
 net-misc/openssh/files/sshd.rc6.5                  |  89 +++++
 net-misc/openssh/openssh-7.7_p1.ebuild             | 406 +++++++++++++++++++++
 5 files changed, 883 insertions(+)