Anonymous (not verified) on November 13, 2007 - 2:28pm.
Performed quite aggressive test with MILLIONS of http queries and UNABLE to confirm memory leaks at least in lighttpd core itself + basic modules allowed.
My test machine (actually my destop)
Configuration: AMD Athlon 64 3800+ x2, 1Gb RAM, etc.
OS: Kubuntu x64 version 7.10
Server: lighttpd 1.4.18 (default version taken from repositories, seems to be current one)
Enabled modules are: “modalias”, “modaccess”, “modstatus”, “modaccesslog”
What has been done?
1) I did measured memory consumption immediately after daemon startup. Not a completely fair since this is not a “cruiser mode” (no users served) but let’s be completely honest and fair, we will measure ALL memory eats.So here we go.All sizes are in Kb.
VmSize: 45460
VmRss: 924
2) I’d performed 1 000 000 http requests, 500 in parallel. Using localhost for speed. I did used http_load tool (great tool to load servers from thttpd web site). File urls - contain just one URL - single file near 4.7Kb in size.
Command was the following:
# ./http_load -checksum -verbose -parallel 500 -fetches 1000000 urls
--- 60.0011 secs, 565964 fetches started, 565934 completed, 30 current
1000000 fetches, 500 max parallel, 4.804e+09 bytes, in 105.534 seconds
4804 mean bytes/connection
9475.63 fetches/sec, 4.55209e+07 bytes/sec
msecs/connect: 4.04955 mean, 9003.25 max, 0.024 min
msecs/first-response: 1.26731 mean, 659.119 max, 0.129 min
HTTP response codes:
code 200 -- 1000000
3) Looking on eatten memory:
VmSize 47036
VmRss 2692
Hey?Looks like memory leak? Really? Nope, wrong! Just entering “cruiser mode”. Some proof needed, yeah? Easily.
4) Re-running this command yet another 4 times.That is it. 4M http requests done.
5) Let’s look on memory, it’s all about RAM, right?
VmSize 47036
VmRss 2692
Wow.There is still 2692Kb eatten on my x64 system and number is no longer increases, even after some extra 4M requests were served.So, this value is stable enough.
Repeated more and more.9M requests done,No change.Cool, yeah?So where are the leaks?And wtf I have to restart server?
P.S. I can assume some module may be flawed. Also looks like server can increase memory usage once this needed and not willing to give memory back.Still not a memleak though since this value is static and never grows and only depends on amount of simultaneous connections and file size to send.Yes, if you’ll do bigger files transfers in a millions, more memory can be wasted (I seen up to 48Mb VmSz and ~4Mb VmRss on 1 000 000 fetches of 9Mb file, 500 in parallel).However this is a peak value, it DOES NOT increases ever.You can re-execute millions requests again and again, nubmer will not increase.
Performed quite aggressive test with MILLIONS of http queries and UNABLE to confirm memory leaks at least in lighttpd core itself + basic modules allowed.
My test machine (actually my destop) Configuration: AMD Athlon 64 3800+ x2, 1Gb RAM, etc. OS: Kubuntu x64 version 7.10 Server: lighttpd 1.4.18 (default version taken from repositories, seems to be current one) Enabled modules are: “modalias”, “modaccess”, “modstatus”, “modaccesslog”
What has been done?
1) I did measured memory consumption immediately after daemon startup. Not a completely fair since this is not a “cruiser mode” (no users served) but let’s be completely honest and fair, we will measure ALL memory eats.So here we go.All sizes are in Kb. VmSize: 45460 VmRss: 924
2) I’d performed 1 000 000 http requests, 500 in parallel. Using localhost for speed. I did used http_load tool (great tool to load servers from thttpd web site). File urls - contain just one URL - single file near 4.7Kb in size.
Command was the following:
3) Looking on eatten memory: VmSize 47036 VmRss 2692 Hey?Looks like memory leak? Really? Nope, wrong! Just entering “cruiser mode”. Some proof needed, yeah? Easily.
4) Re-running this command yet another 4 times.That is it. 4M http requests done.
5) Let’s look on memory, it’s all about RAM, right? VmSize 47036 VmRss 2692 Wow.There is still 2692Kb eatten on my x64 system and number is no longer increases, even after some extra 4M requests were served.So, this value is stable enough.
Repeated more and more.9M requests done,No change.Cool, yeah?So where are the leaks?And wtf I have to restart server?
P.S. I can assume some module may be flawed. Also looks like server can increase memory usage once this needed and not willing to give memory back.Still not a memleak though since this value is static and never grows and only depends on amount of simultaneous connections and file size to send.Yes, if you’ll do bigger files transfers in a millions, more memory can be wasted (I seen up to 48Mb VmSz and ~4Mb VmRss on 1 000 000 fetches of 9Mb file, 500 in parallel).However this is a peak value, it DOES NOT increases ever.You can re-execute millions requests again and again, nubmer will not increase.