<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[静怡家园]]></title> 
<link>http://www.zhanghaijun.com/index.php</link> 
<description><![CDATA[书山有路勤为径，学海无涯苦作舟！]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[静怡家园]]></copyright>
<item>
<link>http://www.zhanghaijun.com/post//</link>
<title><![CDATA[优化squid性能]]></title> 
<author>碟舞飞扬 &lt;webmaster@zhanghaijun.com&gt;</author>
<category><![CDATA[服务器类]]></category>
<pubDate>Fri, 02 Sep 2011 16:15:26 +0000</pubDate> 
<guid>http://www.zhanghaijun.com/post//</guid> 
<description>
<![CDATA[ 
	一.文件系统调节<br/>1.硬盘不要使用RAID<br/>2.使用性能好的FS(例如: ReiserFS) <br/>在fstab里面添加noatime,async项,提高文件系统的性能.<br/>二. aufs存储机制<br/>编辑squid-2.6.STABLE13/src/fs/aufs/store_asyncufs.h<br/>#define ASYNC_WRITE 0 (把0修改为:1)<br/>pthread_create(), SMP优越. (线程制)<br/>编辑squid-2.6.STABLE13/include/autoconf.h<br/>define DEFAULT_FD_SETSIZE 1024&#123;1024修改为:65536&#125;<br/>diskd存储机制<br/>通过消息队列和共享内存来实现进程间通信<br/>使用Diskd存储机制而对 kernel.msgmnb等的调整<br/>kernel.msgmnb = 16384<br/>每个消息队列的最大字节限制<br/>kernel.msgmni = 16 (此值可以根据需要增大)<br/>整个系统的最大数量的消息队列， Squid对每个Cache_dir 使用两个队列, 假如你有2个磁盘，那就有2个队列.<br/>kernel.msgmax = 8192<br/>每个消息的最大size.<br/><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content"><br/>[root@jackbillow~]# sysctl -a &#124;grep msgmnb<br/>kernel.msgmnb = 16384<br/>[root@jackbillow ~]# sysctl -a &#124;grep msgmni<br/>kernel.msgmni = 16<br/>[root@jackbillow ~]# sysctl -a &#124;grep msgmax<br/>kernel.msgmax = 8192<br/>[root@jackbillow ~]# sysctl -a &#124;grep shmall<br/>kernel.shmall = 2097152<br/>[root@jackbillow ~]# sysctl -a &#124;grep shmmni<br/>kernel.shmmni = 4096<br/>[root@jackbillow~]# sysctl -a &#124;grep shmmax<br/>kernel.shmmax = 2147483648<br/></div></div><br/>Tags - <a href="http://www.zhanghaijun.com/tags/squid/" rel="tag">squid</a> , <a href="http://www.zhanghaijun.com/tags/linux/" rel="tag">linux</a>
]]>
</description>
</item><item>
<link>http://www.zhanghaijun.com/post//#blogcomment</link>
<title><![CDATA[[评论] 优化squid性能]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.zhanghaijun.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>