Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

up vote 7 down vote accepted

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.

share|improve this answer
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. –  user64204 Apr 12 '12 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. –  anonymous-one Jun 16 '12 at 15:15
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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