首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

嵌入式设备web服务器比较(2)

嵌入式设备web服务器比较(2)

各种服务器的比较:
· Software – 哪种web服务器
o Name
o Version
o Released – 什么时候发布的
o Active devel - 是否当前还在开发中。
· Features –一些关键服务器的特点
o Model - what kind of server it is. The models are:
§ fork - start a new process for each request.
§ pre-fork - pre-start a pool of processes which each handle multiple requests.
§ threads - use threads instead of processes.
§ Java threads - this version of the Java runtime uses "Green threads" instead of native threads, so it acts more like the select-based servers.
§ select - use non-blocking I/O and the select() system call to handle multiple requests in a single process, single thread.
从上面可以看到thttpd、boa都是使用select方式,apache使用的是pre-fork方式,由于apache是多进程方式,thttpd、boa是单进程方式,所使用的内存要远小于apache,且速度快于apache。
o Auto-conf (自动配置)- whether there's a script to automatically configure the build process for your OS.
o Basic auth (基本认证)- whether the server supports Basic Authentication, for password-protected web pages.
o Chroot - whether the server lets you use the chroot() system call to enhance security.
o Throttling - the ability to set bandwidth limits on certain pages, so they don't use more than their fair share of the server's resources.
· Size –各种服务器的大小
o Tar bytes - the uncompressed source tarchive size.
o Source files - how many source and header files.
o Source lines - how many lines in the source and header files.
o Exe - the executable size. For the compiled program this is size of the main executable file, stripped. For the Java servers it's the total size of the .class files or .zip files. For Roxen it's the size of the Pike interpreter.
· 基础测试系统。The benchmark test system is a 297MHz Ultra Sparc with 256MB RAM / 512MB swap running Solaris 2.6, otherwise totally quiescent. RLIMIT_NOFILE is 256 soft / 1024 hard, and v.v_maxup is 3941.
· RPS – 每秒响应请求次数。maximum requests per second. This is determined by running the test load at various parallel-request rates and finding the maximum response rate. See the graph below for the full data.
o Small files - the small-file test load consists of 1000 files, each 1KB long, requested randomly.
o CGI - the CGI test load consists of a trivial "hello world" C program. .
· Max users – 最大处理的用户数。This is determined by running the test load at various parallel-request rates and seeing when it starts screwing up. Typical screwups are running out of memory or processes, so that requests start timing out or getting refused.
o Large files - the large-file test load consists of 100 files, each 1MB long, requested randomly. Also, each connection is throttled to simulate a 33.6Kbps modem. Note that 1000 33.6Kbps connections is 3/4 of a T3.
上面的比较中,thttpd和boa都没有使用最新版本,boa的最新版本已经支持基本认证、自动配置等功能。Thttpd和boa的基本功能差不多,可以互相替换。现在选用web服务器时,同时有boa和thttpd的情况下,选择使用boa的情况居多。我在一篇论文中提到一点,说:thttpd在运行过程中所需要的资源要远大于boa,但没有验证过。
官方地址:http://www.acme.com/software/thttpd/
下载地址:http://www.acme.com/software/thttpd/thttpd-2.25b.tar.gz

Mini_httpd1. 介绍
Mini_httpd是一个小型的HTTP服务器。开源,它的性能不强,但是它非常适合于中小访问量的站点。Mini_httpd和thttpd都是ACME Labs 开发的软件,功能没有thttpd强。
2. 操作系统
与thttpd相同。
3. 版本
发布的版本从1.00到1.19。最新发布的版本是version 1.19.tar 41kB,解压后为140kB。
4. 功能、特点
它实现了HTTP服务器的所有的基本功能,包括:
· 支持CGI功能
· 支持基本的验证功能
· 支持安全 .. 上级目录功能
· 支持通用的MIME类型
· 支持目录列表功能
· 支持使用 index.html, index.htm, index.cgi 作为首页
· 支持多个根目录的虚拟主机
· 支持标准日志记录
· 支持自定义错误页
· Trailing-slash redirection
· 它可以配置成SSL/HTTPS和 IPv6.
5.可执行文件大小、内存使用情况
编译后可能要小于boa、thttpd,内存使用可能小于boa、thttpd。Mini_httpd的功能,thttpd功能几乎都覆盖了。
mini_httpd 也是相对比较适合学习、实验使用,大体实现了一个Web Server的功能,支持静态页和CGI,能够用来放置一些个人简单的东西,不适宜投入生产使用。
官方地址:http://www.acme.com/software/thttpd/
下载地址:http://www.acme.com/software/mini_httpd/mini_httpd-1.19.tar.gz

Shttpd1.介绍
Shttpd,开源。它是另一个轻量级的web server,具有比thttpd更丰富的功能特性,支持CGI, SSL, cookie, MD5认证, 还能嵌入(embedded)到现有的软件里。最有意思的是不需要配置文件!由于shttpd可以轻松嵌入其他程序里,因此shttpd是较为理想的web server开发原形,开发人员可以基于shttpd开发出自己的webserver,官方网站上称shttpd如果使用uclibc/dielibc(libc的简化子集)则开销将非常非常低。
2.操作系统
Windows, QNX, RTEMS, UNIX (*BSD, Solaris, Linux)。
3.版本
    它的最新版本是:shttpd-1.38.tar ,75kB,解压后为278kB。发布的版本从2004年的1.3到现在的2007年的1.38
4.功能、特点
l 小巧、快速、不膨胀、无需安装、简单的40KB的exe文件,随意运行
l 支持GET, POST, HEAD, PUT, DELETE 等方法
l 支持CGI, SSL, SSI, MD5验证, resumed download, aliases, inetd模式运行
l 标准日志格式
l 非常简单整洁的嵌入式API
l 对库dietlibc 支持友好,对uClibc (*)不友好。
l 容易定制运行在任意平台:Windows, QNX, RTEMS, UNIX (*BSD, Solaris, Linux)
不具有的功能:
virtual hosts, user home directorires, ACL (access control lists), traffic shaping, keep-alive connections, FCGI (Fast CGI) support.
5.可执行文件大小、内存使用情况
编译后的可执行的二进制文件为40kB左右.
网上查询结果是有关内容很少。使用范围不广。有网友对它的评论是:shttpd功能算是比较全的, 但在处理二进制数据时不够稳定, 时有异常. 有待观察。
官方网站:http://shttpd.sourceforge.net/
下载地址:http://sourceforge.net/project/s ... p_id=126090&package_id=137886
继承事业,薪火相传
返回列表