Friday, January 26, 2007

Buffalo WBR2-G54 HTTPD 性能测试

Buffalo WBR2-G54 无线路由的处理器是Broadcom 4712 @200MHz。
首先测试的是一个1K左右的静态文件,并发连接数10,总共100连接。

debian:~# ab -c 10 -n 100 http://192.168.0.1/status.html
This is ApacheBench, Version 2.0.41-dev < $Revision: 1.141 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/Benchmarking 192.168.0.1 (be patient).....done

Server Software: httpd
Server Hostname: 192.168.0.1
Server Port: 80

Document Path: /status.html
Document Length: 994 bytes

Concurrency Level: 10
Time taken for tests: 1.631254 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Total transferred: 116400 bytes
HTML transferred: 99400 bytes
Requests per second: 61.30 [#/sec] (mean)
Time per request: 163.125 [ms] (mean)
Time per request: 16.313 [ms] (mean, across all concurrent requests)
Transfer rate: 69.27 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 2 5 5.6 4 29
Processing: 20 146 30.8 152 178
Waiting: 19 144 30.7 150 175
Total: 49 151 26.2 155 182

Percentage of the requests served within a certain time (ms)
50% 155
66% 167
75% 172
80% 175
90% 179
95% 179
98% 180
99% 182
100% 182 (longest request)

可以看到每秒请求数为61.30,似乎并发性能不错,于是增大并发连接数到20,结果每秒连接数是62.10,只有轻微的增加。再测试一个38K的文件,结果是:

Concurrency Level: 10
Time taken for tests: 11.435183 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Total transferred: 3746200 bytes
HTML transferred: 3734100 bytes
Requests per second: 8.74 [#/sec] (mean)
Time per request: 1143.518 [ms] (mean)
Time per request: 114.352 [ms] (mean, across all concurrent requests)
Transfer rate: 319.89 [Kbytes/sec] received

下面测试的是DD-WRT的运行状态页面,类似普通网站的一个不太复杂的页面,大小16K,连接有若干图片,样式和脚本文件。如图:


结果如下:

Document Path: /Info.htm
Document Length: 16545 bytes

Concurrency Level: 10
Time taken for tests: 51.66305 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Total transferred: 1674676 bytes
HTML transferred: 1657506 bytes
Requests per second: 1.96 [#/sec] (mean)
Time per request: 5106.630 [ms] (mean)
Time per request: 510.663 [ms] (mean, across all concurrent requests)
Transfer rate: 32.02 [Kbytes/sec] received

性能显著降低。(看Apache的日志,ab并没有抓取文件里面的图片,脚本等外部连接,可是为何性能比上面的文件低呢?)

Saturday, September 23, 2006

Opera 9 上的新玩意-widgets

Opera的web based小程序 ,种类繁多。譬如一个小时钟,运行起来是这个样的。


各种widgets:



widgets 网站:http://widgets.opera.com/

Friday, September 22, 2006

putty基于RSA,DSA密钥认证的SSH连接配置

SSH服务器为 Debian linux .
  • 安装ssh
debian:~# apt-get install ssh
  • 创建RSA,DSA密钥对
debian:~# ssh-keygen -t rsa -b 2048

其中 -t 指定密钥类型rsa或dsa,推荐用rsa,dsa据说有安全隐患(不是美国现在的电子签名标准吗?)
-b 是密钥长度,rsa(版本2)这里只能创建最大2048 bits的,注意! 1024 bits已经不够了.
输入地址,域名信息.另外会要求输入passphrase,用来保护私钥的,可以回车跳过,但是你的私钥可就要藏好噜,别让人偷了去.
这里产生了私钥和公钥两个文件id_rsa和id_rsa.pub.
  • 重命名公钥
debian:~# mv .ssh/id_rsa.pub .ssh/authorized_keys

因为ssh配置中缺省使用 .ssh/authorized_keys 文件。
  • 下载私钥
既然开了ssh,当然要用sftp了,可以用psftp,它可以调用putty的Session,方法是 psftp sessionname,这样一来sftp也可以使用RSA密钥认证了.
SSH-2私钥没有规定标准格式,所以OpenSSH,ssh.com,putty都有自己的一套,要用这个工具来互相转换.当然你也可以一开始就用它创建密钥对,然后再把公钥上传到服务器.
  • 配置putty
在SSH=>Auth,选择对应服务器的密钥,保存该Session. 大功告成!

Prison Break -越狱

最近追看的美剧, 现在放到第二季第五集了,好像没第一季那么紧张刺激了。不过还是大力推荐。电驴下载

六人行 Friends

永远的老友记--娇纵可爱的瑞秋,正直又专情的罗斯,神经质外加控制欲的莫妮卡,幽默风趣的钱德,迷糊又迷人的菲比,傻气又天真的乔伊。

我们的婚纱照

贴上几张,全部在这里。 :D



Thursday, September 21, 2006

海纳百川

访问中文wiki 的一个办法。