The Importance of Caching

Home

The Importance of Caching

Even a minimal amount of caching can greatly boost your site’s performance. Here’s a comparison on dmwl.net of no caching vs. drupal:

 

Connection Times (in milliseconds)

 

No Caching

  min mean [+/-sd] median max
Connect: 0 1 0.4 1 6
Processing: 585 3922 2318.1 3677 16137
Waiting: 556 3592 2247.3 3283 15278
Total: 586 3922 2318.1 3677 16137

 

 

Basic Caching

  min mean [+/-sd]

median

max
Connect: 1 1 0.4 1 6
Processing: 218 745 460.8 590 3516
Waiting: 216 736 446.1 588 3515
Total: 219 746 460.9 591 3517

 

Percentage of the requests served within a certain time (in milliseconds)

No Caching

  • 50% 3677
  • 66% 4539
  • 75% 5149
  • 80% 5493
  • 90% 6500
  • 95% 7354
  • 98% 11320
  • 99% 13797
  • 100% 16137 (longest request)

Basic Caching

  • 50% 591
  • 66% 761
  • 75% 945
  • 80% 1027
  • 90% 1360
  • 95% 1720
  • 98% 2214
  • 99% 2313
  • 100% 3517 (longest request)

 

Test Setup

ApacheBench was used with the following parameters:

ab -c 10 -n 1000 http://dmwl.net/index.php

(1000 requests, 10 concurrent requests) from a host remote to the server that can get 4MB/s sustained transfers.

 

Summary

I knew that caching would make a difference, but I wasn’t expecting a 14 second difference.  Even minimal caching helps systems under load.