{"id":202,"date":"2008-09-17T00:48:00","date_gmt":"2008-09-17T00:48:00","guid":{"rendered":"http:\/\/blog.trungson.com\/?p=202"},"modified":"2008-09-17T00:48:00","modified_gmt":"2008-09-17T00:48:00","slug":"apache-versus-lighttpd","status":"publish","type":"post","link":"http:\/\/blog.trungson.com\/?p=202","title":{"rendered":"Apache versus lighttpd"},"content":{"rendered":"<p>Both run on the same server: Apache\/2.0.59 (port 80) &#038; lighttpd 1.4.19 (port 8080). 2 tests: dynamic &#038; static files. To make things a little realistic, it&#8217;s from a EU client to a US server. <\/p>\n<h4>Serving a dynamic file<\/h4>\n<p>eu$ ab -n 1000 -c 10 &#8220;http:\/\/us.server\/run-some-sql.php&#8221;<\/p>\n<pre>\nServer Software:        Apache\nServer Port:            80\nDocument Length:        824 bytes\nTime taken for tests:   36.51463 seconds\nTotal transferred:      1213118 bytes\nHTML transferred:       847886 bytes\nRequests per second:    27.74 [#\/sec] (mean)\nTime per request:       360.515 [ms] (mean)\nTime per request:       36.051 [ms] (mean, across all concurrent requests)\nTransfer rate:          32.84 [Kbytes\/sec] received\n\nConnection Times (ms)\n              min  mean[+\/-sd] median   max\nConnect:      158  158   0.3    158     162\nProcessing:   174  200  26.4    191     340\nWaiting:      173  199  26.3    191     340\nTotal:        332  358  26.4    349     498\n<\/pre>\n<pre>\nServer Software:        lighttpd\/1.4.19\nServer Port:            8080\nDocument Length:        921 bytes\nTime taken for tests:   35.406200 seconds\nTotal transferred:      1202655 bytes\nHTML transferred:       857071 bytes\nRequests per second:    28.24 [#\/sec] (mean)\nTime per request:       354.062 [ms] (mean)\nTime per request:       35.406 [ms] (mean, across all concurrent requests)\nTransfer rate:          33.16 [Kbytes\/sec] received\n\nConnection Times (ms)\n              min  mean[+\/-sd] median   max\nConnect:      158  158   0.6    158     167\nProcessing:   172  193  29.0    183     383\nWaiting:      172  192  29.0    183     383\nTotal:        330  351  29.1    341     541\n<\/pre>\n<p><span style=\"font-weight:bold;\">Apache: 27.74 requests\/sec<br \/>\nLighttpd 28.24 requests\/sec<\/span><\/p>\n<h4>Serving a static file<\/h4>\n<p>eu$ ab -n 1000 -c 10 &#8220;http:\/\/us.server\/img\/some-image.gif&#8221;<\/p>\n<pre>\nServer Software:        Apache\nServer Port:            80\nDocument Length:        14781 bytes\nTime taken for tests:   63.858434 seconds\nTotal transferred:      15060000 bytes\nHTML transferred:       14781000 bytes\nRequests per second:    15.66 [#\/sec] (mean)\nTime per request:       638.584 [ms] (mean)\nTime per request:       63.858 [ms] (mean, across all concurrent requests)\nTransfer rate:          230.31 [Kbytes\/sec] received\n\nConnection Times (ms)\n              min  mean[+\/-sd] median   max\nConnect:      157  158   0.5    158     164\nProcessing:   476  478   4.6    478     549\nWaiting:      158  159   4.0    159     228\nTotal:        634  636   4.6    636     707\n<\/pre>\n<pre>\nServer Software:        lighttp\/1.4.19\nServer Port:            8080\nDocument Length:        14781 bytes\nTime taken for tests:   63.736261 seconds\nTotal transferred:      14992000 bytes\nHTML transferred:       14781000 bytes\nRequests per second:    15.69 [#\/sec] (mean)\nTime per request:       637.363 [ms] (mean)\nTime per request:       63.736 [ms] (mean, across all concurrent requests)\nTransfer rate:          229.70 [Kbytes\/sec] received\n\nConnection Times (ms)\n              min  mean[+\/-sd] median   max\nConnect:      157  158   0.4    158     160\nProcessing:   476  478   2.2    478     491\nWaiting:      158  158   1.5    159     166\nTotal:        634  636   2.3    636     649\n<\/pre>\n<p><span style=\"font-weight:bold;\">Apache 15.66 requests\/sec<br \/>\nLighttpd 15.69 requests\/sec<\/span><\/p>\n<blockquote><p>Apache is very decent when there is a low concurrency level (about 10-20). When taken into account the stability, features, modules, it&#8217;s an excellent choice. Lighttpd under high load although can perform very well, it does suffer from an issue with PHP (current with 1.4.19 and 5.1.6), its backend fast-cgi became overloaded and gave out 500 errors to clients. Bad lighty, or bad PHP! Hope they got it fixed in 1.5 or some future version of PHP<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Both run on the same server: Apache\/2.0.59 (port 80) &#038; lighttpd 1.4.19 (port 8080). 2 tests: dynamic &#038; static files. To make things a little realistic, it&#8217;s from a EU client to a US server. Serving a dynamic file eu$ ab -n 1000 -c 10 &#8220;http:\/\/us.server\/run-some-sql.php&#8221; Server Software: Apache Server Port: 80 Document Length: 824 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"_links":{"self":[{"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/posts\/202"}],"collection":[{"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=202"}],"version-history":[{"count":0,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/posts\/202\/revisions"}],"wp:attachment":[{"href":"http:\/\/blog.trungson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=202"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=202"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=202"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}