What max_connection should I set for MySQL?

I am using MySQL 5.1.35 Linux Centos database .

The Linux server has 2 GB of RAM with 14 GB of disk space .

I created web services using the Restlet framework in Java, which has a thousand users.

I want to set max_connection for maximum concurrent connections.

So please suggest me what should I install ? max_connection

Thanks in advance.

+5
source share
3 answers

You need to calculate the memory required by your MySQL engine. See manual here

MYISAM, , :

key_buffer_size + (read_buffer_size + sort_buffer_size) * max_connections = K bytes of memory 

2 .

, :

key_buffer_size = 1024MB + (read_buffer_size = 1MB + sort_buffer_size = 4MB) * 200 ~= 2GB

key_buffer_size - , read_buffer_size and sort_buffer_size - .

+11
+4

​​, :

  • ?
  • ?
  • ?

:

  • 2 Apache/PHP MySQL Linux .
  • Try not to run too many other things in any field; leave resources for Apache / PHP and MySQL.

You can get more information at MySQL setup .

0
source

All Articles