0

I'm working on a wordpress website:

- it's hosted on a VMWARE Linux Virtual Server with 2 core and 4GB RAM.
- it's the only website (development server) so no others website access.
- has Apache Module mod_deflate on text, html, javascript, css, xml
- it runs a lot of javascript stuff and the total size of the page is about 1,6 MB
- average cpu load is very low (0% to 5%)
- the server has 1GB RAM Free
- my ISP verified SAN access statistics and latency times are very low (some ms)

This is a load time test on Pingdom Website Speed Test: http://tools.pingdom.com/fpt/#!/dMWeVi/http://www.watcheswholesale.eu/

it shows 3,9 seconds of wait time.

Is there a "check list" to understand why the server lose these seconds before sending content to the browser?
Thanks

mascor
  • 25
  • 2
  • 8
  • I have no clue how the pingdom.com servers act. maybe it's their problem? Do you have any actual performance issues? complaints from clients? – Nanne Sep 02 '13 at 09:27
  • 1
    The first step in sorting out speed issues is to understand what is making your site slow. Try [profiling](http://stackoverflow.com/questions/21133/simplest-way-to-profile-a-php-script) your site. – Anigel Sep 02 '13 at 09:27
  • @Nanne All that is saying is that Pingdom has sent the request and has waited nearly 4 seconds before it got anything back from the server. Ive just had a 4.2 seconds time till first byte response from server – Anigel Sep 02 '13 at 09:29
  • @Nanne: is very difficult to profile a wordpress site with tens of plugins...the only way is trying to disable and run again the test. – mascor Sep 02 '13 at 09:36
  • to verify server network performance I installed a new wordpress site with standard theme on the same server: http://tools.pingdom.com/fpt/#!/esRGi1/http://ingrosso-orologi.com/ only 300 ms of wait time. So I can exclude Network/VPS problem: is a software optimization problem.... – mascor Sep 02 '13 at 09:47

2 Answers2

1

I did a profiling an a wordpress installation once, being embarrassed by such a loading time.

It turned out that the time can be reduced by half with some opcode cache like APC, and another half been taken by parsing an enormous .po localization file. Did a quick patch to cache it in a php array and finally got loading time within a second (which is still too much but barely bearable).

Now I am thinking that removing useless languages from that gettext file would also help.

The profiling itself was as silly as adding microtime(1)-based labels all ove the code

Your Common Sense
  • 156,878
  • 40
  • 214
  • 345
  • May be. But it took me a half an hour (an some thinking of where to put my labels). This way I've got sensible timetable which contained the only values I need instead of wall of numbers from xdebug. May be my idea of using xdebug is wrong though. Would be nice to see a good example – Your Common Sense Sep 02 '13 at 09:37
  • Generally takes < 5 minutes to add xdebug and get a proper profile of your code showing not only what was taking all the time, but what was being called and how many times things were called – Anigel Sep 02 '13 at 09:39
  • The site is already running a cache function that is bundled with the theme. – mascor Sep 02 '13 at 09:40
  • @Anigel Thank you for the pointers. But I'd like to see not the advertising of the theoretical benefits but short, clean and comprehensible timetable. – Your Common Sense Sep 02 '13 at 09:42
  • @mascor that's indeed a problem. – Your Common Sense Sep 02 '13 at 09:42
  • @YourCommonSense We will agree to disagree then I see a clear comprehensive timetable which I can then drill down in to get much more useful information if needed which can be implemented and disabled in a fraction of the time it takes to pepper your code with random Microtime labels – Anigel Sep 02 '13 at 11:04
  • @Anigel okay, your apologies accepted. Thank you for your time. Cheers! – Your Common Sense Sep 02 '13 at 11:09
0

Your fundamental problem is the site is taking too long to generate the page - I'd start by looking at how many DB calls are being made and how long they are taking - the query logs can help you with this.

You also need to turn on keep-alive so that you are reusing TCP connections but that'll only make a little bit of difference.

Andy Davies
  • 5,794
  • 2
  • 26
  • 21