Performance issues

I really does not know what to do.

I have 2 wordpress sitea on a small linode (recently autoupgraded to 1GB Memory)

the sites are:

www.dmep.it (about 200 page view per day, w3c total cache and cloudflare)

www.wildstylers.com (about 800 page view per day no wordpress caching enabled)

to bypass cloudflare on www.dmep.it you can try direct.dmep.it

it take about 8/10 seconds for the php to render a single page.

I tried a lot of different configurations:

Standard apache modphp, apache modphp with apc or xcache, fcgi (no cache, apc and xcache), fastcgi…

i tried switching to mpm worker and even php-fpm.

Currently i'm in mpm_worker, php-fpm, fastcgi with max process from apache = 1 and php autospawn to 6 process

The server has about 200MB free ram.

Doing some tests with ab i changed apache, mods, cache and php.ini values but nothing better happens.

It seem that the vps has 8 core now, every php process use only one and every page request go to a single php process so from 1 to 6 concurrent request i have no difference in my testing and the server is serving a page in more than 10 seconds with 75% idle time.

I hope i'm doing something really wrong and some help could be appreciated.

6 Replies

Looking at the waterfall in Chrome, all the lag is the initial page generation. My guess is that you're using some plugin that is really slow (or you're using a bunch of plugins). It's been my experience that that is what drags down most WP sites.

I also see that you're using the disk cache for W3 Total Cache. Try disabling it or switching to APC as the cache, you might be generating a lot of disk I/O that is slowing things down.

yep i know that is the initial page generation.What i'm wonderd is how possibile it take even 10 second to generate a page and processor stay at 75% idle

@youvnor:

yep i know that is the initial page generation.What i'm wonderd is how possibile it take even 10 second to generate a page and processor stay at 75% idle

All that means is that your issue isn't CPU-bound. Check my edited reply. Also check for any plugins that rely on 3rd party services as a part of the page generation (not that involve JS to hit a 3rd party).

i want to had to currently is going a lot faster compared to this morning, with the same configuration.

some minutes ago:

root@test:/# ab -n 20 -c 2 http://direct.dmep.it/la-pubblicita-e-i … olgimento/">http://direct.dmep.it/la-pubblicita-e-i-processi-a-basso-coinvolgimento/

This is ApacheBench, Version 2.3 <$Revision: 655654 $>

Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/

Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking direct.dmep.it (be patient)…..done

Server Software: Apache/2.2.16

Server Hostname: direct.dmep.it

Server Port: 80

Document Path: /la-pubblicita-e-i-processi-a-basso-coinvolgimento/

Document Length: 26793 bytes

Concurrency Level: 2

Time taken for tests: 25.946 seconds

Complete requests: 20

Failed requests: 15

(Connect: 0, Receive: 0, Length: 15, Exceptions: 0)

Write errors: 0

Total transferred: 541333 bytes

HTML transferred: 535853 bytes

Requests per second: 0.77 #/sec

Time per request: 2594.646 ms

Time per request: 1297.323 [ms] (mean, across all concurrent requests)

Transfer rate: 20.37 [Kbytes/sec] received

Connection Times (ms)

min mean[+/-sd] median max

Connect: 31 34 3.9 32 48

Processing: 872 2468 1080.4 2379 5065

Waiting: 809 2394 1077.6 2297 4974

Total: 903 2501 1080.0 2412 5098

Percentage of the requests served within a certain time (ms)

50% 2412

66% 2609

75% 2743

80% 2856

90% 5077

95% 5098

98% 5098

99% 5098

100% 5098 (longest request)

this morning:

Concurrency Level: 2

Time taken for tests: 131.611 seconds

Complete requests: 20

Failed requests: 16

(Connect: 0, Receive: 0, Length: 16, Exceptions: 0)

Write errors: 0

Total transferred: 541352 bytes

HTML transferred: 535872 bytes

Requests per second: 0.15 #/sec

Time per request: 13161.071 ms

Time per request: 6580.535 [ms] (mean, across all concurrent requests)

Transfer rate: 4.02 [Kbytes/sec] received

Connection Times (ms)

min mean[+/-sd] median max

Connect: 31 37 7.3 33 52

Processing: 7883 12606 4179.3 11749 22775

Waiting: 7623 12113 4039.0 11300 21597

Total: 7935 12643 4178.8 11781 22822

Percentage of the requests served within a certain time (ms)

50% 11781

66% 13132

75% 15679

80% 16854

90% 19603

95% 22822

98% 22822

99% 22822

100% 22822 (longest request)

@jasonlitka:

@youvnor:

yep i know that is the initial page generation.What i'm wonderd is how possibile it take even 10 second to generate a page and processor stay at 75% idle

All that means is that your issue isn't CPU-bound. Check my edited reply. Also check for any plugins that rely on 3rd party services as a part of the page generation (not that involve JS to hit a 3rd party).

i will try changing cache system, and tuning it.

What i mean about processor is that looking on top i have a single process going 100% till the page is generated and the idle is more than 75%….

if i make 4 concurrent request i will have four process at about 90% and the idle will be some more than 20%

i set w3c total cache to use APC instead of disk and thing are going better.

Is seems that it use processor better too, but could be only a feeling.

some stats

Concurrency Level: 1

Time taken for tests: 34.772 seconds

Complete requests: 20

median time: 1373ms

Concurrency Level: 2

Time taken for tests: 17.685 seconds

Complete requests: 20

median time: 1758ms

Concurrency Level: 4

Time taken for tests: 10.726 seconds

Complete requests: 20

median time: 1838ms

Concurrency Level: 8

Time taken for tests: 8.893 seconds

Complete requests: 20

median time: 2518ms

Concurrency Level: 20

Time taken for tests: 107.259 seconds

Complete requests: 200

median time: 9709ms

And with this concurrency level i have 35% idle processor constantly

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct