Gentoo 实践显存加速Squid
上一篇 /
下一篇 2007-11-12 21:06:32
/ 个人分类:Linux 笔记
照着这个做的 http://gentoo-wiki.com/TIP_Use_memory_on_video_card_as_swap 把文档中的 swap 改成 squid 的 cache ,就完成了将显存作为cache 给 squid 加速网页浏览的效果了 在 /etc/conf.d/local.start 加入这些来建立 MTD ------------------------------------------------------------------------------------------------ # Mount mtd as squid cache /sbin/modprobe slram map=VRAM,0xf0400000,+0x7c00000 /sbin/modprobe mtdchar /sbin/modprobe mtdblock /sbin/mkfs.reiser4 -y /dev/mtdblock0 /bin/mount /dev/mtdblock0 /var/tmp/squid /bin/chmod 777 /var/tmp/squid /etc/init.d/squid start ------------------------------------------------------------------------------------------------ 使用了124Mbyte显存空间来做cache,在 /etc/squid/squid.conf 里做相应配置 ----------------------------------------------------------------------------------------------- http_port 192.168.0.1:3128 transparent cache_dir ufs /var/tmp/squid 100 16 256 visible_hostname Home_cache hierarchy_stoplist cgi-bin ? acl QUERY urlpath_regex cgi-bin \? cache deny QUERY acl apache rep_header Server ^Apache broken_vary_encoding allow apache access_log /dev/null squid refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern . 0 20% 4320 acl all src 0.0.0.0/0.0.0.0 acl localnet src 192.168.0.0/255.255.255.0 acl manager proto cache_object acl localhost src 127.0.0.1/255.255.255.255 acl to_localhost dst 127.0.0.0/8 acl SSL_ports port 443 acl purge method PURGE acl CONNECT method CONNECT http_access allow manager localhost http_access deny manager http_access allow purge localhost http_access deny purge http_access deny CONNECT !SSL_ports http_access allow localnet http_access allow localhost http_access deny all http_reply_access allow all icp_access allow all forwarded_for off coredump_dir /var/cache/squid cache_mem 32 MB error_directory /usr/share/squid/errors/Simplify_Chinese ----------------------------------------------------------------------------------------- |
相关阅读:
- 激战手机操作系统Linux需在竞争中寻出路 (joejoe0332, 2007-11-06)
- [视频]Linux 下的3D网络游戏录像 (walkerxk, 2007-11-07)
- [视频]惯性效果的触摸屏 (walkerxk, 2007-11-07)
- [视频]midinux 2.0界面演示 (walkerxk, 2007-11-07)
- 挑战Linux Solaris系统怎样才能重新辉煌 (joejoe0332, 2007-11-07)
- http://www.lotusfans.com (josonchen, 2007-11-08)
- 深度观察:桌面突围战Linux将分道扬镳? (joejoe0332, 2007-11-08)
- 热点时评:2007年Linux迎来了发展的春天 (joejoe0332, 2007-11-09)
- Andriod SDK将要发布,非常期待. (mic, 2007-11-12)
- Ubuntu 7.10:扩展Linux的多媒体应用功能 (joejoe0332, 2007-11-12)
导入论坛
收藏
分享给好友
管理
举报
TAG:
gentoo
linux
squid
MTD