热搜:
下载http网络服务器(LightTPD for windows) 1.4.35 官方免费版

http网络服务器(LightTPD for windows) 1.4.35 官方免费版

更多
  • 软件大小:5.00MB (5,242,880 字节)
  • 软件类别:网络工具 -> 服务器区
  • 软件授权:免费软件      软件语言:简体中文
  • 更新时间:2019/12/01
  • 软件厂商:
  • 软件官网:
  • 应用平台:
标签
软件介绍
热度:0

Lighttpd是另外一种低内存占用率服务器,其性能卓异,而且稳定、灵活、高速。Lighttpd由Jan Kneschke开发,2003年发布。其CPU负载低,一大特色是应用了速度优化技术。Lighttpd对于那些饱受负载过高之苦的地方而言无异于雪中送炭。根据Netcraft公司2011年三月市场调查显示,Lighttpd目前排名第五,是YouTube、The Pirate Bay和Meebo等网站的首选网络服务器。

Lighttpd 是一个德国人领导的开源Web服务器软件,其根本的目的是提供一个专门针对高性能网站,安全、快速、兼容性好并且灵活的web server环境。具有非常低的内存开销、cpu占用率低、效能好以及丰富的模块等特点。

Lighttpd是众多OpenSource轻量级的web server中较为优秀的一个。支持FastCGI,CGI,Auth,输出压缩(output compress),URL重写,Alias等重要功能;而Apache之所以流行,很大程度也是因为功能丰富,在lighttpd上很多功能都有相应的实现了,这点对于apache的用户是非常重要的,因为迁移到lighttpd就必须面对这些问题。

特点:

相较于其他的网页服务器,lighttpd仅需少量的内存及CPU资源即可达到同样的效能。

lighttpd

Lighttpd是一个具有非常低的内存开销,cpu占用率低,效能好,以及丰富的模块等特点。lighttpd是众多OpenSource轻量级的web server中较为优秀的一个。支持FastCGI, CGI, Auth,输出压缩(output compress), URL重写, Alias等重要功能。

Lighttpd使用fastcgi方式运行php,它会使用很少的PHP进程响应很大的并发量。

Fastcgi的优点在于:

从稳定性上看, fastcgi是以独立的进程池运行来cgi,单独一个进程死掉,系统可以很轻易的丢弃,然后重新分配新的进程来运行逻辑.

从安全性上看, fastcgi和宿主的server完全独立, fastcgi怎么down也不会把server搞垮,

从性能上看, fastcgi把动态逻辑的处理从server中分离出来,大负荷的IO处理还是留给宿主server,这样宿主server可以一心一意作IO,对于一个普通的动态网页来说,逻辑处理可能只有一小部分,大量的图片等静态IO处理完全不需要逻辑程序的参与(注1)

从扩展性上讲, fastcgi是一个中立的技术标准,完全可以支持任何语言写的处理程序(php,java,python...)

nginx与lighttpd性能简单对比

做nginx和lighttpd的性能对比,可以在选择webserver上做个参考。

测试环境如下

Dell2950 4G内存,FreeBSD 8.2 release

#sysctl -a | grep CPUhw.model: Intel(R) Xeon(R) CPU5130@ 2.00GHz2x2颗内存4G#uname -aFreeBSD localhost.localdomain 8.2-RELEASE

php5.2.17,fastcgi方式,默认5进程测试,失败请求太多,改用20进程,无请求失败。

Nginx主要配置

events {

use kqueue;

worker_connections 102400;

}

写了个phpinfo用ab测试,内网IP,不考虑带宽因素。

