FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 02-11-2009, 01:49 PM
Chan Chung Hang Christopher
 
Default How to start SSHD in high priority?

> Is it possible to config SSHD to start in high priority?
>
> Since sometime the mysql database server is busy... I would like to
> ssh into the server to kill some long running process...
>
>

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.


If the problem really is mysql pegging cpu, do you have a lot of
connections? If you do, consider getting connection pooling into your
architecture if you do not already do so.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 02-11-2009, 03:15 PM
howard chen
 
Default How to start SSHD in high priority?

Hey,

On Wed, Feb 11, 2009 at 10:49 PM, Chan Chung Hang Christopher
<christopher.chan@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

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 02-11-2009, 03:32 PM
John Hubbard
 
Default How to start SSHD in high priority?

howard chen wrote:
> Hey,
>
> On Wed, Feb 11, 2009 at 10:49 PM, Chan Chung Hang Christopher
> <christopher.chan@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
>
What process carries out paging? If paging is preformed by a paging
daemon, then the paging process will still bring the computer to its
knees. sshd would need to have a higher priority than the paging daemon.

--
-john

To be or not to be, that is the question
2b || !2b
(0b10)*(0b1100010) || !(0b10)*(0b1100010)
0b11000100 || !0b11000100
0b11000100 || 0b00111011
0b11111111
255, that is the answer.



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 02-11-2009, 05:09 PM
Smoot Carl-Mitchell
 
Default How to start SSHD in high priority?

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@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@tic.com
+1 480 922 7313
cell: +1 602 421 9005

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 02-11-2009, 06:19 PM
Derek Broughton
 
Default How to start SSHD in high priority?

John Hubbard wrote:

> What process carries out paging? If paging is preformed by a paging
> daemon, then the paging process will still bring the computer to its
> knees. sshd would need to have a higher priority than the paging daemon.

Which, iirc from my undergrad days, is a Very Bad Idea. :-)

--
derek


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 02-11-2009, 07:05 PM
John Hubbard
 
Default How to start SSHD in high priority?

Derek Broughton wrote:
> John Hubbard wrote:
>
>
>> What process carries out paging? If paging is preformed by a paging
>> daemon, then the paging process will still bring the computer to its
>> knees. sshd would need to have a higher priority than the paging daemon.
>>
>
> Which, iirc from my undergrad days, is a Very Bad Idea. :-)
>
>
It doesn't sound like a good idea to me either. I am also not sure that
it would really fix the problem. If there is no memory a higher priority
won't help.

--
-john

To be or not to be, that is the question
2b || !2b
(0b10)*(0b1100010) || !(0b10)*(0b1100010)
0b11000100 || !0b11000100
0b11000100 || 0b00111011
0b11111111
255, that is the answer.



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 02-11-2009, 10:26 PM
Hal Burgiss
 
Default How to start SSHD in high priority?

On Wed, Feb 11, 2009 at 09:46:26PM +0800, howard chen wrote:
> Hello,
>

Yo. Another indirect solution ...

The times I've seen this kind of behavior is because mysql was
severely underconfigured, or the system just needed more/better
hardware. Have you touched my.cnf? Most Linuxes, including Ubuntu,
have a conservative stock config. You can find a selection of configs
in /usr/share/doc/mysql-server-5.0/examples/. This is definitely worth
looking at even if its not the whole solution. A misbehaved application
can be another source of headaches.

--
Hal


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 02-12-2009, 02:34 AM
Christopher Chan
 
Default How to start SSHD in high priority?

howard chen wrote:
> Hey,
>
> On Wed, Feb 11, 2009 at 10:49 PM, Chan Chung Hang Christopher
> <christopher.chan@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
>


As another poster has already explained, setting a different priority
has zero bearing on disk i/o since it is only for cpu processing time.
There is no provision for giving a particular process more privileges in
disk i/o as far as I know too.

What you really need to do is follow the suggestion of another poster
and run 'vmstat 1'.

Look at the last number which should correspond to wa. High wa numbers
mean that the box is suffering from a i/o bottleneck. That might also
mean high id numbers (id is the second last column and stands for cpu
idle) which would mean the box only suffers i/o bottlenecks which is
preventing optimal use of available cpu power.

If you have high wa numbers and low id numbers (maybe even 0) you are
suffering from both lack of cpu processing power to a degree and an i/o
bottleneck.

If you have both low id and wa numbers, you need more cpu processing
power...especially if id is 0 and wa is still low. The box is maxxed out.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 02-13-2009, 03:06 PM
sktsee
 
Default How to start SSHD in high priority?

On Thu, 12 Feb 2009 11:34:24 +0800, Christopher Chan wrote:

> howard chen wrote:
>> Hey,
>>
>> On Wed, Feb 11, 2009 at 10:49 PM, Chan Chung Hang Christopher
>> <christopher.chan@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
>>
>>
>
> As another poster has already explained, setting a different priority
> has zero bearing on disk i/o since it is only for cpu processing time.
> There is no provision for giving a particular process more privileges in
> disk i/o as far as I know too.
>

ionice

--
sktsee


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 02-14-2009, 10:04 AM
howard chen
 
Default How to start SSHD in high priority?

Hello.

On Sat, Feb 14, 2009 at 12:06 AM, sktsee <sktsee@tulsaconnect.com> wrote:
> ionice

wow....never heard this command before...should give a try !

Thanks.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 03:18 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org