2

As the title says I'm a newbie with this stuff but I'm willing to learn what I need to know. I'm simply ignorant atm. This is a Rackspace server with Ubuntu 15.10 running Apache2 using MySQL.

I have a PHP web app that runs with (not yet optimized) good load times on my local machine but stalls for about 2-4 seconds on page load/reload on the server. This seems to be an accumulating stall. The more time that passes the slower it seems to get.

Things I've tried to troubleshoot and other information:

  1. I've checked both Chrome network tools and pingdom.com and both reveal that the first initial request is where the longest wait, not local or external resources.
  2. Restarting apache helps a little but running the stop then start command seem to temporarily increase load speeds. One thing I noticed here is that I start to get quite a few entries under "CGroup: /system.slice/apache2.service" when I run the command "systemctl status apache2.service". I'm not sure if this should indicate anything to me or not. Should I have 10-20+ CGroup entries?
  3. I'm peaking at around 250m memory and 100% CPU. No idea why CPU is so high with so few users.
  4. Also, if it is pertinent, I am using nodejs, forever and socketio along side Laravel 5 though I don't think that any of this is the culprit for the long wait on the initial response.

What other reports or logs do I need to generate or look at to determine what might be the cause? I've heard some people having an issue with "resource leeching" and others with DDOS. How might I rule something like this out?

Here is a pingdom result of a faster load but still non-optimal. (I know, I need to bundle my scripts and styles ;) ) http://tools.pingdom.com/fpt/#!/jl6bX/http://barkerbot.com/

Thank you in advance!

1 Answer 1

1

Your page generation time is high. You need to:

  • Optimize your application, or increase CPU resources
  • Page caching could reduce the need for optimization, but only for anonymous users. Regenerating pages still takes time. On a busy site caching for even a small number of seconds can reduce server load.
  • Set up a CDN (content distribution network) like Cloudflare (which has a free plan). This will reduce the download time for your static resources
  • Change your headers to indicate that static resources should be cached, ideally for a week or more.

You may find this webpagetest.org test useful. It shows 11 - 15 second page load times - at that level people will be abandoning your website.

We'd need more information about your application and server to help much more.

You must log in to answer this question.

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