High number of MySQL threads when using mod_log_sql
Robert Krig <robert.krig-eKvI5edTgBgEAQKUCw3/[email protected]> Wed, 29 Feb 2012 10:47:15 +0100
| Newsgroups | gmane.comp.apache.mod-log-sql |
|---|---|
| Message-ID | <[email protected]> |
Hi there. I'm the admin for a very high volume website. Wie have 4 webservers which we use to distribute the load of our website. We would like to use mod_log_sql to log apache logs to a central MySQL database. So far, I've just enabled on of our webservers to log to a MySQL server running on a different host. What I find a bit worrying, is the number of MySQL threads which this causes. The one webserver I have logging to MySQL gets about 30-50 hits per second. And already this is causing about 150-200 MySQL server threads. The load on the MySQL server is extremely low. The host running the MySQL server is a 2x6 core Xeon Cpu with Hyperthreading, totalling 24 threads and equipped with 48GB of RAM. What I find puzzling is that our central MySQL Database Server, which we use as a backend for our website, uses only about 12-30 MySQL threads in total. Thats for all our webservers. Granted, this central database server uses SSD Harddrives for the database and handles 1500 Queries per second. But still. Is it normal for mod_log_sql to be using so many MySQL threads? Is there a way I could optimise this? Perhaps a tweak in the mysql server config or a parameter for mod_log_sql which I could try? I don't know if its gonna cause problems if MySQL has so many threads open. Especially considering that most of those seem to be "sleeping" when monitored with MyTOP. The MySQL server I use for logging, is on its own and is only used for logging. e.g. I'm worried about adding our other apache servers into the mix. Especially considering that the last two actually deal with 150-200 hits per second each. _______________________________________________ Download the latest version at http://www.outoforder.cc/projects/apache/mod_log_sql/ To unsubscribe send an e-mail to mod_log_sql-unsubscribe-7qY7E20V6GW73k+5HYS8LQqVMODqnSLI@public.gmane.org