Linux – How to config thesql-server for heavy load

configurationdebianlinuxMySQL

Im in the process of setting up a new database server. I have been running a few mysql database servers before and it has been working okay.

But i would like to hear the recommended setup for my server. For example, what should i set the max connection, query_cache_size, table_cache and so on.

I have arround 4-600 per second:

Open tables: 112 Queries per second avg: 430.386.

The server i am setting it up on have the following configuration:

Linux version 2.6.32-5-amd64 (Debian 2.6.32-41squeeze2)

2x Intel Xeon X3440 @ 2.53GHz

4GB Ram

/, /boot, /tmp etc on Software RAID1, 2x 7200RPM SATA

Data location on Software RAID0, 2x7200RPM SATA

Im am going to place the mysql databases on the RAID0.

Am im missing anything? Let me know!

Thanks in advance, im looking forward to hearing from you 🙂

/Rasmus

Best Answer

it's impossible to give any good answer without knowing the type of workload, amount of data and usage patterns you have. honestly even with some knowledge of those at the end you'll have to find out by yourself what works best. that means lot's of benchmarking, tracking what goes on inside, regular checking of the slow query logs etc.

mysql's default settings are not really optimal for the modern hardware, as a reasonable starting point you can use values proposed by percona's mysql configuration wizard or mysqltuner.pl.

most probably inodb as a storage engine will be more optimal in your case. only 4GB of memory is quite little [but again i dont know what's the total size of your data set]. 2x Xeon X3440 is a lot in terms of the cpu power, you'd better have a lot of concurrent traffic and be able to fit all the data in memory, otherwise you'll not make much use of available processors just waiting for the disks to read/write the data.

side note: data on raid0? i hope you do have hot spare server with real-time replication or that the data is not important at all.

Related Topic