I have noticed that a new server that I am setting up is fairly slower than the current server, and made some stress tests/benchmarking to study the problem.
But after the tests I am getting contradictory results.
The machine details:
CentOS-6.4 (i386) Apache 2.4.4 PHP 5.4.17 mySQL 5.6.12 8GB RAM No cache
This is a Joomla site.
One note: This machine is currently only accessed via VPN (this may be relevant to the slowness)
I restarted httpd and mysql before doing the tests.
It is slower (not just feels, it is indeed slower when browsing, with any browser type (Safari, Firefox, Chrome, IE), I didn't time it, but it is slower than the current site and without any other user there).
Debug via Joomla:
I turned on the debug for the homepage, and it takes an average of 1.294 seconds to render (via the log of that debug) whereas testing in the current server (same config but with CentOS 6.3 and PHP 5.3) it takes an average of 0.762 seconds.
I tried 5 users concurrently, doing 1000 requests, this was done from another machine.
I really struggeled with this one, because for a static text file or a simple echo e a PHP it gave me this:
Connection Times (ms) min mean[+/-sd] median max Connect: 3 5 1.7 5 17 Processing: 4 7 1.5 6 20 Waiting: 4 6 1.5 6 19 Total: 8 11 2.5 11 27
And the Joomla homepage:
Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.3 0 9 Processing: 321 423 115.8 403 1737 Waiting: 309 406 114.0 386 1706 Total: 322 423 115.9 403 1737
Anyway, this is faster than the >1 second that I had when browsing (test 1).
I made a test with 5 concurrent users, doing 100 requests with 2 seconds ramp-up.
A static page gave me this average:
label # Samples Average Median 90% Line Min Max Error % Throughoutput KB/sec TOTAL 500 8 8 11 7 21 0.0 92.66123054114159 36.55051195329874
And the homepage gave me this:
label # Samples Average Median 90% Line Min Max Error % Throughoutput KB/sec TOTAL 500 445 436 507 366 969 0.0 10.331645831180907 856.8125096859179
Finally, the question:
Why is the browsing so slow, knowing that the stress test (either
jmeter) gave me much faster results?
(Are this tests adequate or should I try something else?)
(I don't know if the VPN can be at fault here, but that doesn't explain the browsing speed and the test speed, both need to be connected to the VPN).