全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 8439|回复: 33

LNAMP vs LLMP

[复制链接]
发表于 2011-1-12 21:18:23 | 显示全部楼层 |阅读模式
延续昨天的http://www.hostloc.com/thread-43855-1-1.htmlhttp://www.hostloc.com/viewthread.php?tid=43921
今天拿闲置的VPS试了一下LNAMP。
debian系统,全apt安装,没编译。由于我基本没有使用apache和nginx的经验,所以配出来的LNAMP是比较裸的。
实验对象是个WordPress,这帖只贴实验数据,耐心点,比较长。配置教程之类以后再说,等我先搞懂了。
静态js文件
LLMP:
  1. Server Software:        lighttpd/1.4.28-devel-485M
  2. Server Hostname:        a.ream.at
  3. Server Port:            80

  4. Document Path:          /wp-includes/js/jquery/jquery.js?ver=1.4.2
  5. Document Length:        72194 bytes

  6. Concurrency Level:      100
  7. Time taken for tests:   1.973 seconds
  8. Complete requests:      10000
  9. Failed requests:        0
  10. Write errors:           0
  11. Total transferred:      725470000 bytes
  12. HTML transferred:       721940000 bytes
  13. Requests per second:    5068.67 [#/sec] (mean)
  14. Time per request:       19.729 [ms] (mean)
  15. Time per request:       0.197 [ms] (mean, across all concurrent requests)
  16. Transfer rate:          359098.65 [Kbytes/sec] received

  17. Connection Times (ms)
  18.               min  mean[+/-sd] median   max
  19. Connect:        0    1   1.6      0      18
  20. Processing:     6   19   4.3     19      58
  21. Waiting:        2   17   5.3     17      45
  22. Total:          9   20   4.8     19      71

  23. Percentage of the requests served within a certain time (ms)
  24.   50%     19
  25.   66%     20
  26.   75%     21
  27.   80%     22
  28.   90%     24
  29.   95%     26
  30.   98%     28
  31.   99%     30
  32. 100%     71 (longest request)
复制代码
LNAMP:
  1. Server Software:        nginx/0.7.67
  2. Server Hostname:        a.ream.at
  3. Server Port:            80

  4. Document Path:          /wp-includes/js/jquery/jquery.js?ver=1.4.2
  5. Document Length:        72194 bytes

  6. Concurrency Level:      100
  7. Time taken for tests:   1.714 seconds
  8. Complete requests:      10000
  9. Failed requests:        0
  10. Write errors:           0
  11. Total transferred:      724220000 bytes
  12. HTML transferred:       721940000 bytes
  13. Requests per second:    5834.89 [#/sec] (mean)
  14. Time per request:       17.138 [ms] (mean)
  15. Time per request:       0.171 [ms] (mean, across all concurrent requests)
  16. Transfer rate:          412670.40 [Kbytes/sec] received

  17. Connection Times (ms)
  18.               min  mean[+/-sd] median   max
  19. Connect:        0    1   1.1      0      13
  20. Processing:     6   16   3.0     16      27
  21. Waiting:        2   14   3.9     14      24
  22. Total:         11   17   2.9     16      27

  23. Percentage of the requests served within a certain time (ms)
  24.   50%     16
  25.   66%     18
  26.   75%     19
  27.   80%     20
  28.   90%     21
  29.   95%     22
  30.   98%     24
  31.   99%     26
  32. 100%     27 (longest request)
复制代码
静态png图片
LLMP:
  1. Server Software:        lighttpd/1.4.28-devel-485M
  2. Server Hostname:        a.ream.at
  3. Server Port:            80

  4. Document Path:          /wp-content/media/suguan10.png
  5. Document Length:        96068 bytes

  6. Concurrency Level:      100
  7. Time taken for tests:   2.074 seconds
  8. Complete requests:      10000
  9. Failed requests:        0
  10. Write errors:           0
  11. Total transferred:      963850000 bytes
  12. HTML transferred:       960680000 bytes
  13. Requests per second:    4822.14 [#/sec] (mean)
  14. Time per request:       20.738 [ms] (mean)
  15. Time per request:       0.207 [ms] (mean, across all concurrent requests)
  16. Transfer rate:          453888.22 [Kbytes/sec] received

  17. Connection Times (ms)
  18.               min  mean[+/-sd] median   max
  19. Connect:        0    2   1.2      2       7
  20. Processing:     0   19   6.8     19      46
  21. Waiting:        0    6   3.8      5      27
  22. Total:          0   21   6.9     20      47

  23. Percentage of the requests served within a certain time (ms)
  24.   50%     20
  25.   66%     24
  26.   75%     25
  27.   80%     26
  28.   90%     29
  29.   95%     32
  30.   98%     37
  31.   99%     38
  32. 100%     47 (longest request)
复制代码
LNAMP:
  1. Server Software:        nginx/0.7.67
  2. Server Hostname:        a.ream.at
  3. Server Port:            80

  4. Document Path:          /wp-content/media/suguan10.png
  5. Document Length:        96068 bytes

  6. Concurrency Level:      100
  7. Time taken for tests:   1.826 seconds
  8. Complete requests:      10000
  9. Failed requests:        0
  10. Write errors:           0
  11. Total transferred:      962810000 bytes
  12. HTML transferred:       960680000 bytes
  13. Requests per second:    5475.35 [#/sec] (mean)
  14. Time per request:       18.264 [ms] (mean)
  15. Time per request:       0.183 [ms] (mean, across all concurrent requests)
  16. Transfer rate:          514816.37 [Kbytes/sec] received

  17. Connection Times (ms)
  18.               min  mean[+/-sd] median   max
  19. Connect:        0    2   0.6      2       4
  20. Processing:     2   16   3.3     16      29
  21. Waiting:        1    4   3.4      3      23
  22. Total:          6   18   3.3     18      30

  23. Percentage of the requests served within a certain time (ms)
  24.   50%     18
  25.   66%     19
  26.   75%     20
  27.   80%     21
  28.   90%     23
  29.   95%     25
  30.   98%     28
  31.   99%     28
  32. 100%     30 (longest request)
复制代码
动态的,php的,主要部分来了,这个页面执行时间很长……不过主要是数据库查询比较多
LLMP:
  1. Server Software:        lighttpd/1.4.28-devel-485M
  2. Server Hostname:        a.ream.at
  3. Server Port:            80

  4. Document Path:          /
  5. Document Length:        30737 bytes

  6. Concurrency Level:      30
  7. Time taken for tests:   295.213 seconds
  8. Complete requests:      3000
  9. Failed requests:        2989
  10.    (Connect: 0, Receive: 0, Length: 2989, Exceptions: 0)
  11. Write errors:           0
  12. Total transferred:      93327663 bytes
  13. HTML transferred:       92493663 bytes
  14. Requests per second:    10.16 [#/sec] (mean)
  15. Time per request:       2952.131 [ms] (mean)
  16. Time per request:       98.404 [ms] (mean, across all concurrent requests)
  17. Transfer rate:          308.73 [Kbytes/sec] received

  18. Connection Times (ms)
  19.               min  mean[+/-sd] median   max
  20. Connect:        0    0   0.1      0       2
  21. Processing:  1668 2942 495.2   2888    8452
  22. Waiting:     1623 2900 494.5   2845    8392
  23. Total:       1668 2942 495.2   2888    8452

  24. Percentage of the requests served within a certain time (ms)
  25.   50%   2888
  26.   66%   2997
  27.   75%   3073
  28.   80%   3129
  29.   90%   3290
  30.   95%   3445
  31.   98%   3706
  32.   99%   4040
  33. 100%   8452 (longest request)
复制代码
LNAMP:
  1. Server Software:        nginx/0.7.67
  2. Server Hostname:        a.ream.at
  3. Server Port:            80

  4. Document Path:          /
  5. Document Length:        30637 bytes

  6. Concurrency Level:      30
  7. Time taken for tests:   312.136 seconds
  8. Complete requests:      3000
  9. Failed requests:        2999
  10.    (Connect: 0, Receive: 0, Length: 2999, Exceptions: 0)
  11. Write errors:           0
  12. Total transferred:      93280153 bytes
  13. HTML transferred:       92488153 bytes
  14. Requests per second:    9.61 [#/sec] (mean)
  15. Time per request:       3121.356 [ms] (mean)
  16. Time per request:       104.045 [ms] (mean, across all concurrent requests)
  17. Transfer rate:          291.84 [Kbytes/sec] received

  18. Connection Times (ms)
  19.               min  mean[+/-sd] median   max
  20. Connect:        0    0   0.2      0       2
  21. Processing:  2262 3063 518.9   3002    9154
  22. Waiting:     2262 3063 518.9   3002    9154
  23. Total:       2262 3064 518.9   3002    9156

  24. Percentage of the requests served within a certain time (ms)
  25.   50%   3002
  26.   66%   3097
  27.   75%   3163
  28.   80%   3205
  29.   90%   3328
  30.   95%   3445
  31.   98%   3712
  32.   99%   5723
  33. 100%   9156 (longest request)
复制代码
还是那个页面,加了个Hyper-Cache缓存插件
LLMP:
  1. Server Software:        lighttpd/1.4.28-devel-485M
  2. Server Hostname:        a.ream.at
  3. Server Port:            80

  4. Document Path:          /
  5. Document Length:        30936 bytes

  6. Concurrency Level:      100
  7. Time taken for tests:   12.440 seconds
  8. Complete requests:      10000
  9. Failed requests:        0
  10. Write errors:           0
  11. Total transferred:      312950000 bytes
  12. HTML transferred:       309360000 bytes
  13. Requests per second:    803.86 [#/sec] (mean)
  14. Time per request:       124.399 [ms] (mean)
  15. Time per request:       1.244 [ms] (mean, across all concurrent requests)
  16. Transfer rate:          24567.28 [Kbytes/sec] received

  17. Connection Times (ms)
  18.               min  mean[+/-sd] median   max
  19. Connect:        0    0   0.9      0      12
  20. Processing:    30  123  17.0    122     192
  21. Waiting:       30  123  17.0    121     192
  22. Total:         42  124  16.7    122     193

  23. Percentage of the requests served within a certain time (ms)
  24.   50%    122
  25.   66%    130
  26.   75%    134
  27.   80%    138
  28.   90%    145
  29.   95%    151
  30.   98%    159
  31.   99%    166
  32. 100%    193 (longest request)
复制代码
LNAMP:
  1. Server Software:        nginx/0.7.67
  2. Server Hostname:        a.ream.at
  3. Server Port:            80

  4. Document Path:          /
  5. Document Length:        30936 bytes

  6. Concurrency Level:      100
  7. Time taken for tests:   10.412 seconds
  8. Complete requests:      10000
  9. Failed requests:        0
  10. Write errors:           0
  11. Total transferred:      312580000 bytes
  12. HTML transferred:       309360000 bytes
  13. Requests per second:    960.45 [#/sec] (mean)
  14. Time per request:       104.118 [ms] (mean)
  15. Time per request:       1.041 [ms] (mean, across all concurrent requests)
  16. Transfer rate:          29318.20 [Kbytes/sec] received

  17. Connection Times (ms)
  18.               min  mean[+/-sd] median   max
  19. Connect:        0    0   0.7      0       9
  20. Processing:    10  103  37.5    117     178
  21. Waiting:       10  103  37.7    117     177
  22. Total:         18  104  37.3    117     178

  23. Percentage of the requests served within a certain time (ms)
  24.   50%    117
  25.   66%    129
  26.   75%    135
  27.   80%    138
  28.   90%    148
  29.   95%    154
  30.   98%    159
  31.   99%    162
  32. 100%    178 (longest request)
复制代码
四个测试里,LNAMP胜出3项,跑纯动态的php反而不如LLMP。
另外,神马都是浮云 缓存才是王道。

评分

参与人数 5威望 +35 收起 理由
sagawa + 5 早就想加了 没到点
挨个搞 + 15 精品文章
xiasl + 5 原创内容
风声 + 5 看来可以转LNAMP了.
whyyyhk + 5 恶意灌水

查看全部评分

发表于 2011-1-12 21:18:45 | 显示全部楼层
这个要顶
发表于 2011-1-12 21:18:51 | 显示全部楼层
好长
发表于 2011-1-12 21:20:18 | 显示全部楼层
不错
 楼主| 发表于 2011-1-12 21:22:39 | 显示全部楼层
CAO,
想起来忘了说配置问题了,结果原帖不能改
LLMP方面,php-cgi进程14个;LNAMP那边,apache也是14个。
发表于 2011-1-12 21:22:44 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
 楼主| 发表于 2011-1-12 21:25:01 | 显示全部楼层
现在这个主机还开着呢,正跑着LNAMP,想看的可以去玩玩。
发表于 2011-1-12 21:28:20 | 显示全部楼层
技术流啊
发表于 2011-1-12 21:39:30 | 显示全部楼层
<?php

function whatthefuck($cons) {
  $i = 0;
  $object = new StdClass;
  for (;$i < $cons; $i++) {
    $object->{"your_" . $i} = array("sorry" => 12345);
    $object->{"yourdaddy_" . $i} = new StdClass;
    $object->{"onlyyour"} = array("sorry" => 12345);
  }
  unset($object);
}
whatthefuck(10000);
print "done";
?>

楼主试试拿这段代买跑个测试看看....应该能体现出lnamp的优势
发表于 2011-1-12 21:40:28 | 显示全部楼层
原帖由 windywinter 于 2011-1-12 21:25 发表
现在这个主机还开着呢,正跑着LNAMP,想看的可以去玩玩。



看了速度很快, 你说那个比不过的PHP一项靠缓存的话,独立服务器上就有很多优势了. 看来LNAMP是很不错.
伪静态你研究清楚了吗?  加减虚拟主机呢?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-4-19 04:25 , Processed in 0.065096 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表