When a server is overloaded, what is a way under systemd to give ssh a high priority to ensure a remote ssh connection gets a priority to resolve the critical situation?

  • 1
    What kind of load are you talking about? CPU will likely not be the problem, even if SSH only gets a fraction of CPU time. More likely a problem is load caused by iowait and/or swapping. Solving this requires more than just setting a priority. – Halfgaar Nov 2 '18 at 12:42
  • So IOSchedulingPriority=1? – danblack Nov 2 '18 at 13:09
  • It's not quite that simple, especially if the machine is virtualized. Simulate some IO with benchmark tools and see what happens. – Halfgaar Nov 2 '18 at 22:00

Create a systemd override file setting the nice level to a high negative priority (maximum is -20, however some kernel processes require that for integrity).



Run systemctl daemon-reload for this to have an effect.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.