[Mongrel] Memory leaks in my site

Ken Wei 2828628 at gmail.com
Wed Mar 7 10:55:50 EST 2007


Following is the newest test case i took:

* create a fresh rails app
* then create a controller, a model and a view.
* the model is just a simple table containing id and name.
* use httperf to beat the url /book/show/1 by the following steps:
    1) httperf --server xxx --port 3000 --rate 50 --uri /book/show/1
--num-call 1 --num-conn 2000
    2) httperf --server xxx --port 3000 --rate 60 --uri /book/show/1
--num-call 1 --num-conn 2000
    3) httperf --server xxx --port 3000 --rate 70 --uri /book/show/1
--num-call 1 --num-conn 2000
    4) httperf --server xxx --port 3000 --rate 80 --uri /book/show/1
--num-call 1 --num-conn 2000

thereinto, 1), 2), 3) 4) were passed,  the memory usage of 1), 2), 3) were
normal 30~32M, however, 4) up to 60M and never recover again.
this is the report of 4):
--------------------------------------------------------
httperf --client=0/1 --server=192.168.1.131 --port=3000 --uri=/book/show/1
--rate=80 --send-buffer=4096 --recv-buffer=16384 --num-conns=2000
--num-calls=1
Maximum connect burst length: 1

Total: connections 2000 requests 2000 replies 2000 test-duration 32.065 s

Connection rate: 62.4 conn/s (16.0 ms/conn, <=482 concurrent connections)
Connection time [ms]: min 24.0 avg 3091.5 max 12706.6 median 2240.5 stddev
2532.5
Connection time [ms]: connect 0.2
Connection length [replies/conn]: 1.000

Request rate: 62.4 req/s (16.0 ms/req)
Request size [B]: 75.0

Reply rate [replies/s]: min 49.4 avg 61.2 max 73.6 stddev 8.9 (6 samples)
Reply time [ms]: response 3091.3 transfer 0.0
Reply size [B]: header 267.0 content 1522.0 footer 0.0 (total 1789.0)
Reply status: 1xx=0 2xx=2000 3xx=0 4xx=0 5xx=0

CPU time [s]: user 1.00 system 31.06 (user 3.1% system 96.9% total 100.0%)
Net I/O: 113.5 KB/s (0.9*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
------------------------------------------------------------------------------

i also repeated the 4) 2 times.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070307/d7977e1f/attachment-0001.html 


More information about the Mongrel-users mailing list