Re: Mysql Hogging all system resources
In response to "Don O'Neil" <[EMAIL PROTECTED]>: > 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? Did you log the user out/restart all his processes? I expect the priority is applied at login time and isn't going to be re-evaluated on a continual basis. > > -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] > > > ___ > [EMAIL PROTECTED] mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" -- Bill Moran http://www.potentialtech.com ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
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] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
RE: Mysql Hogging all system resources
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] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
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 ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
RE: Mysql Hogging all system resources
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] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
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 ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
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 ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Mysql Hogging all system resources
On Apr 12, 2007, at 4:18 PM, Don O'Neil wrote: This isn't exactly what I want to do. According to the FreeBSD Handbook, by defining a CPU limit it will just kill any process that uses more than the limit. What I want to do is effectively throttle the process so it doesn't use up more than a certain % CPU, but still lives, esentially taking longer to process than if it had unlimited resources. That way the process still runs and the system isn't taken to it's knees. Use the nice or renice commands to lower the priority of the MySQL server so that it will not preempt other processes which want to run at normal priority? -- -Chuck ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
RE: Mysql Hogging all system resources
This isn't exactly what I want to do. According to the FreeBSD Handbook, by defining a CPU limit it will just kill any process that uses more than the limit. What I want to do is effectively throttle the process so it doesn't use up more than a certain % CPU, but still lives, esentially taking longer to process than if it had unlimited resources. That way the process still runs and the system isn't taken to it's knees. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bill Moran Sent: Thursday, April 12, 2007 1:32 PM To: Don O'Neil Cc: [EMAIL PROTECTED] Subject: Re: Mysql Hogging all system resources In response to "Don O'Neil" <[EMAIL PROTECTED]>: > I have a customer that loaded up a HUGE table and was doing all sorts > of fancy stuff in it, and not waiting for the process to finish before > sending the same query, and eventually loading up the server to the > point where the only thing I could do was unplug it. > > 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. man login.conf should tell you all you need to know. -- Bill Moran http://www.potentialtech.com ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Mysql Hogging all system resources
In response to "Don O'Neil" <[EMAIL PROTECTED]>: > I have a customer that loaded up a HUGE table and was doing all sorts of > fancy stuff in it, and not waiting for the process to finish before sending > the same query, and eventually loading up the server to the point where the > only thing I could do was unplug it. > > 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. man login.conf should tell you all you need to know. -- Bill Moran http://www.potentialtech.com ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"