# ab -n 100000 -c 1000 http://192.168.100.28/info.phpThis is ApacheBench, Version 1.3d <$Revision: 1.73 $> apache-1.3Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/Copyright (c) 2006 The Apache Software Foundation, http://www.apache.org/Benchmarking 192.168.100.28 (be patient)Completed 10000 requestsCompleted 20000 requestsCompleted 30000 requestsCompleted 40000 requestsCompleted 50000 requestsCompleted 60000 requestsCompleted 70000 requestsCompleted 80000 requestsCompleted 90000 requestsFinished 100000 requestsServer Software:nginx/1.0.0Server Hostname:192.168.100.28Server Port:80Document Path:/info.phpDocument Length:49457 bytesConcurrency Level:1000Time taken for tests: 86.578 secondsComplete requests:100000Failed requests:0Broken pipe errors: 0Total transferred:4977355920 bytesHTML transferred: 4961202790 bytesRequests per second:1155.03 [#/sec] (mean)Time per request: 865.78 [ms] (mean)Time per request: 0.87 [ms] (mean, across all concurrent requests)Transfer rate:57489.84 [Kbytes/sec] receivedConnnection Times (ms)minmean[+/-sd] median maxConnect:0 297888.8 116414Processing:20 555649.94219989Waiting: 18 555649.94219988Total: 20 852 1065.3473 10222Percentage of the requests served within a certain time (ms)50%47366%58475%69980%77690% 330895% 347398% 368899% 3817100%10222 (last request)

iostat -w 1

tty mfid0 da0 cd0 cpu

tin tout KB/t tps MB/s KB/t tps MB/s KB/t tps MB/s us ni sy in id

0 23 19.12 1 0.01 0.01 0 0.00 0.00 0 0.00 0 0 0 0 100

0 235 0.00 0 0.00 0.00 0 0.00 0.00 0 0.00 0 0 0 0 100

0 79 2.00 3 0.01 0.00 0 0.00 0.00 0 0.00 0 0 0 0 100

4 393 2.00 2 0.00 0.00 0 0.00 0.00 0 0.00 10 0 4 2 85

0 78 123.85 54 6.52 0.00 0 0.00 0.00 0 0.00 76 0 17 7 0

0 76 128.00 1 0.12 0.00 0 0.00 0.00 0 0.00 72 0 16 8 5

0 79 128.00 1 0.12 0.00 0 0.00 0.00 0 0.00 81 0 12 5 2

0 79 128.00 1 0.12 0.00 0 0.00 0.00 0 0.00 74 0 15 7 3

0 79 16.95 19 0.31 0.00 0 0.00 0.00 0 0.00 71 0 19 8 2

0 78 21.60 10 0.21 0.00 0 0.00 0.00 0 0.00 74 0 17 7 2

0 78 0.00 0 0.00 0.00 0 0.00 0.00 0 0.00 74 0 17 8 1

0 78 53.33 3 0.16 0.00 0 0.00 0.00 0 0.00 68 0 21 10 1

0 104 20.20 20 0.39 0.00 0 0.00 0.00 0 0.00 68 0 18 10 5

磁盘压力只在测试开始时大,并且因为所有东西都放在一台服务器,瞬间最高把CPU空闲率干到了0.3%,但实际上占用CPU最多的是ab,占了40%多,nginx占用不到40%

------------------------------------------------换lighttpd

server.max-fds = 8192

##

## Stat() call caching.

##

## lighttpd can utilize FAM/Gamin to cache stat call.

##

## possible values are:

## disable, simple or fam.

##

server.stat-cache-engine = "simple"

##

## Fine tuning for the request handling

##

## max-connections == max-fds/2 (maybe /3)

## means the other file handles are used for fastcgi/files

##

Server.max-connections = 4096

也是使用kqueue队列

