<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jean - 记录成长历程 &#187; 调优</title>
	<atom:link href="http://www.zhangyiqun.net/tag/%e8%b0%83%e4%bc%98/feed" rel="self" type="application/rss+xml" />
	<link>http://www.zhangyiqun.net</link>
	<description>让世界更美好一点儿</description>
	<lastBuildDate>Wed, 07 Dec 2011 14:04:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>关于在线代理的思考及优化思路</title>
		<link>http://www.zhangyiqun.net/998.html</link>
		<comments>http://www.zhangyiqun.net/998.html#comments</comments>
		<pubDate>Sun, 31 Jan 2010 15:55:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux系统]]></category>
		<category><![CDATA[fastcgi]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[调优]]></category>

		<guid isPermaLink="false">http://www.zhangyiqun.net/?p=998</guid>
		<description><![CDATA[凸墙自从上线就没怎么管过，后续的seo都是GF在处理。最近发现网页时有打不开的现象，因为购置的VPS并非独立服务器所以我确实仔细分析了内核参数，nginx配置，fastcgi并没有发现异常，但是可以断定问题肯定是出在fastcgi处理连接上，因为每次重启fastcgi后页面又会恢复往常的访问速度了。 晚上向超群大牛请教了下这个问题，他看过代码后曰： fastcgi是进程阻塞的模型，而在线的访问(web proxy)非常消耗进程。 那么当我用在线代理去请求一个页面，fastcgi将会一直阻塞直到一个页面读完，这个等待时间在网络I/O中所占时间太长。有意思的是Nginx 的核心是网络 I/O 非阻塞。所以从nginx的角度来看fastcgi 永远是阻塞的，从fastcgi的角度看，fastcgi 的另一边永远是阻塞。那么纵然我nginx能接受再多的连接，但最后还要卡在fastcgi上。 在google里找了一圈发现的都是在nginx或者apache与fastcgi的超时时间，却没发现fastcgi自身的设置能够解决模型本身弊端（或许说不上）的方法。 在nginx中 以下两个选项用于防止网络阻塞 tcp_nopush on; tcp_nodelay on; 在apache中 appConnTimeoutn（0 秒） 等待到 FastCGI 应用程序的连接完成的秒数，0 表明使用阻塞 connect()。如果超时到期，则产生 SERVER_ERROR。对于非零值，这表示 select() 中用于写入由非阻塞 connect() 返回的文件描述符的时间量。在许多平台上，非阻塞 connect() 很容易产生问题。另见 -idle-timeout 选项；此选项将产生类似的结果，但其方式更为简便。<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F1498.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F998.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Nginx反向代理安全问题</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F101.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F998.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">对玩转apache之调优的补充之一（系统篇）</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F23.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F998.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">玩转apache之调优</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F583.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F998.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Linux网络性能调优</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p><a title="凸墙代理" href="http://www.vpn38.net" target="_blank">凸墙</a>自从上线就没怎么管过，后续的seo都是GF在处理。最近发现网页时有打不开的现象，因为购置的VPS并非独立服务器所以我确实仔细分析了内核参数，nginx配置，fastcgi并没有发现异常，但是可以断定问题肯定是出在fastcgi处理连接上，因为每次重启fastcgi后页面又会恢复往常的访问速度了。</p>
<p>晚上向超群大牛请教了下这个问题，他看过代码后曰：</p>
<blockquote><p>fastcgi是进程阻塞的模型，而在线的访问(web proxy)非常消耗进程。</p></blockquote>
<p>那么当我用在线代理去请求一个页面，fastcgi将会一直阻塞直到一个页面读完，这个等待时间在网络I/O中所占时间太长。有意思的是Nginx 的核心是网络 I/O 非阻塞。所以从nginx的角度来看fastcgi 永远是阻塞的，从fastcgi的<span id="ctl00_MainContentPlaceholder_ctl01_ctl00_lblEntry">角度看，fastcgi 的另一边永远是阻塞</span>。那么纵然我nginx能接受再多的连接，但最后还要卡在fastcgi上。</p>
<p><span id="more-998"></span></p>
<p>在google里找了一圈发现的都是在nginx或者apache与fastcgi的超时时间，却没发现fastcgi自身的设置能够解决模型本身弊端（或许说不上）的方法。</p>
<p><strong>在nginx中</strong></p>
<p>以下两个选项用于防止网络阻塞</p>
<p>tcp_nopush on;</p>
<p>tcp_nodelay on;</p>
<p><strong>在apache中</strong></p>
<p>appConnTimeoutn（0 秒）<br />
等待到 FastCGI 应用程序的连接完成的秒数，0 表明使用阻塞 connect()。如果超时到期，则产生 SERVER_ERROR。对于非零值，这表示 select() 中用于写入由非阻塞 connect() 返回的文件描述符的时间量。在许多平台上，非阻塞 connect() 很容易产生问题。另见 -idle-timeout 选项；此选项将产生类似的结果，但其方式更为简便。</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F1498.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F998.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Nginx反向代理安全问题</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F101.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F998.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">对玩转apache之调优的补充之一（系统篇）</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F23.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F998.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">玩转apache之调优</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F583.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F998.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Linux网络性能调优</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://www.zhangyiqun.net/998.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux网络性能调优</title>
		<link>http://www.zhangyiqun.net/583.html</link>
		<comments>http://www.zhangyiqun.net/583.html#comments</comments>
		<pubDate>Sun, 09 Aug 2009 12:14:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux系统]]></category>
		<category><![CDATA[调优]]></category>

		<guid isPermaLink="false">http://www.zhangyiqun.cn/?p=583</guid>
		<description><![CDATA[#老外写的文章，看过后觉得非常不错，国内大部分是转载的英文版，我翻译过来造福一下大众吧。 我有两台服务器放在不同的机房.在两台服务器间会有一些大文件需要传输,每当这个时候我的网络性能就变的很差劲.在linux下我将如何通过调节TCP来改善这个问题呢? 其实linux默认的网络设置并不适用于大文件在广域网中传递,通常只是为了节省内存资源.现在你可以通过调节Linux的网络协议栈的缓冲区大小,增加网络的高速网络连接的服务器系统，以处理更多的数据包。 linux系统的默认tcp缓冲非常小,这个数值是根据系统内存算出来的.可以通过下面的命令查看一下 $ cat /proc/sys/net/ipv4/tcp_mem 通过下面两个命令可以看到默认和最大的系统套接字缓冲区(收取) $ cat /proc/sys/net/core/rmem_default $ cat /proc/sys/net/core/rmem_max 通过下面两个命令可以看到默认和最大的系统套接字缓冲区(发送) $ cat /proc/sys/net/core/wmem_default $ cat /proc/sys/net/core/wmem_max socket buffer的最大初始化值 $ cat /proc/sys/net/core/optmem_max 调优 我将上文提到的(收取)和(发送)缓冲调到12MB,系统套接字缓冲区的调整将会对所有协议有影响.也就是说以后TCP发送或者接收数据时的缓冲都是用这个数值. 注意！ rmem_max 和 wmem_max的默认大小是128 KB，在大多数情况下并不需要修改，在web或者dns服务器中使用默认值也不错。不过当你感到有明显的延迟时便可以根据以下的参数修改，修改后会增大内存的开销。 增大系统套接字缓冲区 # echo &#8216;net.core.wmem_max=12582912&#8242; >> /etc/sysctl.conf # echo &#8216;net.core.rmem_max=12582912&#8242; >> /etc/sysctl.conf 增大TCP接收和发送缓冲区 # echo &#8216;net.ipv4.tcp_rmem= 10240 87380 12582912&#8242; >> /etc/sysctl.conf # echo [...]<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F101.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F583.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">对玩转apache之调优的补充之一（系统篇）</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F23.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F583.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">玩转apache之调优</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F365.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F583.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">linux的TCP性能调整</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F199.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F583.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">图形化vmstat</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>#老外写的文章，看过后觉得非常不错，国内大部分是转载的英文版，我翻译过来造福一下大众吧。</p>
<p>我有两台服务器放在不同的机房.在两台服务器间会有一些大文件需要传输,每当这个时候我的网络性能就变的很差劲.在linux下我将如何通过调节TCP来改善这个问题呢?<br />
其实linux默认的网络设置并不适用于大文件在广域网中传递,通常只是为了节省内存资源.现在你可以通过调节Linux的网络协议栈的缓冲区大小,增加网络的高速网络连接的服务器系统，以处理更多的数据包。</p>
<p><span id="more-583"></span></p>
<p>linux系统的默认tcp缓冲非常小,这个数值是根据系统内存算出来的.可以通过下面的命令查看一下</p>
<blockquote><p>$ cat /proc/sys/net/ipv4/tcp_mem</p></blockquote>
<p>通过下面两个命令可以看到默认和最大的系统套接字缓冲区(收取)</p>
<blockquote><p>$ cat /proc/sys/net/core/rmem_default<br />
$ cat /proc/sys/net/core/rmem_max
</p></blockquote>
<p>通过下面两个命令可以看到默认和最大的系统套接字缓冲区(发送)</p>
<blockquote><p>$ cat /proc/sys/net/core/wmem_default<br />
$ cat /proc/sys/net/core/wmem_max
</p></blockquote>
<p>socket buffer的最大初始化值</p>
<blockquote><p>$ cat /proc/sys/net/core/optmem_max
</p></blockquote>
<p>调优<br />
我将上文提到的(收取)和(发送)缓冲调到12MB,系统套接字缓冲区的调整将会对所有协议有影响.也就是说以后TCP发送或者接收数据时的缓冲都是用这个数值.<br />
注意！ rmem_max 和 wmem_max的默认大小是128 KB，在大多数情况下并不需要修改，在web或者dns服务器中使用默认值也不错。不过当你感到有明显的延迟时便可以根据以下的参数修改，修改后会增大内存的开销。</p>
<p>增大系统套接字缓冲区</p>
<blockquote><p># echo &#8216;net.core.wmem_max=12582912&#8242; >> /etc/sysctl.conf<br />
# echo &#8216;net.core.rmem_max=12582912&#8242; >> /etc/sysctl.conf
</p></blockquote>
<p>增大TCP接收和发送缓冲区</p>
<blockquote><p># echo &#8216;net.ipv4.tcp_rmem= 10240 87380 12582912&#8242; >> /etc/sysctl.conf<br />
# echo &#8216;net.ipv4.tcp_wmem= 10240 87380 12582912&#8242; >> /etc/sysctl.conf
</p></blockquote>
<p>开启window scaling</p>
<blockquote><p># echo &#8216;net.ipv4.tcp_window_scaling = 1&#8242; >> /etc/sysctl.conf
</p></blockquote>
<p>时间戳在(请参考RFC 1323)TCP的包头增加12个字节</p>
<blockquote><p># echo &#8216;net.ipv4.tcp_timestamps = 1&#8242; >> /etc/sysctl.conf
</p></blockquote>
<p>启用有选择的应答</p>
<blockquote><p># echo &#8216;net.ipv4.tcp_sack = 1&#8242; >> /etc/sysctl.conf
</p></blockquote>
<p>默认情况下一个tcp连接关闭后,把这个连接曾经有的参数比如慢启动门限snd_sthresh,拥塞窗口snd_cwnd 还有srtt等信息保存到dst_entry中, 只要dst_entry 没有失效,下次新建立相同连接的时候就可以使用保存的参数来初始化这个连接.通常情况下是关闭的。</p>
<blockquote><p># echo &#8216;net.ipv4.tcp_no_metrics_save = 1&#8242; >> /etc/sysctl.conf
</p></blockquote>
<p>每个网络接口接收数据包的速率比内核处理这些包的速率快时，允许送到队列的数据包的最大数目</p>
<blockquote><p># echo &#8216;net.core.netdev_max_backlog = 5000&#8242; >> /etc/sysctl.conf
</p></blockquote>
<p>好了，现在重新加载配置文件</p>
<blockquote><p># sysctl -p
</p></blockquote>
<p>使用tcpdump看看修够后带来的变化</p>
<blockquote><p># tcpdump -ni eth0
</p></blockquote>
<p><strong>其他说明:</strong></p>
<p>关于window scaling可以参考http://kerneltrap.org/node/6723 ，其实看看tcp/ip详解就啥都明白了。<br />
在对net.ipv4.tcp_no_metrics_save描述时我没有忠于原文<br />
By default, TCP saves various connection metrics in the route cache when the connection closes, so that connections established in the near future can use these to set initial conditions. Usually, this increases overall performance, but may sometimes cause performance degradation. If set, TCP will not cache metrics on closing connections.<br />
原文地址：http://www.cyberciti.biz/faq/linux-tcp-tuning/</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F101.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F583.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">对玩转apache之调优的补充之一（系统篇）</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F23.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F583.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">玩转apache之调优</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F365.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F583.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">linux的TCP性能调整</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F199.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F583.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">图形化vmstat</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://www.zhangyiqun.net/583.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>linux的TCP性能调整</title>
		<link>http://www.zhangyiqun.net/365.html</link>
		<comments>http://www.zhangyiqun.net/365.html#comments</comments>
		<pubDate>Mon, 11 May 2009 14:24:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web服务器]]></category>
		<category><![CDATA[调优]]></category>

		<guid isPermaLink="false">http://www.zhangyiqun.cn/?p=365</guid>
		<description><![CDATA[服务器如果对TCP性能做调整，会取得更加的响应效果，目前还没有明确的数值印象，但我感觉肯定是有很大的作用。 大致的过程： 因为服务器对网络性能都是通过 /proc/sys/下的相应的设置进行处理的，所以对相应的参数调整，能达到最佳性能。sysctl 是一个读写本设置的工具，直接修改相关的参数。 目前收集到的页面有一些，先记录一下，不能随便用，等测试过了，才能做应用： 1 lighttpd官网的优化指导 http://redmine.lighttpd.net/wiki/lighttpd/Docs:Performance 2 How To: Network / TCP / UDP Tuning http://wwwx.cs.unc.edu/~sparkst/howto/network_tuning.php 3 TCP performance tuning &#8211; how to tune linux http://www.acc.umu.se/~maswan/linux-netperf.txt 4 Linux TCP Tuning http://www-didc.lbl.gov/TCP-tuning/linux.html 5 通过调整Linux TCP参数 提高服务器性能 http://www.xtzj.com/read-htm-tid-142200.html from : http://hilinux.com/bbs/thread-1017-1-1.html<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F583.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F365.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Linux网络性能调优</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F23.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F365.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">玩转apache之调优</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F101.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F365.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">对玩转apache之调优的补充之一（系统篇）</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F199.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F365.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">图形化vmstat</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>服务器如果对TCP性能做调整，会取得更加的响应效果，目前还没有明确的数值印象，但我感觉肯定是有很大的作用。<br />
<span id="more-365"></span></p>
<p>大致的过程：<br />
因为服务器对网络性能都是通过 /proc/sys/下的相应的设置进行处理的，所以对相应的参数调整，能达到最佳性能。sysctl 是一个读写本设置的工具，直接修改相关的参数。</p>
<p>目前收集到的页面有一些，先记录一下，不能随便用，等测试过了，才能做应用：</p>
<p>1 lighttpd官网的优化指导</p>
<p>http://redmine.lighttpd.net/wiki/lighttpd/Docs:Performance</p>
<p>2 How To: Network / TCP / UDP Tuning</p>
<p>http://wwwx.cs.unc.edu/~sparkst/howto/network_tuning.php</p>
<p>3 TCP performance tuning &#8211; how to tune linux</p>
<p>http://www.acc.umu.se/~maswan/linux-netperf.txt</p>
<p>4 Linux TCP Tuning</p>
<p>http://www-didc.lbl.gov/TCP-tuning/linux.html</p>
<p>5 通过调整Linux TCP参数 提高服务器性能</p>
<p>http://www.xtzj.com/read-htm-tid-142200.html</p>
<p>from : http://hilinux.com/bbs/thread-1017-1-1.html</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F583.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F365.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Linux网络性能调优</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F23.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F365.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">玩转apache之调优</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F101.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F365.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">对玩转apache之调优的补充之一（系统篇）</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F199.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F365.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">图形化vmstat</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://www.zhangyiqun.net/365.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>对玩转apache之调优的补充之一（系统篇）</title>
		<link>http://www.zhangyiqun.net/101.html</link>
		<comments>http://www.zhangyiqun.net/101.html#comments</comments>
		<pubDate>Thu, 16 Apr 2009 12:12:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web服务器]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[系统调优]]></category>
		<category><![CDATA[调优]]></category>

		<guid isPermaLink="false">http://www.zhangyiqun.cn/?p=101</guid>
		<description><![CDATA[1、除特别说明外，本博客内容皆为原创，可以自由转载传播，但请署名及注明出处，不尊重别人劳动成果的不欢迎； 2、本博客内容遵守“署名-非商业性使用-禁止演绎 2.5 中国大陆”协议； 写在前面 计划补充三个部分，包括系统、php和mysql。因对系统底层不是很了解，故调优面可能比较片面，还望有经验的朋友能够多多指导，于我而言写文章的过程也是一个成长的过程。 安装 LAMP 软件是非常容易的。但是安装的简便性使人误以为这些软件会自行顺利地运行，虽然实际情况并非如此。最终，应用程序的负载会超出后端服务器的处理能力，应用程序的性能会降低。所以LAMP 安装需要不断监控、调优和评估。 LAMP架构 基于 LAMP 的应用程序是用 PHP 这样的脚本语言编写的，它们作为Apache Web 服务器的一部分运行。PHP 应用程序通过请求的 URL、所有表单数据和已捕获的任意会话信息从客户机获得信息，从而确定应该执行什么操作。如有必要，服务器会从 MySQL 数据库（也在 Linux 上运行）获得信息，将这些信息与一些 Hypertext Markup Language（HTML）模板组合在一起，并将结果返回给客户机。当用户在应用程序中导航时，这个过程重复进行；当多个用户访问系统时，这个过程会并发进行。但是，数据流不是单向的，因为可以用来自用户的信息更新数据库，包括会话数据、统计数据（包括投票）和用户提交的内容（比如评论或站点更新）。除了动态元素之外，还有静态元素，比如图像、JavaScript 代码和层叠样式表（CSS）。 在研究 LAMP 系统中的请求流之后，就来看看可能出现性能瓶颈的地方。数据库提供许多动态信息，所以数据库对查询的响应延迟都会反映在客户机中。Web 服务器必须能够快速地执行脚本，还要能够处理多个并发请求。最后，底层操作系统必须处于良好的状态才能支持应用程序。 在进行实验之前需要先了解什么是吞吐率？ 服务器在实际运行期间单位时间内处理的请求数 实验机 硬件方面 CPU cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 22 model name : [...]<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F23.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F101.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">玩转apache之调优</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F583.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F101.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Linux网络性能调优</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F199.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F101.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">图形化vmstat</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F365.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F101.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">linux的TCP性能调整</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><span>1、除特别说明外，本博客内容皆为原创，可以自由转载传播，但请署名及注明出处，不尊重别人劳动成果的不欢迎；</span></p>
<p><span>2、本博客内容遵守“</span><a href="http://creativecommons.org/licenses/by-nc-nd/2.5/cn/" target="_blank"><span>署名-非商业性使用-禁止演绎 2.5 中国大陆</span></a><span>”协议；</span></p>
<p>写在前面</p>
<p>计划<a title="玩转apache之调优" href="http://www.zhangyiqun.net/23.html" target="_blank">补充</a>三个部分，包括系统、php和mysql。因对系统底层不是很了解，故调优面可能比较片面，还望有经验的朋友能够多多指导，于我而言写文章的过程也是一个成长的过程。<br />
<span id="more-101"></span><br />
安装 LAMP 软件是非常容易的。但是安装的简便性使人误以为这些软件会自行顺利地运行，虽然实际情况并非如此。最终，应用程序的负载会超出后端服务器的处理能力，应用程序的性能会降低。所以LAMP 安装需要不断监控、调优和评估。</p>
<p>LAMP架构</p>
<p>基于 LAMP 的应用程序是用 PHP 这样的脚本语言编写的，它们作为Apache Web 服务器的一部分运行。PHP 应用程序通过请求的 URL、所有表单数据和已捕获的任意会话信息从客户机获得信息，从而确定应该执行什么操作。如有必要，服务器会从 MySQL 数据库（也在 Linux 上运行）获得信息，将这些信息与一些 Hypertext Markup Language（HTML）模板组合在一起，并将结果返回给客户机。当用户在应用程序中导航时，这个过程重复进行；当多个用户访问系统时，这个过程会并发进行。但是，<strong>数据流不是单向的</strong>，<strong>因为可以用来自用户的信息更新数据库</strong>，包括会话数据、统计数据（包括投票）和用户提交的内容（比如评论或站点更新）。除了动态元素之外，还有静态元素，比如图像、JavaScript 代码和层叠样式表（CSS）。</p>
<p>在研究 LAMP 系统中的请求流之后，就来看看可能出现性能瓶颈的地方。数据库提供许多动态信息，所以<strong>数据库对查询的响应延迟</strong>都会反映在客户机中。<strong>Web 服务器必须能够快速地执行脚本</strong>，还要能够处理多个并发请求。最后，底层操作系统必须处于良好的状态才能支持应用程序。</p>
<p>在进行实验之前需要先了解什么是吞吐率？</p>
<p>服务器在实际运行期间单位时间内处理的请求数</p>
<p>实验机</p>
<p>硬件方面</p>
<p><strong>CPU</strong><br />
<strong>cat /proc/cpuinfo</strong></p>
<p>processor       : 0<br />
vendor_id       : GenuineIntel<br />
cpu family      : 6<br />
model           : 22<br />
model name      : Intel(R) Celeron(R) CPU          440  @ 2.00GHz<br />
stepping        : 1<br />
cpu MHz         : 2000.024<br />
cache size      : 512 KB<br />
fdiv_bug        : no<br />
hlt_bug         : no<br />
f00f_bug        : no<br />
coma_bug        : no<br />
fpu             : yes<br />
fpu_exception   : yes<br />
cpuid level     : 10<br />
wp              : yes<br />
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss tm pbe nx lm constant_tsc up pni monitor ds_cpl tm2 cx16 xtpr lahf_lm<br />
bogomips        : 4002.21</p>
<p>内存2G</p>
<p><code> total       used       free     shared    buffers     cached<br />
Mem:       2065520     525144    1540376          0      32112     344888</code></p>
<p>硬盘</p>
<p><code># dmesg | grep Vendor<br />
Vendor: ATA       Model: Hitachi HDP72502  Rev: GM2O</code></p>
<p># hdparm -t /dev/sda</p>
<p>/dev/sda:<br />
Timing buffered disk reads:  268 MB in  3.00 seconds =  <span style="color: #ff0000;">89.30 MB/sec</span></p>
<p>网卡</p>
<p><code>eth0: negotiated 100baseTx-FD, link ok</code></p>
<p>系统<br />
RHEL5U1</p>
<p>服务&amp;&amp;程序<br />
<strong> Apache 2.2.11(prefork), MySQL 5.1.30, PHP 5.2.8 &amp; PEAR + SQLite 2.8.17/3.3.17 + multibyte (mbstring) support, Perl 5.10.0, ProFTPD 1.3.1, phpMyAdmin 3.1.1, OpenSSL 0.9.8i, GD 2.0.1, Freetype2 2.1.7, libjpeg 6b, libpng 1.2.12, gdbm 1.8.0, zlib 1.2.3, expat 1.2, Sablotron 1.0, libxml 2.7.2, Ming 0.3, Webalizer 2.01, pdf class 009e, ncurses 5.3, mod_perl 2.0.4, FreeTDS 0.63, gettext 0.11.5, IMAP C-Client 2004e, OpenLDAP (client) 2.3.11, mcrypt 2.5.7, mhash 0.8.18, eAccelerator 0.9.5.3, cURL 7.19.2, libxslt 1.1.8, phpSQLiteAdmin 0.2, libapreq 2.08, FPDF 1.6</strong></p>
<p><strong> WordPress.v2.7.Incl.Simp.Chinese.Pack.v2-wpcng</strong></p>
<p>为了让整个实验更加严谨，本次使用了5台真实的机器，配置相同。2台为web服务器，其余3台为客户端。<br />
使用了带有27000条数据的wordpress博客。<br />
使用ab进行测试。这是我最不满意的地方，如果可以用Jmeter或者LoadRunner等专业工具，提供的数据将更加全面，没用是因为我没接触过。</p>
<p>测试<br />
1.关闭不需要的服务后，服务器处理能力前后的变化</p>
<p>默认配置的ab结果<br />
A</p>
<p><img class="alignnone" title="LAMP调优" src="http://www.zhangyiqun.net/wp-content/uploads/2009/image/LAMP/system1/mA.JPG" alt="" width="609" height="803" /></p>
<p>B</p>
<p><img class="alignnone" title="服务调优前后" src="http://www.zhangyiqun.net/wp-content/uploads/2009/image/LAMP/system1/mB.JPG" alt="" width="622" height="151" /></p>
<p>C</p>
<p><img class="alignnone" title="服务调优前后" src="http://www.zhangyiqun.net/wp-content/uploads/2009/image/LAMP/system1/mC.JPG" alt="" width="663" height="175" /></p>
<p>关闭不需要服务后的ab结果</p>
<p>A</p>
<p><img class="alignnone" title="调优前后" src="http://www.zhangyiqun.net/wp-content/uploads/2009/image/LAMP/system1/tA.jpg" alt="" width="599" height="805" /></p>
<p>B</p>
<p><img class="alignnone" title="调优前后" src="http://www.zhangyiqun.net/wp-content/uploads/2009/image/LAMP/system1/tB.jpg" alt="" width="591" height="801" /></p>
<p>C</p>
<p><img class="alignnone" title="调优前后" src="http://www.zhangyiqun.net/wp-content/uploads/2009/image/LAMP/system1/tC.jpg" alt="" width="624" height="195" /></p>
<p>结论：调优后的连接数是未调前的一倍以上，主要原因是未调前其他服务占用了过多的内存。所以如果一个小型网站想提高连接数，增加内存即可。但是连接数增加所带来的另一个问题就是访问速度变得慢了许多（50%以上）。</p>
<p>我所开启的服务如下<br />
crond     crond是Unix下的一个传统程序，该程序周期地运行用户调度的任务。比起传统的Unix版本，Vixie版本添加了不少属性，而且更安全，配置更简单<br />
irqbalance 仅当服务器CPU为S.M.P架构或支持双核心、HT技术时，才需开启，否则关闭<br />
microcode_ctl  可以编码以及发送新的微代码到kernel以更新Intel IA32系列处理器<br />
mysql   一个快速高效可靠的轻型SQL数据库引擎<br />
network     激活/关闭启动时的各个网络接口网络。<br />
random   保存和恢复系统的高质量随机数生成器，这些随机数是系统一些随机行为提供的。<br />
sendmail  邮件服务器<br />
sshd    是 OpenSSH守护进程。用于在不可信网络上提供安全的连接通道。<br />
Syslog   syslog是操作系统提供的一种机制，守护程序通常使用这种机制将各种信息写到各个系统日志文件。通常应该启动该服务</p>
<p>2.配置磁盘来提高性能：调前 VS 调后<br />
磁盘在 LAMP 架构中扮演着重要的角色。静态文件、模板和代码都来自磁盘，组成数据库的数据表和索引也来自磁盘。对磁盘的许多调优（尤其是对于数据库）集中于避免磁盘访问，因为磁盘访问的延迟相当高。因此，花一些时间对磁盘硬件进行优化是有意义的。首先要做的是，确保在文件系统上<span style="color: #ff0000;">禁用 atime 日志记录特性</span>。a<strong>time 是最近访问文件的时间，每当访问文件时，底层文件系统必须记录这个时间戳。</strong>因为系统管理员很少使用 atime，禁用它可以减少磁盘访问时间。禁用这个特性的方法是，在 /etc/fstab 的第四列中添加 noatime 选项。<br />
A</p>
<p><img class="alignnone" title="调优前后" src="http://www.zhangyiqun.net/wp-content/uploads/2009/image/LAMP/system2/MA.JPG" alt="" width="597" height="801" /></p>
<p>B</p>
<p><img class="alignnone" title="调优前后" src="http://www.zhangyiqun.net/wp-content/uploads/2009/image/LAMP/system2/MB.JPG" alt="" width="537" height="193" /></p>
<p>C</p>
<p><img class="alignnone" title="调优前后" src="http://www.zhangyiqun.net/wp-content/uploads/2009/image/LAMP/system2/MC.JPG" alt="" width="585" height="799" /></p>
<p>调后</p>
<p>A</p>
<p><img class="alignnone" title="调优前后" src="http://www.zhangyiqun.net/wp-content/uploads/2009/image/LAMP/system2/TA.JPG" alt="" width="597" height="805" /></p>
<p>B</p>
<p><img class="alignnone" title="调优前后" src="http://www.zhangyiqun.net/wp-content/uploads/2009/image/LAMP/system2/TB.JPG" alt="" width="583" height="796" /></p>
<p>C</p>
<p><img class="alignnone" title="调优前后" src="http://www.zhangyiqun.net/wp-content/uploads/2009/image/LAMP/system2/TC.JPG" alt="" width="571" height="196" /></p>
<p>结论：调前和调后几乎没差别。因为网络带宽是100mbps，那么目前所使用的硬盘永远不会成为瓶颈，除非不是网络应用。</p>
<p>关闭atime的方法</p>
<p>/dev/VolGroup00/LogVol00 /                      ext3    defaults,noatime        1 1<br />
LABEL=/boot             /boot                   ext3    defaults,noatime        1 2<br />
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0<br />
tmpfs                   /dev/shm                tmpfs   defaults        0 0<br />
proc                    /proc                   proc    defaults        0 0<br />
sysfs                   /sys                    sysfs   defaults        0 0<br />
LABEL=SWAP-hdb2         swap                    swap    defaults        0 0<br />
LABEL=SWAP-hda3         swap                    swap    defaults        0 0</p>
<p>3.对内核的优化，这里面的水很深，目前我还没有融汇贯通，只能发上来一些东西供大家参考。不懂的话最好不要搞，对内核调节危险很大。</p>
<p>vi /etc/sysctl<br />
# Use TCP syncookies when needed<br />
net.ipv4.tcp_syncookies = 1<br />
# Enable TCP window scaling<br />
net.ipv4.tcp_window_scaling = 1<br />
# Increase TCP max buffer size<br />
net.core.rmem_max = 16777216<br />
net.core.wmem_max = 16777216<br />
# Increase Linux autotuning TCP buffer limits<br />
net.ipv4.tcp_rmem = 4096 87380 16777216<br />
net.ipv4.tcp_wmem = 4096 65536 16777216<br />
# Increase number of ports available<br />
net.ipv4.ip_local_port_range = 1024 65000</p>
<p>本次不光完成了实验而且知道了：<br />
解除phpMyAdmin 导入大型MySQL数据库文件大小限制</p>
<p>1. 修改 php.ini 文件中下列3项的值：</p>
<p>upload_max_filesize, memory_limit 和 post_max_size</p>
<p>upload_max_filesize，上传文件大小</p>
<p>memory_limit 设置内存</p>
<p>post_max_size 提交数据的最大值</p>
<p>为你想改的大小值.</p>
<p>2. 在 phpMyAdmin 的配置文件中修改或加入这个设置：</p>
<p>这个文件一般是在phpMyAdmin目录下的config.inc.php文件</p>
<p>$cfg['ExecTimeLimit']           = 0;    // maximum execution time in seconds (0 for no limit)</p>
<p>默认为300秒钟，改为0表示不受限制</p>
<p>参考文献<br />
<a title="apache" href="http://www.ibm.com/developerworks/linux/library/l-tune-lamp-1/index.html?S_TACT=105AGX52&amp;S_CMP=cn-a-l" target="_blank"> Tuning LAMP systems, Part 1: Understanding the LAMP architecture</a></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F23.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F101.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">玩转apache之调优</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F583.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F101.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Linux网络性能调优</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F199.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F101.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">图形化vmstat</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F365.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F101.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">linux的TCP性能调整</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://www.zhangyiqun.net/101.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>图形化vmstat</title>
		<link>http://www.zhangyiqun.net/199.html</link>
		<comments>http://www.zhangyiqun.net/199.html#comments</comments>
		<pubDate>Thu, 02 Apr 2009 08:08:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux系统]]></category>
		<category><![CDATA[调优]]></category>

		<guid isPermaLink="false">http://www.zhangyiqun.cn/?p=199</guid>
		<description><![CDATA[I don’t know if it is because of my science background, I am a physicist, I do like graphs, especially when I do performance tuning. With UNIX like operating systems, the vmstat command give you an easy way to grab many essential performance counters but, generating graphs from vmstat output with tools like OpenOffice Calc is time [...]<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F583.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F199.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Linux网络性能调优</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F23.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F199.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">玩转apache之调优</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F101.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F199.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">对玩转apache之调优的补充之一（系统篇）</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F365.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F199.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">linux的TCP性能调整</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>I don’t know if it is because of my science background, I am a physicist, I do like graphs, especially when I do performance tuning. With UNIX like operating systems, the <em>vmstat</em> command give you an easy way to grab many essential performance counters but, generating graphs from vmstat output with tools like OpenOffice Calc is time consuming and not very efficient. In order to solve this, I wrote a few scripts using gnuplot but they are not very easy to work with. Then, doing some benchmarks with DBT2, I found the <em>vmplot.sh</em> script and… I like that one. I just hacked it little bit to make it keeps the graph on screen, adding the “-persist” parameters to the gnuplot invocations. The script will produce 7 graphs that will be displayed on screen and save in png format in /tmp. The graphs it produces are the following:</p>
<p><span id="more-199"></span></p>
<ul>
<li><strong>CPU</strong>: graphs idle, user, sys and wait time</li>
<li><strong>CS</strong>: graphs the context switches/s</li>
<li><strong>IN</strong>: graphs the interrupts/s</li>
<li><strong>IO</strong>: graphs the block read and written to disk per second</li>
<li><strong>Memory</strong>: graphs the memory usage (swapped, free, buffers, cache)</li>
<li><strong>Procs</strong>: graphs the number of running and blocked processes</li>
<li><strong>Swap</strong>: graphs swap in and swap out activity</li>
</ul>
<p>For the interested ones, my version of vmplot script is available <a href="http://www.bigdbahead.com/wp-content/uploads/2009/03/vmplot.gz">here</a>.</p>
<p>原文链接：<a href="http://www.bigdbahead.com/?p=302">http://www.bigdbahead.com/?p=302</a></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F583.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F199.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Linux网络性能调优</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F23.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F199.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">玩转apache之调优</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F101.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F199.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">对玩转apache之调优的补充之一（系统篇）</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F365.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F199.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">linux的TCP性能调整</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://www.zhangyiqun.net/199.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>玩转apache之调优</title>
		<link>http://www.zhangyiqun.net/23.html</link>
		<comments>http://www.zhangyiqun.net/23.html#comments</comments>
		<pubDate>Thu, 12 Feb 2009 12:06:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web服务器]]></category>
		<category><![CDATA[调优]]></category>

		<guid isPermaLink="false">http://www.zhangyiqun.cn/?p=23</guid>
		<description><![CDATA[1、除特别说明外，本博客内容皆为原创，可以自由转载传播，但请署名及注明出处，不尊重别人劳动成果的不欢迎； 2、本博客内容遵守“署名-非商业性使用-禁止演绎 2.5 中国大陆”协议； 作者：张逸群 Mail:jeantoe@gmail.com 调优是一个大主题，涉及面颇广。目前受条件所限，大部分人可能只能从apache本身入手调优。所以本文将主要从apache的配置方面入手来详解apache调优。希望对正在使用apache的朋友有所裨益，有什么问题欢迎交流探讨，大家共同学习共同进步！ KeepAlive参数 KeepAlive On MaxKeepAliveRequests 0 KeepAliveTimeout 15 使用keepalive可以在单一连接时进行多个请求。 Keepalivetimeout 每个连接保持的时间 MaxKeepAliveRequests这个我就不解释了，意思是最大保持的连接数，0为不限制。 我在来形象的描述一下，KeepAlive中的连接就像是餐厅中的女服务员，我和几个哥们要了几个菜以后，她不走还站继续服务（雅间门口的服务员），等了一个小时超过了她的最大服务时间（Keepalivetimeout），于是她撤了 这个功能是开还是不开呢？因服务器而异，就像五星级的餐厅和街边小餐馆的区别。 选择多处理模块（Multi-Processing Module，MPM） 这玩意主要负责管理网络连接、调度请求。理解成不同的社会制度就好，万恶的封建主义和万恶的资本主义，很难说的清谁好谁坏，所以针对不同情况选择就好。 每次只能有一种 MPM 被应用，必须使用 –with-mpm=(worker&#124;prefork&#124;event) 静态编译。Apache默认安装是使用一个进程的传统模型称为 prefork。较新的线程化模型称为 worker，它使用多个进程，每个进程又有多个线程，这样就能以较低的开销获得更好的性能。最新的 event MPM 是一种实验性的模型，为不同的任务使用单独的线程池。要确定当前使用的是哪种 MPM，可执行 httpd -l。 MPM中的MinSpareServers 和MaxSpareServers MinSpareServers指令设置空闲子进程的最小数量。所谓空闲子进程是指没有正在处理请求的子进程。如果当前空闲子进程数少于MinSpareServers ，那么Apache将以最大每秒一个的速度产生新的子进程。 只有在非常繁忙机器上才需要调整这个参数。将此参数设的太大通常是一个坏主意。 MaxSpareServers指令设置空闲子进程的最大数量。所谓空闲子进程是指没有正在处理请求的子进程。如果当前有超过MaxSpareServers数量的空闲子进程，那么父进程将杀死多余的子进程。只有在非常繁忙机器上才需要调整这个参数。将此参数设的太大通常是一个坏主意。如果你将该指令的值设置为比MinSpareServers小，Apache将会自动将其修改成“MinSpareServers+1″。 以上说明摘自apache中文手册。根据我个人的理解这个进程就像是apache大酒店的服务小姐，MinSpareServers设置的就是小姐的基本富裕人数，服务员带着我去开房了这时候如果有其他人来也需要有人照顾的对吧？这个富裕人数就是应对这种状况的。MaxSpareServers就是最大空闲人数了，什么意思？你一个三星apache大酒店搞2万个服务员开的下去吗？很显然除非你有门路，不然是没有那么多人的，服务员住哪（硬件）都是个问题。哈哈，扯远了。所以设定这个值一定要结合自身情况，当客流量大的时候数值也适当增大。可是流量大的时候也就是个别时段，所以用crontab搞一下就好 prefork模式中的调节 默认配置如下 StartServers       8 MinSpareServers    5 MaxSpareServers   20 ServerLimit      256 MaxClients       256 MaxRequestsPerChild  4000 几乎所有的文档都会罗列出上面的数据。StartServers的值是只要启动服务就会立即启动 8 个进程，并尽力保持 5 到 20 [...]<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F101.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F23.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">对玩转apache之调优的补充之一（系统篇）</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F583.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F23.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Linux网络性能调优</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F199.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F23.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">图形化vmstat</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F365.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F23.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">linux的TCP性能调整</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><span>1、除特别说明外，本博客内容皆为原创，可以自由转载传播，但请署名及注明出处，不尊重别人劳动成果的不欢迎；</span></p>
<p><span>2、本博客内容遵守“</span><a href="http://creativecommons.org/licenses/by-nc-nd/2.5/cn/" target="_blank"><span>署名-非商业性使用-禁止演绎 2.5 中国大陆</span></a><span>”协议；</span></p>
<p class="MsoNormal">作者：张逸群</p>
<p class="MsoNormal"><span lang="EN-US">Mail:jeantoe@gmail.com</span></p>
<p class="MsoNormal">调优是一个大主题，涉及面颇广。目前受条件所限，大部分人可能只能从<span lang="EN-US">apache</span>本身入手调优。所以本文将主要从<span lang="EN-US">apache</span>的配置方面入手来详解<span lang="EN-US">apache</span>调优。希望对正在使用<span lang="EN-US">apache</span>的朋友有所裨益，有什么问题欢迎交流探讨，大家共同学习共同进步！</p>
<p class="MsoNormal"><span id="more-23"></span></p>
<p class="MsoNormal"><strong><span lang="EN-US">KeepAlive</span></strong><strong>参数</strong><strong> </strong></p>
<p class="MsoNormal" align="left"><span lang="EN-US">KeepAlive On</span></p>
<p class="MsoNormal" align="left"><span lang="EN-US">MaxKeepAliveRequests 0</span></p>
<p class="MsoNormal"><span lang="EN-US">KeepAliveTimeout 15</span></p>
<p class="MsoNormal">使用<span lang="EN-US">keepalive</span>可以在单一连接时进行多个请求。</p>
<p class="MsoNormal"><span lang="EN-US">Keepalivetimeout </span>每个连接保持的时间</p>
<p class="MsoNormal"><span lang="EN-US">MaxKeepAliveRequests</span>这个我就不解释了，意思是最大保持的连接数，<span lang="EN-US">0</span>为不限制。</p>
<p class="MsoNormal">我在来形象的描述一下，<span lang="EN-US">KeepAlive</span>中的连接就像是餐厅中的女服务员，我和几个哥们要了几个菜以后，她不走还站继续服务（雅间门口的服务员），等了一个小时超过了她的最大服务时间（<span lang="EN-US">Keepalivetimeout</span>），于是她撤了</p>
<p class="MsoNormal">这个功能是开还是不开呢？因服务器而异，就像五星级的餐厅和街边小餐馆的区别。</p>
<p class="MsoNormal"><span lang="EN-US"><br />
</span></p>
<p class="MsoNormal">选择多处理模块（<span lang="EN-US">Multi-Processing Module</span>，<span lang="EN-US">MPM</span>）</p>
<p class="MsoNormal">这玩意主要负责管理网络连接、调度请求。理解成不同的社会制度就好，万恶的封建主义和万恶的资本主义，很难说的清谁好谁坏，所以针对不同情况选择就好。</p>
<p class="MsoNormal">每次只能有一种<span lang="EN-US"> MPM </span>被应用，必须使用 <code><span lang="EN-US">–with-mpm=<em>(worker|prefork|event)</em> </span></code>静态编译。<span lang="EN-US">Apache</span>默认安装是使用一个进程的传统模型称为 <em><span lang="EN-US">prefork</span></em>。较新的线程化模型称为 <em><span lang="EN-US">worker</span></em>，它使用多个进程，每个进程又有多个线程，这样就能以较低的开销获得更好的性能。最新的 <em><span lang="EN-US">event</span></em><span lang="EN-US"> MPM </span>是一种实验性的模型，为不同的任务使用单独的线程池。要确定当前使用的是哪种<span lang="EN-US"> MPM</span>，可执行 <code><span lang="EN-US">httpd -l</span></code>。</p>
<p class="MsoNormal">
<p class="MsoNormal"><span lang="EN-US">MPM</span>中的<span lang="EN-US">MinSpareServers</span><span lang="EN-US"> </span>和<span lang="EN-US">MaxSpareServers</span></p>
<p class="MsoNormal"><span lang="EN-US">MinSpareServers</span>指令设置空闲子进程的最小数量。所谓空闲子进程是指没有正在处理请求的子进程。如果当前空闲子进程数少于<span lang="EN-US">MinSpareServers </span>，那么<span lang="EN-US">Apache</span>将以最大每秒一个的速度产生新的子进程。</p>
<p class="MsoNormal">只有在非常繁忙机器上才需要调整这个参数。将此参数设的太大通常是一个坏主意。</p>
<p class="MsoNormal"><span lang="EN-US">MaxSpareServers</span>指令设置空闲子进程的最大数量。所谓空闲子进程是指没有正在处理请求的子进程。如果当前有超过<span lang="EN-US">MaxSpareServers</span>数量的空闲子进程，那么父进程将杀死多余的子进程。只有在非常繁忙机器上才需要调整这个参数。将此参数设的太大通常是一个坏主意。如果你将该指令的值设置为比<span lang="EN-US">MinSpareServers</span>小，<span lang="EN-US">Apache</span>将会自动将其修改成<span lang="EN-US">“MinSpareServers+1″</span>。</p>
<p class="MsoNormal">以上说明摘自<span lang="EN-US">apache</span>中文手册。根据我个人的理解这个进程就像是<span lang="EN-US">apache</span>大酒店的服务小姐，<span lang="EN-US">MinSpareServers</span>设置的就是小姐的基本富裕人数，服务员带着我去开房了这时候如果有其他人来也需要有人照顾的对吧？这个富裕人数就是应对这种状况的。<span lang="EN-US">MaxSpareServers</span>就是最大空闲人数了，什么意思？你一个三星<span lang="EN-US">apache</span>大酒店搞<span lang="EN-US">2</span>万个服务员开的下去吗？很显然除非你有门路，不然是没有那么多人的，服务员住哪（硬件）都是个问题。哈哈，扯远了。所以设定这个值一定要结合自身情况，当客流量大的时候数值也适当增大。可是流量大的时候也就是个别时段，所以用<span lang="EN-US">crontab</span>搞一下就好</p>
<p class="MsoNormal">
<p class="MsoNormal"><span lang="EN-US">prefork</span>模式中的调节</p>
<p class="MsoNormal" align="left">默认配置如下</p>
<p class="MsoNormal"><span lang="EN-US">StartServers       8</span></p>
<p class="MsoNormal"><span lang="EN-US">MinSpareServers    5</span></p>
<p class="MsoNormal"><span lang="EN-US">MaxSpareServers   20</span></p>
<p class="MsoNormal"><span lang="EN-US">ServerLimit      256</span></p>
<p class="MsoNormal"><span lang="EN-US">MaxClients       256</span></p>
<p class="MsoNormal"><span lang="EN-US">MaxRequestsPerChild  4000</span></p>
<p class="MsoNormal">几乎所有的文档都会罗列出上面的数据。<span lang="EN-US">StartServers</span>的值是只要启动服务就会立即启动 <span lang="EN-US">8 </span>个进程，并尽力保持 <span lang="EN-US">5 </span>到 <span lang="EN-US">20 </span>个空闲服务器运行。进程数的硬性限制由 <code><span lang="EN-US">MaxClients</span></code><span lang="EN-US"> </span>指定。尽管一个进程能够处理许多相继的请求，<span lang="EN-US">Apache </span>还是会取消连接数超过<span lang="EN-US"> 4,000 </span>以后的进程，这降低了内存泄漏的风险。</p>
<p class="MsoNormal">
<p class="MsoNormal"><span lang="EN-US">Worker</span>模式中的调节</p>
<p class="MsoNormal">默认配置如下</p>
<p class="MsoNormal"><span lang="EN-US">StartServers         2</span></p>
<p class="MsoNormal"><span lang="EN-US">MaxClients         150</span></p>
<p class="MsoNormal"><span lang="EN-US">MinSpareThreads     25</span></p>
<p class="MsoNormal"><span lang="EN-US">MaxSpareThreads     75</span></p>
<p class="MsoNormal"><span lang="EN-US">ThreadsPerChild     25</span></p>
<p class="MsoNormal"><span lang="EN-US">MaxRequestsPerChild  0</span></p>
<p class="MsoNormal">与<span lang="EN-US">prefork</span>的调节类似，不同之处只是必须确定使用多少线程和进程。要经过几次尝试和出错之后才能选好要使用的值。最重要的值是 <code><span lang="EN-US">MaxClients</span></code>。目标在于允许足够多的<span lang="EN-US"> workder </span>进程或线程运行，同时又不会导致服务器进行过度的交换。如果传入的请求超出处理能力，那么至少满足此值的那些请求会得到服务，其他请求被阻塞。</p>
<p class="MsoNormal">如果 <code><span lang="EN-US">MaxClients</span></code><span lang="EN-US"> </span>过高，那么所有客户机都将体验到糟糕的服务，因为<span lang="EN-US"> Web </span>服务器会试图换出一个进程，以使另一个进程能够运行。而设得过低意味着可能会不必要地拒绝服务。查看高负载下运行的进程数量和所有<span lang="EN-US"> Apache </span>进程所导致的内存占用情况对设置这个值很有帮助。如果 <code><span lang="EN-US">MaxClients</span></code><span lang="EN-US"> </span>的值超过<span lang="EN-US">256</span>，必须将 <code><span lang="EN-US">ServerLimit</span></code><span lang="EN-US"> </span>也设为同样的数值</p>
<p class="MsoNormal">
<p class="MsoNormal">缓存动态内容</p>
<p class="MsoNormal"><span lang="EN-US">&lt;IfModule mod_cache.c&gt;</span></p>
<p class="MsoNormal"><span lang="EN-US">CacheForceCompletion 100</span></p>
<p class="MsoNormal"><span lang="EN-US">CacheDefaultExpire 3600</span></p>
<p class="MsoNormal"><span lang="EN-US">CacheMaxExpire 86400</span></p>
<p class="MsoNormal"><span lang="EN-US">CacheLastModifiedFactor 0.1</span></p>
<p class="MsoNormal"><span lang="EN-US">&lt;IfModule mod_disk_cache.c&gt;</span></p>
<p class="MsoNormal"><span lang="EN-US">CacheEnable disk /</span></p>
<p class="MsoNormal"><span lang="EN-US">CacheRoot /home/wwwroot/</span></p>
<p class="MsoNormal"><span lang="EN-US">CacheSize 327680</span></p>
<p class="MsoNormal"><span lang="EN-US">CacheDirLength 4</span></p>
<p class="MsoNormal"><span lang="EN-US">CacheDirLevels 5</span></p>
<p class="MsoNormal"><span lang="EN-US">CacheGcInterval 4</span></p>
<p class="MsoNormal"><span lang="EN-US">&lt;/IfModule&gt;</span></p>
<p class="MsoNormal"><span lang="EN-US">&lt;IfModule mod_mem_cache.c&gt;</span></p>
<p class="MsoNormal"><span lang="EN-US">CacheEnable mem /</span></p>
<p class="MsoNormal"><span lang="EN-US">MCacheSize 8192</span></p>
<p class="MsoNormal"><span lang="EN-US">MCacheMaxObjectCount 10000</span></p>
<p class="MsoNormal"><span lang="EN-US">MCacheMinObjectSize 1</span></p>
<p class="MsoNormal"><span lang="EN-US">MCacheMaxObjectSize 51200</span></p>
<p class="MsoNormal"><span lang="EN-US">&lt;/IfModule&gt;</span></p>
<p class="MsoNormal"><span lang="EN-US">&lt;/IfModule&gt;</span></p>
<p class="MsoNormal">
<p class="MsoNormal">参数的解释</p>
<p class="MsoNormal">
<p class="MsoNormal"><span lang="EN-US">mod_cache.c</span></p>
<p class="MsoNormal"><span lang="EN-US">CacheEnable: </span>启动<span lang="EN-US">mod_cache</span>其后接两个参数。第一个参数指定快取的种类，应设为<span lang="EN-US">mem(</span>记忆体快取<span lang="EN-US">)</span>或<span lang="EN-US">disk(</span>磁碟快取<span lang="EN-US">)</span>之其一；第二个参数指定使用快取的<span lang="EN-US">URI</span>路径，如果对整个网站<span lang="EN-US">(</span>或虚拟主机<span lang="EN-US">)</span>进行快取，简单指定为根目录<span lang="EN-US">(/)</span>即可。</p>
<p class="MsoNormal"><span lang="EN-US">CacheForceCompletion: </span>指定当<span lang="EN-US"> HTTP request </span>被取消时，内容的产生动作要完成的百分比；预设是<span lang="EN-US">60(%)</span>。</p>
<p class="MsoNormal"><span lang="EN-US">CacheDefaultExpire: </span>指定快取的预设过期秒数；预设值是一小时 <span lang="EN-US">(3600)</span>。</p>
<p class="MsoNormal"><span lang="EN-US">CacheMaxExpire: </span>指定快取最大的过期秒数；预设值是一天<span lang="EN-US"> (86400)</span>。</p>
<p class="MsoNormal"><span lang="EN-US">CacheLastModifiedFactor: </span>用来从回应里<span lang="EN-US"> Last Modified </span>资讯算出<span lang="EN-US"> expire date</span>。</p>
<p class="MsoNormal">
<p class="MsoNormal"><span lang="EN-US">mod_disk_cache.c</span></p>
<p class="MsoNormal"><span lang="EN-US">CacheRoot: </span>指定磁碟快取所使用的目录。</p>
<p class="MsoNormal"><span lang="EN-US">CacheSize: </span>指定快取使用的磁碟空间大小；以<span lang="EN-US"> KByte </span>为单位。</p>
<p class="MsoNormal"><span lang="EN-US">CacheDirLength: </span>指定各目录存在于快取階层<span lang="EN-US">(hierarchy) </span>中所使用的字元数。</p>
<p class="MsoNormal"><span lang="EN-US">CacheDirLevels: </span>指定快取的目录层数；<span lang="EN-US"> CacheDirLength</span>，<span lang="EN-US">acheDirLevels</span>设定值相乘不能超过<span lang="EN-US"> 20</span>。</p>
<p class="MsoNormal"><span lang="EN-US">CacheGcInterval: </span>指定收垃圾<span lang="EN-US"> (Garbage Collection) </span>的动作间隔时间；单位是小时。<span lang="EN-US">Apache2 </span>中这个指令还沒有被实在。</p>
<p class="MsoNormal">
<p class="MsoNormal"><span lang="EN-US">mod_mem_cache.c</span></p>
<p class="MsoNormal"><span lang="EN-US">MCacheMaxObjectCount </span>最大缓存对象数；默认值<span lang="EN-US">1009</span>。</p>
<p class="MsoNormal"><span lang="EN-US">MCacheMaxObjectSize </span>缓存允许的最大文档大小；默认值<span lang="EN-US">10000</span>。</p>
<p class="MsoNormal"><span lang="EN-US">MCacheMaxStreamingBuffer </span>内存中允许缓冲的最大流式响应字节长度；默认值<span lang="EN-US">100000</span>与<span lang="EN-US">MCacheMaxObjectSize</span>中的小者。</p>
<p class="MsoNormal"><span lang="EN-US">MCacheMinObjectSize </span>允许缓存的最小文档大小；默认值<span lang="EN-US"> 0</span>。</p>
<p class="MsoNormal"><span lang="EN-US">MCacheRemovalAlgorithm </span>定义在需要时哪个文档被移出缓存的算法；默认值<span lang="EN-US"> LRU|GDSF</span>。</p>
<p class="MsoNormal"><span lang="EN-US">MCacheSize </span>允许使用的最大内存量；以<span lang="EN-US">KB</span>为单位默认值<span lang="EN-US">100</span>。</p>
<p class="MsoNormal">关闭网页内容协商</p>
<p class="MsoNormal">一个资源可能会有多种不同的表现形式，比如，可能会有不同语言或者媒体类型的版本甚至其组合。最常用的选择方法是提供一个索引页以供选择。但是由于浏览器可以在请求头信息中提供其首选项的表现形式，因此就有可能让服务器进行自动选择。</p>
<p class="MsoNormal">除非是五星级饭店各国来宾都比较多，否则不建议开启，因为这玩意严重降低性能。</p>
<pre><span lang="EN-US">Options -MultiViews</span></pre>
<p class="MsoNormal">
<p class="MsoNormal">关闭或者开启符号链接</p>
<p class="MsoNormal">这个符号连接就是俗称的软链接，好像是<span lang="EN-US">windows</span>中的快捷方式。</p>
<p class="MsoNormal">通过这个链接用户很可能就进入到你不想让他们看见的位置，从安全角度上来说这是非常糟糕的。所以从安全角度上考虑那就用<em><span lang="EN-US">Options</span></em><span lang="EN-US"> <span class="docemphasis"><em>SymlinksIfOwnerMatch </em></span></span>。当然也许你根本不知道那个符号链接是个什么东西，那就直接<em><span lang="EN-US">Options</span></em><span lang="EN-US"> <span class="docemphasis"><em>FollowSymlinks</em></span><em> </em></span></p>
<p class="MsoNormal">
<p class="MsoNormal">控制<span lang="EN-US">.htaaccess</span>文件</p>
<p class="MsoNormal">关闭在全局选项中改为<span lang="EN-US">AllowOverride None</span></p>
<p class="MsoNormal">这样可以省去<span lang="EN-US">apache</span>找<span lang="EN-US">htaccess</span>的时间，也自然就节省了资源。</p>
<p class="MsoNormal">那么原来的<span lang="EN-US">.htaccess</span>的如何安置呢？将其放入<span lang="EN-US">&lt;Directory&gt;&lt;/Directory&gt;</span>即可。</p>
<p class="MsoNormal">
<p class="MsoNormal">关闭<span lang="EN-US">DNS</span>查询</p>
<p class="MsoNormal">五星级餐厅用的都少。直接关闭。</p>
<p class="MsoNormal"><span lang="EN-US">HostNameLookups Off</span></p>
<p class="MsoNormal">
<p class="MsoNormal">当优化工作完成后</p>
<p class="MsoNormal">使用<span lang="EN-US">ab</span>对负载进行测试</p>
<p class="MsoNormal"><span lang="EN-US">ab –n 1000 –c 1000 <a href="http://www.yourdomain.com/site.html">http://www.yourdomain.com/site.html</a></span></p>
<p class="MsoNormal"><span lang="EN-US">-n 1000 </span>表示请求<span lang="EN-US">1000</span>次</p>
<p class="MsoNormal"><span lang="EN-US">-c 1000 </span>表示每次<span lang="EN-US">1000</span>个请求</p>
<p class="MsoNormal">因为只能对某个页面进行测试，注意是单位是个。所以最后的结果可能并不一定能反应真实情况。</p>
<p class="MsoNormal"><strong>或者使用<span lang="EN-US"> Apache Ant </span></strong><strong>和<span lang="EN-US"> Apache JMeter </span></strong><strong>频繁进行负载测</strong></p>
<p class="MsoNormal"><span lang="EN-US"><a href="http://blog.sina.com.cn/s/blog_4d1cc4c90100becq.html">http://blog.sina.com.cn/s/blog_4d1cc4c90100becq.html</a></span></p>
<p class="MsoNormal">
<p class="MsoNormal">结合自身情况确保关闭系统中不需要的服务</p>
<p class="MsoNormal">参考文献</p>
<p class="MsoNormal"><span lang="EN-US">Apache </span>中<span lang="EN-US"> KeepAlive </span>配置的合理使用</p>
<p class="MsoNormal"><span lang="EN-US"><a href="http://www.linuxtone.org/viewthread.php?tid=913&amp;highlight=apache">http://www.linuxtone.org/viewthread.php?tid=913&amp;highlight=apache</a></span></p>
<p class="MsoNormal"><span lang="EN-US">Keepalive</span>的开启与关闭</p>
<p class="MsoNormal">在理想的网络连接状况下，系统的<span lang="EN-US"> Apache </span>进程数和内存使用可以用如下公式表达：<span lang="EN-US"><br />
HttpdProcessNumber = KeepAliveTimeout * TotalRequestPerSecond / Average(KeepAliveRequests)<br />
HttpdU<span class="ttag">sed</span>Memory = HttpdProcessNumber * MemoryPerHttpdProcess<br />
</span> 换成中文：<span lang="EN-US"><br />
</span>总<span lang="EN-US">Apache</span>进程数<span lang="EN-US"> = KeepAliveTimeout * </span>每秒种<span lang="EN-US">HTTP</span>请求数<span lang="EN-US"> / </span>平均<span lang="EN-US">KeepAlive</span>请求<span lang="EN-US"><br />
Apache</span>占用内存<span lang="EN-US"> = </span>总<span lang="EN-US">Apache</span>进程数<span lang="EN-US"> * </span>平均每进程占用内存数</p>
<p>需要特别说明的是：<span lang="EN-US"><br />
</span> <span lang="EN-US">[</span>平均<span lang="EN-US">KeepAlive</span>请求<span lang="EN-US">] </span>数，是指每个用户连接上服务器后，持续发出的<span lang="EN-US"> HTTP </span>请求数。当<span lang="EN-US">KeepAliveTimeout </span>等<span lang="EN-US"> 0 </span>或者<span lang="EN-US"> KeepAlive </span>关闭时，<span lang="EN-US">KeepAliveTimeout </span>不参与乘的运算从上面的公式看，如果<span lang="EN-US">[</span>每秒用户请求<span lang="EN-US">] </span>多，<span lang="EN-US">[KeepAliveTimeout] </span>的值大，<span lang="EN-US">[</span>平均<span lang="EN-US">KeepAlive</span>请求<span lang="EN-US">] </span>的值小，都会造成<span lang="EN-US"> [Apache</span>进程数<span lang="EN-US">] </span>多和<span lang="EN-US"> [</span>内存<span lang="EN-US">] </span>多，但是当<span lang="EN-US"> [</span>平均<span lang="EN-US">KeepAlive</span>请求<span lang="EN-US">] </span>的值越大时，<span lang="EN-US">[Apache</span>进程数<span lang="EN-US">] </span>和<span lang="EN-US"> [</span>内存<span lang="EN-US">] </span>都是趋向于减少的。<span lang="EN-US"><br />
</span> 基于上面的公式，我们就可以推算出当 平均<span lang="EN-US">KeepAlive</span>请求<span lang="EN-US"> &lt;= KeepAliveTimeout </span>时，关闭<span lang="EN-US"> KeepAlive</span>选项是划算的，否则就可以考虑打开。</p>
<p class="MsoNormal">
<p class="MsoNormal">理论性的参考大部分来自《<span lang="EN-US">Apache 2.2 </span>手册》中文版。</p>
<p class="MsoNormal"><span lang="EN-US"><a href="http://lamp.linux.gov.cn/Apache/ApacheMenu/index.html">http://lamp.linux.gov.cn/Apache/ApacheMenu/index.html</a></span></p>
<p style="margin:0;padding:0;height:1px;overflow:hidden;">
    <script type="text/javascript"><!--
        var wumiiSitePrefix = "http://www.zhangyiqun.net";
        var wumiiEnableCustomPos = false;
        var wumiiParams = "&#038;num=4&#038;mode=3&#038;displayInFeed=1&#038;version=1.0.5.5&#038;pf=WordPress3.2.1";
    //--></script><script type="text/javascript" src="http://widget.wumii.com/ext/relatedItemsWidget.htm"></script><a href="http://www.wumii.com/widget/relatedItems.htm" style="border:0;"><img src="http://static.wumii.com/images/pixel.png" alt="无觅相关文章插件，快速提升流量" style="border:0;padding:0;margin:0;" /></a></p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F101.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F23.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">对玩转apache之调优的补充之一（系统篇）</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F583.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F23.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Linux网络性能调优</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F199.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F23.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">图形化vmstat</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fwww.zhangyiqun.net%2F365.html&from=http%3A%2F%2Fwww.zhangyiqun.net%2F23.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">linux的TCP性能调整</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems.htm" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://www.zhangyiqun.net/23.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced

Served from: www.zhangyiqun.net @ 2012-02-09 12:06:27 -->
