谈下路由建站的速度优化,令人满意
来源:互联网 发布:android 网络协议 编辑:程序博客网 时间:2024/05/16 11:36
在路由上建站,除了受到路由器本身性能的限制外,影响访问体验的另外一个因素就是网络的上行速度。因此在路由器的性能一定的条件下,只有优化输出文件的大小,才能达到提升浏览体验的目的。下面谈下我的两个优化思路(更加详细的说明见我的博客www.damuzi.net):
1. lighttpd优化
opkg install lighttpd-mod-compress
vi /etc/lighttpd/lighttpd.conf
找到 server.modules = ( 加入 "mod_compress", 以启用compress模块
找到 #### compress module 加入
compress.allowed-encodings = ("bzip2", "gzip", "deflate")
compress.cache-dir = "/mnt/sda1/tmp"
compress.filetype = ("text/plain", "text/html", "text/css", "text/javascript")
:x
2. php优化
也需要安装apc模块 zlib模块
zlib.output_compression = On
zlib.output_compression_level = 6
zlib.output_handler =On
apc.enabled = 1
apc.shm_segments = 1 ;The number of shared memory segments to allocate for th
apc.shm_size = 6M ;The size of each shared memory segment.
apc.ttl =21600 ;The time of renew the cache.
经过优化后,路由会先压缩要输出的文件,在客户端解压输出,而压缩的效率达到50%以上,大大减少了客户端接收文件的时间,效果非常满意。
1. lighttpd优化
opkg install lighttpd-mod-compress
vi /etc/lighttpd/lighttpd.conf
找到 server.modules = ( 加入 "mod_compress", 以启用compress模块
找到 #### compress module 加入
compress.allowed-encodings = ("bzip2", "gzip", "deflate")
compress.cache-dir = "/mnt/sda1/tmp"
compress.filetype = ("text/plain", "text/html", "text/css", "text/javascript")
:x
2. php优化
也需要安装apc模块 zlib模块
zlib.output_compression = On
zlib.output_compression_level = 6
zlib.output_handler =On
apc.enabled = 1
apc.shm_segments = 1 ;The number of shared memory segments to allocate for th
apc.shm_size = 6M ;The size of each shared memory segment.
apc.ttl =21600 ;The time of renew the cache.
经过优化后,路由会先压缩要输出的文件,在客户端解压输出,而压缩的效率达到50%以上,大大减少了客户端接收文件的时间,效果非常满意。
0 0
- 谈下路由建站的速度优化,令人满意
- 最近CSDN的blog速度是越来越不能令人满意了
- [旧闻]调查:NetBeans的调试性能令人满意
- 路由的优化
- xp下优化OpenGL模式运行速度的小技巧
- 优化MyEclipse的速度
- ADOQuery的速度优化
- 速度优化的链表类
- 为什么难以设计出令人满意的室内导航应用
- easyUI设置一个令人满意的树形下拉框combotree
- SPI通信速度的优化!
- 大幅优化myeclipse 的速度
- 大幅优化myeclipse 的速度
- 大幅优化myeclipse的速度
- 大幅优化myeclipse的速度
- 大幅优化MyEclipse的速度
- 大幅优化myeclipse 的速度
- 大幅优化MyEclipse的速度
- LIVE555 Streaming Media简介和框架
- Enterprise Architect使用教程
- Maximum Depth of Binary Tree
- 测试
- MyEclipse启动参数设置
- 谈下路由建站的速度优化,令人满意
- 手动卸载的vs2010方法
- Unity 预编译宏
- EasyUI - DataGrid 去右边空白滚动条列
- VS2008—LINK error: cannot open file 'LIBC.lib'
- 思维导图
- 基础学习记录 --erlang
- 平时都听说程序员枯燥、乏味、不浪漫,但是看了下面这些程序员专属密码后,觉得简直碉堡了!!!
- 几个有意思的工业机器人应用