Drupal 6: Benchmarking and Block Cache Performance Revisited

As a follow up to an earlier article I posted about Drupal 6 performance, and please bear with my learning curve for a moment, I figured out by 'accident', and a lot of investigation, that it matters very much the order one uses when they 'generate content' with the devel module for benchmarking purposes. My previous tests were done incorrectly - I inadvertently created a bunch of nodes that weren't assigned to any terms or users and vice versa. The result of correcting this error means that a no-cache-enabled-baseline takes much longer to complete than when I had things setup incorrectly.

...happily, the point of this article isn't that I'm a total goof.

No, the good news out of this ordeal is that now when block-cache-disabled performance is compared to block-cache-enabled performance the results are MUCH more substantial than previously noted (and thus Drupal 6 is going to be that much faster than it's predecessor Drupal 5 for authenticated users):

2489.69 ms (request time for auth user, no-caching of any kind)
-878.09 ms (request time for auth user, block-caching on)
--------
1,611.6 (difference) / 2489.69 =
64.73% improvement w/ block cache on

With the block caching on, the mean processing time is 876 ms with a sd of 91.9 ms while the base install results in 2481 ms mean processing time and sd of 91.9. Even at the upper end of the standard deviation, the block-cached processing time is 967.9 ms, which is far below the low end of the standard deviation (2080.1 ms) for the non-block-cached test. Looks like a clear improvement - 64.7 percent improvment using just the means.

The benchmarks are posted here so that everyone can do their own math. If you'd like to check the validity of my installation/numbers - feel free to download a tarball which includes all the files and a db dump. Username/pass for user 1 = superadmin

BENCHMARKS

Benchmarks using 10,000 nodes, 5000 comments, 15 categories, 250 terms, 2000 users and with the following blocks enabled:

BLOCKS ENABLED
Recent comments 
User login
Navigation
Active forum topics
New forum topics
Who's online

=====

AUTHENTICATED USER - NO CACHE
Concurrency Level:      5
Time taken for tests:   248.969 seconds
Complete requests:      500
Failed requests:        0
Broken pipe errors:     0
Total transferred:      9719000 bytes
HTML transferred:       9539500 bytes
Requests per second:    2.01 [#/sec] (mean)
Time per request:       2489.69 [ms] (mean)
Time per request:       497.94 [ms] (mean, across all concurrent requests)
Transfer rate:          39.04 [Kbytes/sec] received

Connnection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0     0    0.0      0     0
Processing:  1101  2481  400.9   2575  3733
Waiting:     1101  2481  400.9   2575  3733
Total:       1101  2481  400.9   2575  3733

=====

AUTHENTICATED USER - BLOCK CACHE ON
Concurrency Level:      5
Time taken for tests:   87.809 seconds
Complete requests:      500
Failed requests:        0
Broken pipe errors:     0
Total transferred:      9709500 bytes
HTML transferred:       9530000 bytes
Requests per second:    5.69 [#/sec] (mean)
Time per request:       878.09 [ms] (mean)
Time per request:       175.62 [ms] (mean, across all concurrent requests)
Transfer rate:          110.58 [Kbytes/sec] received

Connnection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0     0    0.0      0     0
Processing:   539   876   91.9    874  1382
Waiting:      539   876   92.0    874  1382
Total:        539   876   91.9    874  1382

13 August, 2007

Comments

Bravo

Looks very impressive :) I am glad that my little benchmarking text is being picked up.

Time per request: 878.09 [ms] (mean)
is also very slow, can not accept to build a bigger site.
Is there other ways to enhance the performance of drupal?

Server Software: Apache/2.2.9
Server Hostname: hunrun.com
Server Port: 80

Document Path: /
Document Length: 56992 bytes

Concurrency Level: 1
Time taken for tests: 22.704 seconds
Complete requests: 500
Failed requests: 0
Write errors: 0
Total transferred: 28771517 bytes
HTML transferred: 28496000 bytes
Requests per second: 22.02 [#/sec] (mean)
Time per request: 45.408 [ms] (mean)
Time per request: 45.408 [ms] (mean, across all concurrent requests)
Transfer rate: 1237.55 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 0
Processing: 35 45 57.7 36 1309
Waiting: 31 40 50.1 32 1136
Total: 35 45 57.7 36 1309

Percentage of the requests served within a certain time (ms)
50% 36
66% 38
75% 47
80% 57
90% 63
95% 67
98% 69
99% 70
100% 1309 (longest request)