Posts Tagged ‘Lighttpd’

FreeBSD环境下的Lighttpd 参数配置与性能优化

星期三, 三月 25th, 2009

简单说一下:Lighttpd是一个轻量级的Web 服务器,支持FastCGI, CGI, Auth, 输出压缩(output compress), URL重写, Alias等重要功能。它具有非常低的内存开销,cpu占用率低,效能好,以及丰富的模块等特点。其静态文件的响应能力远高于Apache,可谓Web服务器的后期之秀。 许多技术专家认为,在Web 服务器中Lighttpd比Apache更小更轻量,却拥有比后者更高的性能。虽然Lighttpd在Web服务器方面只占很小的市场份额,“但它正极速增长,日后必将是Web服务器领域的有力竞争者。” 针对我们的普遍应用情况下,对配置文件进行一些修改。Time per request: 能达到0.65 [ms]左右相对于以前测的0.734[ms]左右,性能有很大提高。如果有大量的时间对每个性能指标进行测试,去掉不必要的模块和特性,应该在性能上还会有所提高,估计最好能到0.61[ms]左右。最近测试如下: lighttpd 配置文件:去掉了很多不必要的特性。 1 2 3 4 5 6 7 8 9 #######lighttpd.conf. server.port = 7983 , server.modules = ("mod_access") server.document-root = "/usr/home/yangjian/lighttpd/doc/" server.pid-file = "/usr/home/yangjian/lighttpd/lighttpd.pid"  mimetype.assign = ( ".html" => "text/html", ".js" => "text/javascript", ) server.max-keep-alive-requests =4000 dir-listing.activate = [...]