<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[运维进行时]]></title> 
<link>https://www.liuts.com/index.php</link> 
<description><![CDATA[互联网运维与架构]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[运维进行时]]></copyright>
<item>
<link>https://www.liuts.com/post/32/</link>
<title><![CDATA[优化squid性能]]></title> 
<author> &lt;&gt;</author>
<category><![CDATA[Squid]]></category>
<pubDate>Wed, 15 Aug 2007 10:22:00 +0000</pubDate> 
<guid>https://www.liuts.com/post/32/</guid> 
<description>
<![CDATA[ 
	<span style="color: #0000FF;">一.文件系统调节</span><br/>1.硬盘不要使用RAID<br/>2.使用性能好的FS(例如: ReiserFS) <br/>在fstab里面添加noatime,async项,提高文件系统的性能.<br/><span style="color: #0000FF;">二. aufs存储机制</span><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/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">[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</div></div><br/>Tags - <a href="https://www.liuts.com/tags/squid/" rel="tag">squid</a> , <a href="https://www.liuts.com/tags/%25E4%25BC%2598%25E5%258C%2596/" rel="tag">优化</a>
]]>
</description>
</item>
</channel>
</rss>