<html style="direction: ltr;">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body bidimailui-charset-is-forced="true" style="direction: ltr;"
text="#000000" bgcolor="#FFFFFF">
I am working on a VPS. Earlier today there was a load spike that
made the server unresponsive for a period of time (around 10-15
minutes). Both ssh and web access were not responsive. After a while
the problem just stopped and the server started responding again.<br>
<br>
How can I go about diagnosing what caused the problem? I looked at
our application log around that time and I do not see anything out
of the ordinary. When I was finally able to get back into the server
and I ran top, the process that was using the most CPU was mysqld. I
don't know if that was the process that was causing the load spike
at the time.<br>
<br>
I saw several references to MySQLTuner so I downloaded and ran it.
It gave some suggestions but I am not a DBA so I don't understand
most of the suggestions and I don't want to make any changes without
understanding what is involved. Below are the suggestions MySQLTuner
came up with. If anyone can explain some of the suggestions or point
me in the direction of a good resource that would explain them I
would appreciate it.<br>
<br>
General recommendations:<br>
Configure your accounts with ip or subnets only, then update
your configuration with skip-name-resolve=1<br>
Adjust your join queries to always utilize indexes<br>
When making adjustments, make tmp_table_size/max_heap_table_size
equal<br>
Reduce your SELECT DISTINCT queries which have no LIMIT clause<br>
Read this before changing innodb_log_file_size and/or
innodb_log_files_in_group: <a class="moz-txt-link-freetext" href="http://bit.ly/2wgkDvS">http://bit.ly/2wgkDvS</a><br>
Variables to adjust:<br>
query_cache_size (=0)<br>
query_cache_type (=0)<br>
query_cache_limit (> 1M, or use smaller result sets)<br>
join_buffer_size (> 256.0K, or always use indexes with joins)<br>
tmp_table_size (> 16M)<br>
max_heap_table_size (> 16M)<br>
innodb_buffer_pool_size (>= 908M) if possible.<br>
innodb_log_file_size should be (=16M) if possible, so InnoDB
total log files size equals to 25% of buffer pool size.<br>
<br>
Thanks,<br>
<pre class="moz-signature" cols="72">--
David Suna
<a class="moz-txt-link-abbreviated" href="mailto:david@davidsconsultants.com">david@davidsconsultants.com</a></pre>
</body>
</html>