|
本帖最后由 ivv 于 2013-6-1 22:43 编辑
测试站点为全新的wordpress 没安装任何缓存或静态化插件
由于测试为新站,和实际运行中的网站资源占用可能会有出入,本文仅为测试
php-fpm使用static运行方式
按照一天平均有12个小时的访问时间计算 10W的PV 平均并发在2.36左右
压力测试工具为webbench
3 clients, running 120 sec.
Speed=6 pages/sec, 48752 bytes/sec.
Requests: 793 ok, 0 http error, 0 failed.
测试中测试的并发为3,计算约合12小时13W个PV,测试中在120秒内发起793个请求,全部得到正确答应,没有错误以及失败
服务器的负载在1.5左右,测试使用的是openvz架构的vps,如果使用xen的vps负载应该会更低一些
为了测试究竟能跑多少,测试将平均并发提升到8(约合12小时内35W的PV)
负载最高为5.5,还是挺吃力的
8 clients, running 120 sec.
Speed=11 pages/sec, 84786 bytes/sec.
Requests: 1380 ok, 2 http error, 0 failed.
1380次请求正常,2次错误
php-fpm的配置- pm=static
- pm.max_children=20
复制代码 my.cnf的配置- [client]
- port = 3306
- socket = /tmp/mysql.sock
- [mysqld]
- port = 3306
- socket = /tmp/mysql.sock
- skip-external-locking
- key_buffer_size = 4M
- table_cache = 60
- max_allowed_packet = 1M
- table_open_cache = 64
- sort_buffer_size = 128K
- net_buffer_length = 2K
- read_buffer_size = 1M
- read_rnd_buffer_size = 2M
- myisam_sort_buffer_size = 4M
- max_connections = 100
- thread_concurrency = 8
- query_cache_limit = 2M
- query_cache_size = 0M
- thread_stack = 192K
- skip-innodb
- log-bin=mysql-bin
- binlog_format=mixed
- server-id = 1
- [mysqldump]
- quick
- max_allowed_packet = 16M
- [mysql]
- no-auto-rehash
- #safe-updates
- [myisamchk]
- key_buffer_size = 20M
- sort_buffer_size = 64K
- read_buffer = 2M
- write_buffer = 2M
- [mysqlhotcopy]
- interactive-timeout
复制代码 |
|