Chinaunix首页 | 论坛 | 博客
  • 博客访问: 519464
  • 博文数量: 166
  • 博客积分: 4038
  • 博客等级: 上校
  • 技术积分: 1115
  • 用 户 组: 普通用户
  • 注册时间: 2008-01-14 23:29
文章分类

全部博文(166)

文章存档

2010年(12)

2009年(126)

2008年(28)

分类:

2009-09-15 10:12:47

APC 3.0.19 (Alternative PHP Cache)
配置

extension=apc.so
apc.enabled=1
apc.shm_segments=1
apc.shm_size=128
apc.ttl=7200
apc.user_ttl=7200
apc.num_files_hint=1024
apc.mmap_file_mask=/tmp/apc.XXXXXX
apc.enable_cli=1

结果

7303 fetches, 50 max parallel, 1.67458e+07 bytes, in 300 seconds
2293 mean bytes/connection
24.3433 fetches/sec, 55819.3 bytes/sec
msecs/connect: 3.27583 mean, 2999.74 max, 0.184 min
msecs/first-response: 2043.52 mean, 7853.21 max, 325.513 min
HTTP response codes:
  code 200 -- 7303

eAccelerator 0.9.5.3
配置

[eaccelerator]
extension=eaccelerator.so
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.log_file = "/var/log/httpd/eaccelerator_log"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"

结果

7568 fetches, 50 max parallel, 1.73534e+07 bytes, in 300.001 seconds
2293 mean bytes/connection
25.2266 fetches/sec, 57844.6 bytes/sec
msecs/connect: 0.39873 mean, 1.01 max, 0.173 min
msecs/first-response: 1972.44 mean, 5520.1 max, 635.565 min
HTTP response codes:
  code 200 -- 7568

XCache v1.2.2
配置

extension="xcache.so"
[xcache.admin]
; Change xcache.admin.user to your preferred login name
xcache.admin.user = "admin"
; Change xcache.admin.pass to the MD5 fingerprint of your password
; Use md5 -s "your_secret_password" to find the fingerprint
xcache.admin.pass = "e10adc3949ba59abbe56e057f20f883e"
[xcache]
; Change xcache.size to tune the size of the opcode cache
xcache.size = 24M
xcache.shm_scheme = "mmap"
xcache.count = 2
xcache.slots = 8K
xcache.ttl = 0
xcache.gc_interval = 0
; Change xcache.var_size to adjust the size of variable cache
xcache.var_size = 8M
xcache.var_count = 1
xcache.var_slots = 8K
xcache.var_ttl = 0
xcache.var_maxttl = 0
xcache.var_gc_interval = 300
xcache.test = Off
xcache.readonly_protection = On
xcache.mmap_path = "/tmp/xcache"
xcache.coredump_directory = ""
xcache.cacher = On
xcache.stat = On
xcache.optimizer = On
[xcache.coverager]
xcache.coverager = Off
xcache.coveragedump_directory = ""

结果

4539 fetches, 50 max parallel, 1.04079e+07 bytes, in 300 seconds
2293 mean bytes/connection
15.13 fetches/sec, 34693.1 bytes/sec
msecs/connect: 0.405883 mean, 0.999 max, 0.182 min
msecs/first-response: 3214.64 mean, 18691.3 max, 772.952 min
HTTP response codes:
  code 200 -- 4539

No OP-Cache
结果

1798 fetches, 50 max parallel, 3.9867e+06 bytes, in 300 seconds
2217.3 mean bytes/connection
5.99332 fetches/sec, 13289 bytes/sec
msecs/connect: 12.0802 mean, 2999.48 max, 0.203 min
msecs/first-response: 6966.64 mean, 59754 max, 381.002 min
41 timeouts
61 bad byte counts
HTTP response codes:
  code 200 -- 1757

结论:
eAccelerator 0.9.5.3
25.2266 fetches/sec

APC 3.0.19
24.3433 fetches/sec

XCache v1.2.2
15.13 fetches/sec

No OP-Cache
5.99332 fetches/sec

eA的效果最好.APC紧随其后.两者的性能表现基本相同.xcache最差.

阅读(1764) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~