I am in charge of a website that has about 150 unique users a day. The website hosts forms and gauge data, providing calculations and alerts. It runs well, but for some reason there are intermittent long response times; even for simple requests. For instance I will load one webpage in less than 2 seconds and then another time it will take 20+ seconds to respond. I've even had it take up to 60 seconds before. 3/4 of the time the pages will load fast, but 1/4 of the time it takes much longer to load the same exact same content. I used htop during the long response times to see if there was a program hogging all the CPU or memory, but I could not get consistent results. Sometimes the server load was high when I got a slow response and sometimes there was nothing running at all when I got a slow response time.

I am new to system administration so I'm struggling to find a good way to pinpoint the error. I've checked all of my logs and found nothing.

Here's a screenshot from atop when a request was taking a while to load: https://i.sstatic.net/Od8B6.jpg

and here's a screenshot from htop: https://i.sstatic.net/uFisY.jpg

1 Answer 1


Based on the resources that mysqld seems to be grabbing, it might prove useful to make sure that your settings for mysql are tuned appropriately.


Another helpful tool is iostat which can give you a more clear picture of what your disks are doing at the time of the stall.

And there's always tcpdump, but I might wait until you've exhausted the internal strategies before digging that deep..

  • Thanks for the help. It turns out it was due to a mix of inefficient code and my cruddy internet connection at my house.
    – IT_Guy
    Commented Feb 19, 2016 at 16:42

You must log in to answer this question.

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