Munin print-screen for reference: http://img29.imageshack.us/i/munin.gif/

I monitor a web-server which basically runs apache+php+mysql. No emails, no FTP, pure web-server.

The server is serving pages slow...

I think the bottleneck is MySQL configuration.

Quick Facts:

  • most of queries are SELECTs, very few INSERTs and rare DELETEs
  • mirror backup runs around 3AM - represented by the red line at the image provided
  • I use tuning-primer.sh to help me adjust MySQL
  • Server uptime is 26 days
  • 2GB ram, Pentium(R) Dual-Core E5200 @ 2.50GHz, 7200 disk
  • I have log_slow_queries enabled and long_query_time = 1
  • Today I switched on the log-queries-not-using-indexes. That's why the slow-queries graph is displaying a peek

MyQSL tweaks I did on the my.cnf:

  • join_buffer_size = 10M
  • max_heap_table_size = 200M
  • tmp_table_size = 300M
  • init-connect = 'SET NAMES utf8; SET CHARACTER SET utf8;'
  • default-character-set = utf8
  • character-set-server = utf8
  • open_files_limit = 2048
  • log-queries-not-using-indexes

  • key_buffer = 256M
  • max_allowed_packet = 16M
  • thread_stack = 192K
  • thread_cache_size = 8
  • max_connections = 100

  • table_cache = 1024
  • thread_concurrency = 10

  • query_cache_limit = 4M
  • query_cache_size = 64M

Why yesterday and before everything was working OK? We didn't add new code or having a peek of visitors.

By looking at munin's graph do you see anything odd beside the slow-queries peek?

Do you recommend installing other tools in order to improve monitoring?


Number of processes has jumped, as has number of "Established" TCP connections (nearly 2x) -- I would track down the cause of those and see if it's related to the performance nosedive.

  • I ran top -b -i -n 20 >> ./top_procs to track the top process. Looks like apache was the problem. I raised apache configurations and the server is now responding very fast. StartServers 25 and Keepalive off to web-services virtual hosts. – cmancre Apr 8 '11 at 18:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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