# ab -n 100000 -c 1000 http://192.168.100.28/info.phpThis is ApacheBench, Version 1.3d <$Revision: 1.73 $> apache-1.3Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/Copyright (c) 2006 The Apache Software Foundation, http://www.apache.org/Benchmarking 192.168.100.28 (be patient)Completed 10000 requestsCompleted 20000 requestsCompleted 30000 requestsCompleted 40000 requestsCompleted 50000 requestsCompleted 60000 requestsCompleted 70000 requestsCompleted 80000 requestsCompleted 90000 requestsFinished 100000 requestsServer Software:lighttpd/1.4.28Server Hostname:192.168.100.28Server Port:80Document Path:/info.phpDocument Length:49127 bytesConcurrency Level:1000Time taken for tests: 83.107 secondsComplete requests:100000Failed requests:0Broken pipe errors: 0Total transferred:4932575365 bytesHTML transferred: 4915304142 bytesRequests per second:1203.27 [#/sec] (mean)Time per request: 831.07 [ms] (mean)Time per request: 0.83 [ms] (mean, across all concurrent requests)Transfer rate:59352.10 [Kbytes/sec] receivedConnnection Times (ms)minmean[+/-sd] median maxConnect:019206.213113Processing:79 807155.88233891Waiting: 66 807155.88233890Total: 79 826251.08264248Percentage of the requests served within a certain time (ms)50%82666%84375%85480%86290%89495%93998% 100699% 1094100% 4248 (last request)

# iostat -w 1

tty mfid0 da0 cd0 cpu

tin tout KB/t tps MB/s KB/t tps MB/s KB/t tps MB/s us ni sy in id

0 23 19.25 1 0.01 0.01 0 0.00 0.00 0 0.00 0 0 0 0 100

0 387 0.00 0 0.00 0.00 0 0.00 0.00 0 0.00 0 0 0 0 99

0 78 0.00 0 0.00 0.00 0 0.00 0.00 0 0.00 0 0 0 0 100

4 2185 0.00 0 0.00 0.00 0 0.00 0.00 0 0.00 47 0 14 7 33

0 78 120.00 2 0.23 0.00 0 0.00 0.00 0 0.00 68 0 23 9 1

0 2405 128.00 1 0.12 0.00 0 0.00 0.00 0 0.00 77 0 14 6 2

0 79 128.00 1 0.12 0.00 0 0.00 0.00 0 0.00 71 0 17 10 2

0 1852 128.00 1 0.12 0.00 0 0.00 0.00 0 0.00 72 0 18 8 2

0 79 128.00 1 0.12 0.00 0 0.00 0.00 0 0.00 62 0 22 7 10

0 1143 128.00 1 0.12 0.00 0 0.00 0.00 0 0.00 68 0 20 9 3

0 79 128.00 1 0.12 0.00 0 0.00 0.00 0 0.00 65 0 25 8 2

0 2074 128.00 1 0.12 0.00 0 0.00 0.00 0 0.00 69 0 22 8 2

0 79 128.00 1 0.12 0.00 0 0.00 0.00 0 0.00 65 0 23 10 3

0 1917 128.00 1 0.12 0.00 0 0.00 0.00 0 0.00 62 0 26 10 3

0 79 128.00 1 0.12 0.00 0 0.00 0.00 0 0.00 63 0 25 8 5

0 2247 128.00 1 0.12 0.00 0 0.00 0.00 0 0.00 66 0 23 8 3

0 79 128.00 1 0.12 0.00 0 0.00 0.00 0 0.00 66 0 25 7 2

0 1373 48.00 7 0.33 0.00 0 0.00 0.00 0 0.00 66 0 22 8 4

看起来,lighttpd在磁盘上并没有nginx那样的瞬间压力。

总结:

一开始的失败请求主要来自php-cgi,在此服务器上,默认进程数无法处理大并发访问量。改为20以上就不存在失败了,再高收益不大。从高负载动态页面吞吐率上说,lighttpd可能要稍稍高于nginx。

附ab静态页面吞吐率

lighttpdRequests per second: 9045.68 [#/sec] (mean)

nginx Requests per second: 11622.50 [#/sec] (mean)

处理静态页面上,nginx要比lighttpd快不少。如果去掉ab对cpu的压力,两款软件加php对cpu的压力应该不超过70%。

在处理诸如php,ror等应用方面的极端压榨,可以考虑使用lighttpd。处理静态页面可以考虑使用nginx。篇幅有限,vmstat和truss跟踪的结果就不贴了。

软件截图

  • http网络服务器(LightTPD for windows) 1.4.35 官方免费版第1张

下载地址

http网络服务器(LightTPD for windows) 1.4.35 官方免费版