Tuning Mongrel w/ httperf

Hello Friends,

I’ve recently watched the peepcode on httperf and read various blog
articles about performance testing web servers w/ httperf.

My problem is that my mongrel apps all seem to be running just
horribly slow. But since I’m the lone railser in my company I have no
idea if this slowness is correct or I’m doing blatantly wrong with my
server setups.

My Test Setup:
I’m testing by running httperf on a linux box with nothing else of
significance on the box. Running httperf is it’s sole purpose, for
now. The app is running on a VM with 512mb mem, not sure of the cpu
but it’s the machine is less than a year old. I’m running Apache 2.2
proxying to 5 mongrels. I even installed the eventmachine gem but it
didn’t seem to do anything.

The app is entirely behind ssl. I’ve created a special “hello_world”
action that has sessions disabled, all it does is render(:text =>
‘hello world’).

Unlike many others I’ve read about my best testing indicates about 10
replies/sec. Which just seems way too slow.

Any thoughts/ideas would be greatly appreciated.

A sample of my httperf output:

andy@hst-25-134:~$ httperf --server intranet3 --ssl --uri /public/
hello_world --hog --num-conns 100 --rate 15
httperf --hog --client=0/1 --server=intranet3 --port=443 --uri=/public/
hello_world --rate=15 --send-buffer=4096 --recv-buffer=16384 --ssl –
num-conns=100 --num-calls=1
Maximum connect burst length: 1

Total: connections 100 requests 100 replies 100 test-duration 37.394 s

Connection rate: 2.7 conn/s (373.9 ms/conn, <=100 concurrent
connections)
Connection time [ms]: min 9622.4 avg 24891.7 max 36704.4 median
27602.5 stddev 8464.1
Connection time [ms]: connect 2606.8
Connection length [replies/conn]: 1.000

Request rate: 2.7 req/s (373.9 ms/req)
Request size [B]: 78.0

Reply rate [replies/s]: min 0.0 avg 2.1 max 6.2 stddev 2.3 (7 samples)
Reply time [ms]: response 22283.5 transfer 1.4
Reply size [B]: header 226.0 content 11.0 footer 0.0 (total 237.0)
Reply status: 1xx=0 2xx=100 3xx=0 4xx=0 5xx=0

CPU time [s]: user 3.95 system 33.44 (user 10.6% system 89.4% total
100.0%)
Net I/O: 0.8 KB/s (0.0*10^6 bps)

Errors: total 0 client-timo 0 socket-timo 0 connrefused 0 connreset 0
Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0

Thanks,

Andy K.

I haven’t read your full post yet Andy (I’m on my way out the door to
work), but 5 mongrels, 512mb of ram… you must be pretty close to
choking the server down completely (swapping).