php加速缓存器opcache,apc,xcache,eAccelerator
http://windows.php.net/downloads/pecl/releases/
打开php.ini文件,找到[opcache] ; dll地址
extension=php_opcache.dll
; 开关打开
opcache.enable=1
; 开启CLI
opcache.enable_cli=1
; 可用内存, 酌情而定, 单位为:Mb
opcache.memory_consumption=128
; Zend Optimizer + 暂存池中字符串的占内存总量.(单位:MB)
opcache.interned_strings_buffer=8
; 对多缓存文件限制, 命中率不到 100% 的话, 可以试着提高这个值
opcache.max_accelerated_files=10000
; opcache 会在一定时间内去检查文件的修改时间, 这里设置检查的时间周期, 默认为 2, (单位:秒)
opcache.revalidate_freq=1
; 打开快速关闭, 打开这个在PHP Request Shutdown的时候回收内存的速度会提高
opcache.fast_shutdown=1
http://windows.php.net/downloads/pecl/releases/apc/
把下载的php_apc.dll放入php的ext扩展目录下。
[apc]
extension=php_apc.dll
apc.enabled=1
; 共享内存块的数目
apc.shm_segments=1
; 共享内存块的大小(单位:MB)
apc.shm_size=64
; 优化级别,更高的值则使用更主动的优化
apc.optimization=1
; 源文件的数目,不确定设置为0
apc.num_files_hint=0
; 缓存条目在缓冲区中允许逗留的秒数
apc.ttl=7200
; 针对每个用户缓存条目在缓冲区中允许逗留的秒数
apc.user_ttl=7200
; 缓存条目在垃圾回收表中能够存在的秒数
apc.gc_ttl=7200
; 文件写锁
apc.write_lock=on
http://xcache.lighttpd.net/pub/Releases/
把php_xcache.dll放到php的ext目录下。
[xcache-common]
extension = php_xcache.dll
[xcache.admin]
xcache.admin.enable_auth = On
xcache.admin.user = "admin"
xcache.admin.pass = "md5后你的密码"
[xcache]
; 选择底层内存共享实现方案
xcache.shm_scheme = "mmap"
xcache.size = 128M
; 设置为CPU数
xcache.count = 1
; 只是个参考值
xcache.slots = 8K
; 缓存时间
xcache.ttl = 1200
; 垃圾回收的时间间隔
xcache.gc_interval = 1200
; 同上,针对变量缓存设置
xcache.var_size = 4M
xcache.var_count = 1
xcache.var_slots = 8K
xcache.var_ttl = 1200 ; 变量最大缓存时间
xcache.var_maxttl = 7200
xcache.var_gc_interval = 1200
xcache.var_namespace_mode = 0
xcache.var_namespace = ""
xcache.readonly_protection = Off
; 对于win系统,这里不是文件路径
xcache.mmap_path = "xcache"
xcache.coredump_directory = ""
xcache.coredump_type = 0
xcache.disable_on_crash = Off
xcache.experimental = Off
xcache.cacher = On
xcache.stat = On
xcache.optimizer = Off
[xcache.coverager]
xcache.coverager = Off
xcache.coverager_autostart = On
xcache.coveragedump_directory = ""
四、eAccelerator
http://www.sitebuddy.com/PHP/Accelerators/eAccelerator_windows_binaries_builds
把下载到的eAccelerator_ts.dll放到php的ext目录下。
[eAccelerator]
extension="eAccelerator_ts.dll"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="设置缓存目录"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.log_file = "设置日志文件"
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"
php加速缓存器opcache,apc,xcache,eAccelerator的更多相关文章
- php 缓存 加速缓存
PHP四大加速缓存器opcache,apc,xcache,eAccelerator eAccelerator,xcache,opcache,apc(偏数据库缓存,分系统和用户缓存)是PHP缓存扩展, ...
- php Zend Opcache,xcache,eAccelerator缓存优化详解及对比
XCACHE XCache 是一个开源的 opcode 缓存器/优化器, 这意味着他能够提高您服务器上的 PHP 性能. 他通过把编译 PHP 后的数据缓冲到共享内存从而避免重复的编译过程, 能够直接 ...
- php Zend Opcache,xcache,eAccelerator缓存优化详解(具体根据个人需要选择其一即可,功能都一样切勿重复选择)
载入 XCache 模块 引用 ;; 安装成 zend extension (推荐), 路径一般是 "$extension_dir/xcache.so" zend_extensio ...
- php加速缓存Xcache的安装与配置
安装环境:centos 6.5 32bit php5.5.7 nginx1.6.0 [root@localhost opt]# wget http://xcache.lighttpd.net/pub ...
- 新一代 PHP 加速插件 Zend Opcache
参考:http://www.laogui.com/Zend-Opcache 大家知道目前PHP的缓存插件一般有三个:APC.eAccelerator.XCache,但未来它们可能都会消失,因为PHP ...
- 新一代 PHP 加速插件 Zend Opcache <转>
注: 由于原链接已不存在, 所以我把图片重新整理了一下, 以便看起来更加直观 笔者注: 1> PHP 性能提升之 PHP NG => php next generation wiki ...
- 使用tmpfs作为缓存加速缓存的文件目录
使用tmpfs作为缓存加速缓存的文件目录 [root@web02 ~]# mount -t tmpfs tmpfs /dev/shm -o size=256m[root@web02 ~]# mount ...
- LNMP php缓存器下载
一.LNMP php缓存器下载(1)配置环境变量 LC_ALLecho ‘export LC_ALL=C'>> /etc/profilesource /etc/profile 生效命令 ( ...
- [LeetCode] LRU Cache 最近最少使用页面置换缓存器
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the fol ...
随机推荐
- Ubuntu下Code::Blocks错误
#error This file requires compiler and library support for the ISO C++ 2011 standard. This support i ...
- python之路_函数实例及装饰器介绍
一.习题讲解 1.写函数,返回一个扑克牌列表,里面有52项,每一项是一个元组.例如:[(‘红心’,2), (‘草花’,2), …(‘黑桃,‘A’)] def cards(): num=[] for v ...
- 小朋友学Python(2)
本节学习python的第一个程序:输出“Hello World!”.咱们用两种方法实现 方法(一) 进入python环境,直接使用print方法 hello world.png 方法(二) 先编程 ...
- css (具体代码看笔记本)
参考:https://www.cnblogs.com/liwenzhou/p/7999532.html 1. CSS语法 选择器 {属性1:值1;...;} 2. CSS导入方式 1. 行 ...
- 【Flutter】Flutter 一些常用库
Flutter社区和资源传送门 新: 慕课网<Flutter入门与案例实战> | 中文网<Flutter实战>电子书 字体图标生成 http://fluttericon ...
- python入门-列表
列表使用[]来标识 列表和PHP中的数组类似 包括使用和访问方式都是类似 可以用下标索引的方式直接访问 来几个例子,这样看起来才舒服 names = ['baker','pitty','david', ...
- psc格式的文件是什么
psc格式的文件是什么 是navicat 这个工具导出的数据文件 可以使用备份还原功能 提取sql
- reportng代替testng的默认报告——pom设置
既然是maven项目,直接关注pom设置. 这篇写得很清楚了:maven+testng+reportng的pom设置 强调一点的是,guice必须依赖,就因这个卡了大半天. <dependenc ...
- The type org.springframework.dao.support.DaoSupport cannot be resolved. It is indirectly referenced
springmvc mybatis整合,遇到错误:The type org.springframework.dao.support.DaoSupport cannot be resolved. It ...
- 去除android手机浏览器中, 按住链接出现border的情况
body{ -moz-user-select:none; -webkit-user-select:none; -webkit-tap-highlight-color:transparent; }