Zen-cart 性能测试

讨论本站的建设、更新等。

版主: Jack

Zen-cart 性能测试

帖子赵班长 » 2011-03-21 17:15

查看了本站所有版块,没有发现性能测试和优化方面的版块,不知道该站是否做过,总之Zen-cart在性能方面存在很多很多的疑问。

例:我使用apache自带的ab测试工具测试zen-cart发现:
Benchmarking 192.168.0.203 (be patient)
Finished 173 requests


Server Software: nginx/0.8.54
Server Hostname: 192.168.0.203
Server Port: 80

Document Path: /oxshop/index.php
Document Length: 41173 bytes

Concurrency Level: 1
Time taken for tests: 30.37390 seconds
Complete requests: 173
Failed requests: 161
(Connect: 0, Length: 161, Exceptions: 0)
Write errors: 0
Total transferred: 7193646 bytes
HTML transferred: 7131180 bytes
Requests per second: 5.76 [#/sec] (mean)
Time per request: 173.627 [ms] (mean)
Time per request: 173.627 [ms] (mean, across all concurrent requests)
Transfer rate: 233.88 [Kbytes/sec] received

此时服务器性能如下:
top - 01:16:55 up 12 days, 6:12, 2 users, load average: 2.46, 8.93, 46.00
Tasks: 208 total, 4 running, 204 sleeping, 0 stopped, 0 zombie
Cpu(s): 83.1%us, 13.3%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 3.7%si, 0.0%st
Mem: 2010428k total, 1683460k used, 326968k free, 174692k buffers
Swap: 4030456k total, 76k used, 4030380k free, 764292k cached

难道zen-cart性能真的这么差吗?我们再来看看另一个测试工具webbench:

[root@Web-Server includes]# webbench -c 100 http://192.168.0.203/index.php
Webbench - Simple Web Benchmark 1.5
Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.

Benchmarking: GET http://192.168.0.203/oxshop/index.php
100 clients, running 30 sec.

Speed=770 pages/min, 406926 bytes/sec.
Requests: 385 susceed, 0 failed.

此时服务器性能如下:
top - 01:17:58 up 12 days, 6:13, 2 users, load average: 24.63, 12.51, 44.63
Tasks: 308 total, 103 running, 205 sleeping, 0 stopped, 0 zombie
Cpu(s): 84.1%us, 12.3%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 3.6%si, 0.0%st
Mem: 2010428k total, 1694988k used, 315440k free, 174708k buffers
Swap: 4030456k total, 76k used, 4030380k free, 765468k cached

问题出现了,为什么两个测试工具的区别这么大呢。CPU占用率为什么一直很高呢。

声明:首先排除Web服务器和硬件的问题,因为我测试了康盛的东西,都很正常。
第二排除mysql的问题,我做了优化,而且没有慢查询。

我询问了开发人员。zen-cart开始会把所有数据查询出来,然后存放到数组中,以后对数组进行操作,这可能是CPU占用率很高的一个因素。

期待官方人员给出回答,并粘贴官方的测试数据,测试工具。和优化。

期待我们真正的深入zen-cart而不是,下个中文版,装个模板,改改就开始用了。

期待网站开设性能方面的版块。
赵班长
 
帖子: 1
注册: 2011-03-21 17:02

Re: Zen-cart 性能测试

帖子Jack » 2011-03-24 10:10

你是用本站下的软件测试的吗?
看看zen-cart.cn的测试数据吧,测试同时处理200个请求,速度并不慢...
这还是未做过优化的zencart,如果使用目前的几个缓存优化模块,有些页面能提高效率 50% - 80%

Benchmarking www.zen-cart.cn (be patient)
Completed 100 requests
Completed 200 requests
Finished 200 requests


Server Software: Apache
Server Hostname: www.zen-cart.cn
Server Port: 80

Document Path: /
Document Length: 20597 bytes

Concurrency Level: 200
Time taken for tests: 8.778 seconds
Complete requests: 200
Failed requests: 0
Write errors: 0
Total transferred: 4200600 bytes
HTML transferred: 4119400 bytes
Requests per second: 22.79 [#/sec] (mean)
Time per request: 8777.678 [ms] (mean)
Time per request: 43.888 [ms] (mean, across all concurrent requests)
Transfer rate: 467.34 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 6 3.1 6 11
Processing: 354 4557 2472.4 4830 8767
Waiting: 189 4285 2444.1 4460 8700
Total: 354 4563 2475.3 4836 8777

Percentage of the requests served within a certain time (ms)
50% 4836
66% 5989
75% 6649
80% 7088
90% 7949
95% 8474
98% 8607
99% 8714
100% 8777 (longest request)

top - 10:08:26 up 105 days, 23:46, 1 user, load average: 4.19, 2.01, 1.41
Tasks: 208 total, 1 running, 206 sleeping, 0 stopped, 1 zombie
Cpu(s): 4.7%us, 0.7%sy, 0.0%ni, 90.2%id, 4.4%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 4137992k total, 3461208k used, 676784k free, 173932k buffers
Swap: 5406712k total, 6736k used, 5399976k free, 2377672k cached
头像
Jack
论坛版主
论坛版主
 
帖子: 12265
注册: 2004-12-16 10:04


回到 本站站务



在线用户

正在浏览此版面的用户:没有注册用户 和 2 位游客