Nginx配置两份日志记录
2016-07-13 19:41
465 查看
nginx配置
版本-1.4.4
---
压力测试,使用webbench测试
Benchmarking: GET http://blog.miaojunrs.com/
50 clients, running 1200 sec.
Speed=94 pages/min, 62367 bytes/sec.
Requests: 1895 susceed, 0 failed.
watch观察结果
Every 2.0s: wc -l wordpress1.log wordpress2.log Fri Jul 8 17:29:21 2016
1945 wordpress1.log
1945 wordpress2.log
3890 total
测试是可以双写的
使用新nginx验证
nginx version: nginx/1.5.13
ab 压力测试
diff测试日志无差异
版本-1.4.4
---
access_log /alidata/log/nginx/access/wordpress1.log ; access_log /alidata/log/nginx/access/wordpress2.log ;
压力测试,使用webbench测试
Benchmarking: GET http://blog.miaojunrs.com/
50 clients, running 1200 sec.
Speed=94 pages/min, 62367 bytes/sec.
Requests: 1895 susceed, 0 failed.
watch观察结果
watch wc -l wordpress1.log wordpress2.log #观察日志条数 root@iZ285ma471jZ:/alidata/log/nginx/access# diff wordpress1.log wordpress2.log#diff确认日志无差异 root@iZ285ma471jZ:/alidata/log/nginx/access#
Every 2.0s: wc -l wordpress1.log wordpress2.log Fri Jul 8 17:29:21 2016
1945 wordpress1.log
1945 wordpress2.log
3890 total
测试是可以双写的
使用新nginx验证
nginx version: nginx/1.5.13
ab 压力测试
[root@iZ285ma471jZ exception]# ab -n200000 -c2000 http://blog.miaojunrs.com/ This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking blog.miaojunrs.com (be patient) Completed 20000 requests Completed 40000 requests Completed 60000 requests Completed 80000 requests Completed 100000 requests Completed 120000 requests Completed 140000 requests Completed 160000 requests Completed 180000 requests Completed 200000 requests Finished 200000 requests Server Software: Server Hostname: blog.miaojunrs.com Server Port: 80 Document Path: / Document Length: 0 bytes Concurrency Level: 2000 Time taken for tests: 17.949 seconds Complete requests: 200000 Failed requests: 200276 (Connect: 0, Receive: 0, Length: 187797, Exceptions: 12479) Write errors: 0 Non-2xx responses: 188237 Total transferred: 59859366 bytes HTML transferred: 30494394 bytes Requests per second: 11142.99 [#/sec] (mean) Time per request: 179.485 [ms] (mean) Time per request: 0.090 [ms] (mean, across all concurrent requests) Transfer rate: 3256.90 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 13 90 78.3 88 1106 Processing: 18 89 23.9 92 166 Waiting: 0 64 24.9 69 135 Total: 42 178 84.2 180 1231 Percentage of the requests served within a certain time (ms) 50% 180 66% 192 75% 200 80% 204 90% 214 95% 223 98% 236 99% 245 100% 1231 (longest request) [root@iZ285ma471jZ exception]#
diff测试日志无差异
[root@iZ285ma471jZ exception]# diff /tmp/1.log /tmp/2.log [root@iZ285ma471jZ exception]# wc -l /tmp/1.log /tmp/2.log 190238 /tmp/1.log 190238 /tmp/2.log 380476 总用量
相关文章推荐
- nginx学习笔记
- 教你编译PHP7 (nginx+mysql+php7)
- Nginx+php-fpm 502 504问题
- nginx支持pathinfo模式
- 使用nginx-rtmp搭建视频直播服务器
- 详解Nginx中基本的内存池初始化配置
- 解析Nginx中的日志模块及日志基本的初始化和过滤配置
- Nginx源码分析 - 主流程篇 - 模块的初始化
- nginx 编译安装
- Nginx获取自定义头部header的值
- nginx如何设置自定义404页面
- nginx location匹配
- Nginx - Windows 环境安装 Nginx
- 手把手教你认识并搭建Nginx
- linux下编译安装nginx1.10.1
- ubuntu 源码安装apache和nginx
- nginx geoip 模块实现地区性负载均衡
- Linux内存管理之mmap详解&&nginx子进程间通信
- Nginx初接触
- nginx搭建rtmp协议流媒体服务器总结