0

We host our site on a GoDaddy VPS with 3 gb RAM. Some of our pages have a lot of dynamic content and interaction thru AJax calls. We started to notice that every 2nd or 3rd ajax call was taking a long time to complete. 1-2 secs vs. under 300 ms normally. this behavior is starting to affect the user inaction experience. We use PHP and MYSQL to generate the content. After lots of searching on the web and various server tuning experiments we are still at square 0.

We have gotten down to two very simple Cases that show our issue. We use chrome dev tools to watch the overal load time. Then we repetably press the reload button manually and see what happens.

1) Load a static img file. Load times are very consistent and nice and fast between 92ms and 98 ms.

2) We created a very simple php only page. Literally a microtime statement and for loop to do 1500 iterations and print statement to print out the exection time. No Mysql, no session_start,.... When we repeat the loading experiment with this page. The results are dramatically different

.

load time

1 - 259mS

2- 1.13 s
3 - 1.21 s
4 - 1.06 s
5 - 1.01 s
6 - 969 ms

At the time of these tests the Cpanel CPU usages never gets above.35% and memory usage is at 26%. Also the PHP print out of the execution time generated in the script is a very consistent 1.7 mSec

When looking at the details of the time, all of the extra time is in the TTFB (Waiting) category.

So we see that occasionally the server is capable of getting the dynamic content out in a reasonable amount of time. Clearly static content is just fine.

So we are a bit at a loss as to what to do next. 1) Is this just reality of a Shared VPS Server? 2) Is it a Godaddy problem that we need to address with them? 3) Is there a good way to debug where that extra time is going on our server??

Any help or insight would be greatly appreciated.

UPDATE: HERE is a screen shot of the tops during a repeated reload of the simple php script. A second php script was written to use CURL to reload the simple php 100 times in a row. tops screen shot

UPDATE 2: A friend with a shared hosting account put the simple php script on his site and we tested it versus our site and his performed consistently and fast when he accessed from his site and a 3rd site. But when we ran the same test from our site, it appeared that his site has the same performance issues ours did. Odd, leads us to conclude our server is just slow in both directions.

Dave

apache 2.4.25 php 5.6.30 mariaDb 10.1.21

3
  • Perform the test from the server itself to negate network latency flucutations. Also, leave GoDaddy. They're a horrible provider. Also, ditch cpanel.
    – EEAA
    Mar 14, 2017 at 22:09
  • Please show the CPU usage (e.g. from top) at the time the problem is occurring, and again at the time the problem is not occurring. Mar 14, 2017 at 22:24
  • The CPU usage during the repeated reload has been added above. I din't do the when not running because it's 0% usage. If it is still needed let me know. Mar 15, 2017 at 17:49

0

You must log in to answer this question.

Browse other questions tagged .