Randomly Slow Load Times

Ask questions about dedicated servers here and we and other users will do our best to answer them. Please also refer to the self-help section for tutorials and answers to the most commonly asked questions.
Post Reply
tenub
A semi-regular
A semi-regular
Posts: 29
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Tue Aug 27, 2013 6:28 am

Randomly Slow Load Times

Post by tenub »

I'm running Apache 2.4.6 + PHP 5.5.3 (FastCGI + Zend OPcache) + MySQL 5.6.13 on my VPS. No matter what page I load I seem to get random long load times, almost stalling it feels like. This problem still happens even when loading a simple directory view, ie. http://kz-endo.com/motd so I know it's not my index.php script that I wrote that's causing problems. It seems to happen more when initially loading a page or if waiting a while (5+ minutes) before refreshing the page. I have a feeling this is unrelated to my web server stack and that the issue lies within the network or machine itself but I could be wrong. Any ideas? I'm willing to provide more information if needed.
evil_master
A regular
A regular
Posts: 49
Joined: Fri Jun 17, 2011 3:57 pm

Re: Randomly Slow Load Times

Post by evil_master »

Does your server experience high CPU Load? if not, have you optimized your MySQL server? I have had problems with getting MySQL optimized well, but once I did I saw less slow-loads, the problem with slow-loads was not that the server was waiting MySQL, but rather than the HDD was burdened with read/write requests, which slow down the read requests for directory listings or anything else for that matter. Does this information help at all? Perhaps process explorer will help you further with this problem.
tenub
A semi-regular
A semi-regular
Posts: 29
Joined: Tue Aug 27, 2013 6:28 am

Re: Randomly Slow Load Times

Post by tenub »

I'm idling at 22-24% cpu usage and it peaks to a little over 60% usage when I load a php page from my own computer. This 60% is rather consistent as I have refreshed different pages multiple times and seen the usage increase in my remote desktop window. The process that causes this is php-cgi.exe which makes sense. When the stalling happens the cpu usage does not increase for several seconds until just before the page refreshes in my browser window. All other resources remain basically at their idle values or peak at negligible values. Since MySQL is a resource hog, I idle at around 1.3GB/2GB memory usage. When listing a directory such as /motd (ie. not utilizing MySQL or PHP) no resources noticeably increase, so when the stalling occurs I cannot tell what is happening, only that loading a script that uses PHP and/or MySQL is NOT the reason for the slow-down.
Post Reply