Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm running a dedicated MySQL server on an m1.large EC2 instance, which has 7.5 GB of RAM.

What might be a good number to set my max_connections value to?

share|improve this question
add comment

2 Answers

This blog describes a simple method to calculate MySQL connections. Adding link here just to make this page useful. May you have already found an answer.

http://mysqlhacker.com/kabir/performance/calculating-maximum-connections-for-mysql-server.html

share|improve this answer
    
found the myisam_sort_buffer_size which I could definitely use if it can help. However I have successfully used 6000 connections on 32GB Ram in RDS, but it was one of those omgwtf! moments –  Vangel Sep 15 '11 at 14:48
add comment

The answer depends on the expected workload: the expected number of concurrent connections and the expected time of a connection. The default value is set to 100. For a good and dedicated machine, you can increase it to some value like: 200, 500, or even more! You can set it to some value and watch your database connections. When you feel there is a need, you can increase it more. Of course, the default value might be small and should be increased.

The max_connections is not the only parameter to look at. There are other things that need to be done to achieve a better performance (like query optimization). Increasing the max_connections might not be always the best thing to do.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.