最近1vps服务器php比较消耗cpu,导致负载有点升高。加上xcache过后效果非常不错。
1. wget http://xcache.lighttpd.net/pub/Releases/1.3.2/xcache-1.3.2.tar.gz
2.tar xx.tar.gz
3.cd xx && xxx/bin/phpize && ./configure –enable-xcache –with-php-config=/opt/php5/bin/php-config
4.php.ini装载xcache模块
xcache.admin.enable_auth = On xcache.admin.user = "admin" ; xcache.admin.pass = md5($your_password) xcache.admin.pass = "21232f297a57a5a743894a0e4a801fc3" xcache.shm_scheme = "mmap" xcache.size = 64M xcache.count = 8 xcache.slots = 8K xcache.ttl = 0 xcache.gc_interval = 0 xcache.var_size = 16M 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 = Off xcache.mmap_path = "/dev/zero" xcache.coredump_directory = "" xcache.cacher = On xcache.stat = On xcache.optimizer = Off xcache.coverager = Off xcache.coveragedump_directory = ""
降低cpu负载效果非常不错!