Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Jun 17, 2011 3:31 am 
Offline
Senior Member

Joined: Sun Mar 28, 2010 2:43 pm
Posts: 76
Website: http://tomakefast.com
Location: Texas
Any recommendation about this message from mysqltuner? It hasn't been 24 hours since I last updated my.cnf but I have two Linodes here saying:

*** MySQL's maximum memory usage is dangerously high ***
*** Add RAM before increasing MySQL buffer variables ***
sort_buffer_size (> 2M)
read_rnd_buffer_size (> 512K)

Feels like a fork in the road. What would you do?

1. Ignore the recommendation?
2. Figure out where to reduce the memory usage of mysql?
3. Increase these buffer variables despite the warning?
4. Upgrade?

_________________
PHP Development @ Tomakefast


Top
   
 Post subject:
PostPosted: Fri Jun 17, 2011 4:01 am 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
It's telling you that the current configuration is not suitable for the available quantity of system RAM. You either need to add more RAM (== $) or use less RAM (== tradeoff).

Without seeing the full output, it's tough to advise where to go first, but usually lowering max_connections is a very good first choice for reducing maximum possible RAM usage.

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject:
PostPosted: Fri Jun 17, 2011 12:41 pm 
Offline
Senior Member

Joined: Sun Mar 28, 2010 2:43 pm
Posts: 76
Website: http://tomakefast.com
Location: Texas
hoopycat wrote:
It's telling you that the current configuration is not suitable for the available quantity of system RAM. You either need to add more RAM (== $) or use less RAM (== tradeoff).

Without seeing the full output, it's tough to advise where to go first, but usually lowering max_connections is a very good first choice for reducing maximum possible RAM usage.


Ooh, thanks for the advice. I see this line:

"[OK] Highest usage of available connections: 5% (9/151)"

I assume that's what I need to watch. Pretty cool!

_________________
PHP Development @ Tomakefast


Top
   
 Post subject:
PostPosted: Fri Jun 17, 2011 12:56 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
151 max connections :shock: try setting max_connections = 20 in /etc/mysql/my.cnf and restart mysql.

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Fri Jun 17, 2011 2:26 pm 
Offline
Senior Member

Joined: Sun Mar 28, 2010 2:43 pm
Posts: 76
Website: http://tomakefast.com
Location: Texas
Yes, default Fedora install with "yum" gave me 151 connections on both Linodes, not sure if that's specific to Fedora or not.

If I make max_connections real low (20 like obs said) and I end up with some extra ram, where would I get he most bang for my buck with my.cnf?

Now the top recommendations I get for both Linodes from mysqltuner:
sort_buffer_size (> 4M)
read_rnd_buffer_size (> 2M)

Reading a few posts in Google, some people say sort_buffer_size should be left default, I think it was at 512k. Sounds like every megabyte you add to sort_buffer_size gets multiplied times max_connections, it adds up fast.

Anyway, that advice definitely made a difference, I feel much better about it now--no warning message through mysqltuner.

Maybe I'll post the entire mysqltuner report(s) here in a new thread after the traffic doubles and gets slow again ;-) I'm sure you're dying in anticipation.

_________________
PHP Development @ Tomakefast


Top
   
 Post subject:
PostPosted: Fri Jun 17, 2011 3:07 pm 
Offline
Senior Member

Joined: Fri Jan 09, 2009 5:32 pm
Posts: 634
ferodynamics wrote:
Yes, default Fedora install with "yum" gave me 151 connections on both Linodes, not sure if that's specific to Fedora or not.


the defaults in most distros assume tons of RAM. Check this library article for some pointers

http://library.linode.com/databases/mysql/fedora-14


Top
   
 Post subject:
PostPosted: Fri Jun 17, 2011 3:50 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
It mainly depends on what tables you're using. If you're using innodb then you can ignore myisam specific features like key_buffer if you're using myisam you can ignore innodb like buffer bool.

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group