We're experiencing performance issues on our website, and after reviewing our munin
graphs, the only metrics we've found in sync are Available entropy
and MySQL slow queries
, with the latter influenced by our number of logged in users:
Based on the wikipedia entropy page, my understanding is that entropy is the amount of randomness (here measured in bytes) that the system can use for various tasks, mainly cryptography and functions that require random input.
Since the peaks in available entropy
and MySQL slow queries
are occurring in sync and at regular interval, that the number of MySQL slow queries
is proportional to our number of Drupal users
whereas the peaks in available entropy
seem to be much more constant and less proportional to these 2 metrics, we're thinking available entropy
is the reflect of a root cause which, combined with the traffic to our website, is causing those slow queries (and not the opposite, slow queries influencing the entropy). Accordingly:
Q: What underlying problem do you think could cause regular peaks in available entropy that could have an influence on MySQL's ability to process queries?
Available entropy is utilized by cryptography mainly (to establish SSL connections, for example) and also by every program that calls random() or reads from /dev/random and /dev/urandom.
But in your case, I'm thinking that the available entropy is a consequence of mysql slow queries, and not a cause.
Entropy is collected by the kernel from sources of random activity in your hardware, like interruptions, network IOs or hard drive activity.
It looks like the quantity of available entropy spikes exactly when mysql became slow, and that might be because mysql triggered hard drive activity (such as rebuilding a bunch of indexes, or flushing a cache to disk, or swapping) and that activity generated entropy into the entropy pool.
Look at your mysql tuning parameters, and monitor your disk IOs, memory/swap usage, etc... at the same periods. Entropy is not very likely to be the cause of your problems, but maybe a normal consequence. The cause is probably mysql (or some other daemon on your system) consuming system ressources instead of serving queries.