*** Add RAM before increasing MySQL buffer variables ***
*** MySQL's maximum memory usage is dangerously high ***
*** Add RAM before increasing MySQL buffer variables ***
sortbuffersize (> 2M)
readrndbuffer_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?
6 Replies
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.
@hoopycat:
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!
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:
sortbuffersize (> 4M)
readrndbuffer_size (> 2M)
Reading a few posts in Google, some people say sortbuffersize should be left default, I think it was at 512k. Sounds like every megabyte you add to sortbuffersize 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
@ferodynamics:
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