Re: Mysql Hogging all system resources

2007-04-13 Thread Chuck Swiger

On Apr 12, 2007, at 1:17 PM, Don O'Neil wrote:
[ ... ]
Is there a way to prioritize or set the amount of resources that  
MySQL is
allowed to have? Do I need to set it up as a jailed process maybe?  
I've
never done that before, so I'm not sure if it's the right approach  
or not.


Um, didn't you ask this question yesterday?  Use nice/renice to  
change the process priority of the MySQL server so that you don't  
starve other processes of CPU


--
-Chuck


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Mysql Hogging all system resources

2007-04-13 Thread Don O'Neil
Is there a way to set a 'nice' priority for a particular user? 

Also, when I run this:

nice -n 5 /usr/bin/spamd -d -c -m 5

I get:

nice: Badly formed number. 

I ran a man page on it, and this is the right format, but its not working.

-Original Message-
From: Chuck Swiger [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 13, 2007 11:38 AM
To: Don O'Neil
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Mysql Hogging all system resources

On Apr 12, 2007, at 1:17 PM, Don O'Neil wrote:
[ ... ]
 Is there a way to prioritize or set the amount of resources that MySQL 
 is allowed to have? Do I need to set it up as a jailed process maybe?
 I've
 never done that before, so I'm not sure if it's the right approach or 
 not.

Um, didn't you ask this question yesterday?  Use nice/renice to change the
process priority of the MySQL server so that you don't starve other
processes of CPU

-- 
-Chuck



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Mysql Hogging all system resources

2007-04-13 Thread Don O'Neil
Nevermind on the badly formatted number... I specified the full path
/usr/bin/nice and it worked ok this time :-)

However, I still want to know if there is a way to specify a nice level for
an entire users processes.

Thanks! 

-Original Message-
From: Don O'Neil [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 13, 2007 2:41 PM
To: 'Chuck Swiger'
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Mysql Hogging all system resources

Is there a way to set a 'nice' priority for a particular user? 

Also, when I run this:

nice -n 5 /usr/bin/spamd -d -c -m 5

I get:

nice: Badly formed number. 

I ran a man page on it, and this is the right format, but its not working.

-Original Message-
From: Chuck Swiger [mailto:[EMAIL PROTECTED]
Sent: Friday, April 13, 2007 11:38 AM
To: Don O'Neil
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Mysql Hogging all system resources

On Apr 12, 2007, at 1:17 PM, Don O'Neil wrote:
[ ... ]
 Is there a way to prioritize or set the amount of resources that MySQL 
 is allowed to have? Do I need to set it up as a jailed process maybe?
 I've
 never done that before, so I'm not sure if it's the right approach or 
 not.

Um, didn't you ask this question yesterday?  Use nice/renice to change the
process priority of the MySQL server so that you don't starve other
processes of CPU

--
-Chuck



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Mysql Hogging all system resources

2007-04-13 Thread Chuck Swiger

On Apr 13, 2007, at 2:40 PM, Don O'Neil wrote:

Is there a way to set a 'nice' priority for a particular user?


Why, yes-- see /etc/login.conf and the priority keyword.
Some shells also let you adjust the priority levels for various users.


Also, when I run this:

nice -n 5 /usr/bin/spamd -d -c -m 5

I get:

nice: Badly formed number.

I ran a man page on it, and this is the right format, but its not  
working.


Many shells offer nice as a built-in keyword, with syntax that may  
vary slightly from what /usr/bin/nice uses.  Either try /usr/bin/ 
nice -n 5 _command_, or use nice 5 _command_ under csh/tcsh.  sh/ 
ksh/zsh ought to understand the -n flag and be more similar to the  
external command under /usr/bin.


--
-Chuck


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Mysql Hogging all system resources

2007-04-13 Thread Andrey Dmitriev
Perhaps a better solution is to determine why mysql is 'hogging' 
resources in the first place.

There is a tuning section in MySQL manual.

-a

-Original Message-
From: Chuck Swiger [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 13, 2007 5:46 PM
To: Don O'Neil
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Mysql Hogging all system resources

On Apr 13, 2007, at 2:40 PM, Don O'Neil wrote:
 Is there a way to set a 'nice' priority for a particular user?

Why, yes-- see /etc/login.conf and the priority keyword.
Some shells also let you adjust the priority levels for various users.

 Also, when I run this:

 nice -n 5 /usr/bin/spamd -d -c -m 5

 I get:

 nice: Badly formed number.

 I ran a man page on it, and this is the right format, but its not 
 working.

Many shells offer nice as a built-in keyword, with syntax that may vary 
slightly from what /usr/bin/nice uses.  Either try /usr/bin/ nice -n 5 
_command_, or use nice 5 _command_ under csh/tcsh.  sh/ ksh/zsh ought 
to understand the -n flag and be more similar to the external command 
under /usr/bin.

--
-Chuck


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Mysql Hogging all system resources

2007-04-13 Thread Dan Nelson
In the last episode (Apr 13), Don O'Neil said:
 Nevermind on the badly formatted number... I specified the full path
 /usr/bin/nice and it worked ok this time :-)
 
 However, I still want to know if there is a way to specify a nice
 level for an entire users processes.

If you create a login class in /etc/login.conf and set the priority
capability, then assign a user to that class in /etc/master.passwd (the
class field is the 5th one, it's usually empty), then their priority
(aka niceness) should get set then they log in.  Remember to use the
'vipw' command to edit the passwd file, and to run 'cap_mkdb
/etc/login.conf' to rebuild login.conf.db.

-- 
Dan Nelson
[EMAIL PROTECTED]

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Mysql Hogging all system resources

2007-04-13 Thread Don O'Neil
I did this:

In my login.conf file (assuming that all you have to do is change whatever
you don't want to be the default):

nice:\
:priority=5:

In the user entry I put 'nice' in field 5.

When I rebuilt the login.conf db, nothing seems to have changed for th
user... A 'top' still shows his processes (old and new) with a nice of 0.

Is there something else I'm missing? 

-Original Message-
From: Dan Nelson [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 13, 2007 2:57 PM
To: Don O'Neil
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: Mysql Hogging all system resources

In the last episode (Apr 13), Don O'Neil said:
 Nevermind on the badly formatted number... I specified the full path 
 /usr/bin/nice and it worked ok this time :-)
 
 However, I still want to know if there is a way to specify a nice 
 level for an entire users processes.

If you create a login class in /etc/login.conf and set the priority
capability, then assign a user to that class in /etc/master.passwd (the
class field is the 5th one, it's usually empty), then their priority (aka
niceness) should get set then they log in.  Remember to use the 'vipw'
command to edit the passwd file, and to run 'cap_mkdb /etc/login.conf' to
rebuild login.conf.db.

-- 
Dan Nelson
[EMAIL PROTECTED]

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]