5

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:

enter image description here enter image description here enter image description here

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?

1 Answer 1

8

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.

2
  • I'm not saying entpropy is the cause, but the the reflect of a root cause. I like your explanation about disk activity generating entropy as that could well be the case. Let's see if someone has a better explanation.
    – Max
    Apr 12, 2012 at 11:42
  • this is exactly what is happening here. for whatever reason, your mysql queries start to stack, and thus consume a lot less entropy and thus you see the spikes in available entropy munin is showing you. Jun 16, 2012 at 15:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .