mod_perl - Benchmarking

mod_perl

What are some available performance benchmarking utilities?

Time::HiRes
ab (ApacheBench, part of Apache distribution
httperf
http_load
rashme
Apache::Timeit
GTop
Apache::VMonitor
BSD::Resource
Apache::Status

What are considerations that affect performance?

  1. OS must be stable
  2. OS must have good memory management
  3. Say no to memory leak (OS and libraries)
  4. OS must have memory sharing
  5. RAID
  6. Reliable NIC
  7. Load balancing & clustering
  8. Single strong machine versus many weaker machines
  9. RAM (no swapping)
  10. The diagnostics pragma slow thing down significantly only when warnings are generated.
  11. The KeepAliveTimeout setting should be reduced to 5 rather than 15 (default)
  12. The MaxKeepAliveRequest should be the maximum number of elements served in a single page. For example, if a page on your site contains 5 images, 1 mp3, 1 css, your MaxKeepAliveRequest should be 8. 5 + 1 + 1 + 1 (for the page itself) = 8.
  13. KeepAlive should be off for mod_perl-only servers. All static content should be on non-mod_perl servers.
  14. SSL connection benefit the most from KeepAlive On in cases where you haven't configured the server to cache session IDs.
// startup.pl:

use DBI();        // The parenthesizes should be used to prevent importing
use Carp()
use DBD::mysql()
use CGI();
CGI->compile(':all');

// httpd.conf:
PerlRequire /path/to/startup.pl
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License