How to start SSHD in high priority?

Smoot Carl-Mitchell smoot at tic.com
Wed Feb 11 18:09:52 UTC 2009


On Thu, 2009-02-12 at 00:15 +0800, howard chen wrote:
> Hey,
> 
> On Wed, Feb 11, 2009 at 10:49 PM, Chan Chung Hang Christopher
> <christopher.chan at bradbury.edu.hk> wrote:
> 
> > Are you sure that your login problems are due to mysql pegging cpu? It
> > could also be due to heavy disk i/o (aka swapping) and if it is,
> > changing priorities makes zero difference.
> >
> 
> Why? If priority is reduced => chance of using I/O also reduced

Process priority when elevated using "nice" only affects the cpu queing
algorithm.  It does not affect I/O.  You might try running "vmstat 5" as
a quick and dirty way to get an idea of what is going on when the system
is sluggish.  My guess will be that you will see high paging activity
which can have a substantial impact on responsiveness.  Pay particular
attention to the "so" column.  Also, if you see a lot of processes in
the 'b' (blocked) column, then your system is I/O bound.

I am not convinced running the SSH dameon at a higher priority will make
much difference.  The login sequence just does not take up that many cpu
cycles.  However, the login sequence has to create several processes
including a new instance of the shell.  If you are paging at a high
rate, this can slow down the shell execution as the system searches for
pages to pageout to make room for the pages needed by the new shell.
Also, if you start the SSH daemon with a higher priority then all of the
child processes of the daemon will also have the elevated priority which
I do not think is what you want to do.
-- 
Smoot Carl-Mitchell
Computer Systems and
Network Consultant
smoot at tic.com
+1 480 922 7313
cell: +1 602 421 9005




More information about the ubuntu-users mailing list