Search code examples
performancemacosapacheapachebench

ab (Apache Bench) issues on OS X


I am having frustrating issues with trying to perform a highly concurrent test using ab (apache bench) on OS X. A snippet of the output looks like:

Completed 1998 requests
Completed 2664 requests
Completed 3330 requests
apr_pollset_poll: The timeout specified has expired (70007)

The command I am running is something like: (I would like the concurrency to be even higher! My goal is to get at least 20,000 rpm to hit the server)

ab -k -r -c 400 -n 60000 [URL HERE]

Has anyone run into this -- love a push in the right direction? And I would love to do this on my mac.

My Environment:

  • OS X : 10.6.8
  • httpd : Apache/2.2.20 (Unix)
    • Architecture: 64-bit
    • Server MPM: Prefork
    • threaded: no
    • forked: yes (variable process count)
  • ab : Version 2.3 (built from latest apache http beta)
  • ulimit -a yields:
    • core file size (blocks, -c) 0
    • data seg size (kbytes, -d) unlimited
    • file size (blocks, -f) unlimited
    • max locked memory (kbytes, -l) unlimited
    • max memory size (kbytes, -m) unlimited
    • open files (-n) 1024
    • pipe size (512 bytes, -p) 1
    • stack size (kbytes, -s) 8192
    • cpu time (seconds, -t) unlimited
    • max user processes (-u) 266
    • virtual memory (kbytes, -v) unlimited

Solution

  • I have found an awesome utility that solved my problem elegantly:

    Bees with Machine Guns!!

    Repository: https://github.com/newsapps/beeswithmachineguns

    Blog entry about it: http://blog.apps.chicagotribune.com/2010/07/08/bees-with-machine-guns/