全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
楼主: windywinter

LNAMP vs LLMP

[复制链接]
 楼主| 发表于 2011-1-12 23:09:59 | 显示全部楼层
原帖由 风声 于 2011-1-12 23:07 发表


一直就是考虑这个问题...

这个你只能调试一下,空想是想不出来的。
发表于 2011-1-12 23:17:11 | 显示全部楼层
原帖由 windywinter 于 2011-1-12 23:09 发表

这个你只能调试一下,空想是想不出来的。



有些站在跑,转代价大, 其实主要考虑主流的DX /DZ /ECSHOP /PHPCMS的REWRITE就可以了.
 楼主| 发表于 2011-1-13 14:07:54 | 显示全部楼层

LNAMP vs LLMP 第二季

昨天安装的nginx版本是0.7.67,今天换0.8.54又测了一遍。
需要说明的是,0.7.67是1个worker process,0.8.54是4个。这个是debian默认配置文件写的,不能怨我。
LLMP的数据跟昨天的基本一样,为了省字数就不再贴一遍了。
静态js文件
  1. Server Software:        nginx/0.8.54
  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.583 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:    6319.07 [#/sec] (mean)
  14. Time per request:       15.825 [ms] (mean)
  15. Time per request:       0.158 [ms] (mean, across all concurrent requests)
  16. Transfer rate:          446913.57 [Kbytes/sec] received

  17. Connection Times (ms)
  18.               min  mean[+/-sd] median   max
  19. Connect:        1    2   0.7      2       6
  20. Processing:     4   13   2.2     13      28
  21. Waiting:        1    3   1.7      2      20
  22. Total:          8   16   2.4     15      32

  23. Percentage of the requests served within a certain time (ms)
  24.   50%     15
  25.   66%     16
  26.   75%     17
  27.   80%     17
  28.   90%     19
  29.   95%     20
  30.   98%     21
  31.   99%     24
  32. 100%     32 (longest request)
复制代码
静态png图片
  1. Server Software:        nginx/0.8.54
  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.883 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:    5309.85 [#/sec] (mean)
  14. Time per request:       18.833 [ms] (mean)
  15. Time per request:       0.188 [ms] (mean, across all concurrent requests)
  16. Transfer rate:          499255.10 [Kbytes/sec] received

  17. Connection Times (ms)
  18.               min  mean[+/-sd] median   max
  19. Connect:        1    2   0.8      2       9
  20. Processing:     7   16   3.0     16      39
  21. Waiting:        1    2   2.0      2      24
  22. Total:          9   19   3.4     18      48

  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%     22
  29.   95%     24
  30.   98%     26
  31.   99%     29
  32. 100%     48 (longest request)
复制代码
动态的,php的,主要部分来了,这个页面执行时间很长……不过主要是数据库查询比较多
  1. Server Software:        nginx/0.8.54
  2. Server Hostname:        a.ream.at
  3. Server Port:            80

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

  6. Concurrency Level:      30
  7. Time taken for tests:   290.482 seconds
  8. Complete requests:      3000
  9. Failed requests:        2993
  10.    (Connect: 0, Receive: 0, Length: 2993, Exceptions: 0)
  11. Write errors:           0
  12. Total transferred:      93352277 bytes
  13. HTML transferred:       92491277 bytes
  14. Requests per second:    10.33 [#/sec] (mean)
  15. Time per request:       2904.824 [ms] (mean)
  16. Time per request:       96.827 [ms] (mean, across all concurrent requests)
  17. Transfer rate:          313.84 [Kbytes/sec] received

  18. Connection Times (ms)
  19.               min  mean[+/-sd] median   max
  20. Connect:        0    0   0.4      0       5
  21. Processing:  1109 2895 448.8   2854    8318
  22. Waiting:     1045 2851 448.2   2809    8268
  23. Total:       1112 2895 448.7   2854    8318

  24. Percentage of the requests served within a certain time (ms)
  25.   50%   2854
  26.   66%   2932
  27.   75%   2986
  28.   80%   3025
  29.   90%   3140
  30.   95%   3240
  31.   98%   3438
  32.   99%   3886
  33. 100%   8318 (longest request)
复制代码
还是那个页面,加了个Hyper-Cache缓存插件
  1. Server Software:        nginx/0.8.54
  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:   5.527 seconds
  8. Complete requests:      10000
  9. Failed requests:        0
  10. Write errors:           0
  11. Total transferred:      312810000 bytes
  12. HTML transferred:       309360000 bytes
  13. Requests per second:    1809.20 [#/sec] (mean)
  14. Time per request:       55.273 [ms] (mean)
  15. Time per request:       0.553 [ms] (mean, across all concurrent requests)
  16. Transfer rate:          55267.32 [Kbytes/sec] received

  17. Connection Times (ms)
  18.               min  mean[+/-sd] median   max
  19. Connect:        0    1   2.8      0      21
  20. Processing:     9   54  19.3     49     162
  21. Waiting:        4   52  19.4     48     162
  22. Total:         22   55  19.0     50     162

  23. Percentage of the requests served within a certain time (ms)
  24.   50%     50
  25.   66%     53
  26.   75%     56
  27.   80%     59
  28.   90%     71
  29.   95%    103
  30.   98%    126
  31.   99%    137
  32. 100%    162 (longest request)
复制代码
2x faster than LLMP...
 楼主| 发表于 2011-1-13 14:15:05 | 显示全部楼层
另外也重新试了一下
  1. if ( !-e $request_filename) {
  2. proxy_pass  http://127.0.0.1:81;
  3. }
复制代码
发现0.8.54也不支持这个写法。我查了nginx的document,确实proxy_pass只能写在server和location下面,我就不知道女神这段conf是怎么通过的了。
不过我发现0.8.54可以用try_files来实现。
发表于 2011-1-13 15:07:07 | 显示全部楼层
LNAMP貌似很不错...
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-5-2 09:15 , Processed in 0.069024 second(s), 7 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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