<?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>High performance web site building, server optimization &#187; Server performance</title>
	<atom:link href="http://www.megaburst.com/category/server-performance/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.megaburst.com</link>
	<description>High performance web site building</description>
	<lastBuildDate>Sat, 15 May 2010 21:14:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Boost your nginx web server performance by rewriting favicon.ico requests correctly</title>
		<link>http://www.megaburst.com/boost-your-nginx-web-server-performance-byrewriting-favicon-ico-requests-correctly/</link>
		<comments>http://www.megaburst.com/boost-your-nginx-web-server-performance-byrewriting-favicon-ico-requests-correctly/#comments</comments>
		<pubDate>Tue, 11 May 2010 05:47:20 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Server performance]]></category>

		<guid isPermaLink="false">http://www.megaburst.com/?p=145</guid>
		<description><![CDATA[Popular sites receive high concurrent web visitor requests and some clients send bad favicon.ico fetch requests. If you are running nginx you probably didn&#8217;t notice that, for example:  /category/favicon.ico generate significant 404 errors in your server error log file, because this file is located only in root, e.g. /favicon.ico. 
Every request for non-existent file [...]]]></description>
			<content:encoded><![CDATA[<p>Popular sites receive high concurrent web visitor requests and some clients send bad <em>favicon.ico</em> fetch requests. If you are running nginx you probably didn&#8217;t notice that, for example:  <em>/category/favicon.ico</em> generate significant 404 errors in your server error log file, because this file is located only in <em>root</em>, e.g. <em>/favicon.ico</em>. </p>
<p>Every request for non-existent file takes some load and every 404 missing file error is usually logged into <em>error_log</em> file, unless you have disabled error logging. To forward all non-root <em>favicon.ico</em> requests to <em>/favicon.ico</em> you can set-up the following rewrite rule in <em>nginx.conf</em> file in the correct <em>server{}</em> location:</p>
<blockquote><p>rewrite  ^/(.*)/favicon.ico$  /favicon.ico  last; </p></blockquote>
<p>Voila. Restart the nginx daemon and you will see slightly decreased load on your box.</p>
        <p><center>&copy; MegaBurst.com - visit the <a href="http://www.megaburst.com/">high performance</a> web site building blog.</center></p>      ]]></content:encoded>
			<wfw:commentRss>http://www.megaburst.com/boost-your-nginx-web-server-performance-byrewriting-favicon-ico-requests-correctly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nginx high performance proxy caching system</title>
		<link>http://www.megaburst.com/nginx-high-performance-proxy-caching-system/</link>
		<comments>http://www.megaburst.com/nginx-high-performance-proxy-caching-system/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 20:09:30 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[Caching]]></category>
		<category><![CDATA[Server performance]]></category>

		<guid isPermaLink="false">http://www.megaburst.com/?p=138</guid>
		<description><![CDATA[Nginx has been built with ncache in the core. It&#8217;s very fast and offers great performance. It works quite nicely &#8211; you install nginx as a front-end proxy server and forward all php queries to Apache back-end. Then you set-up nginx to cache response from Apache back-end to static files on a file system (or [...]]]></description>
			<content:encoded><![CDATA[<p>Nginx has been built with ncache in the core. It&#8217;s very fast and offers great performance. It works quite nicely &#8211; you install nginx as a front-end proxy server and forward all php queries to Apache back-end. Then you set-up nginx to cache response from Apache back-end to static files on a file system (or even RAM disk).</p>
<p>in http{} section please define the path to proxy cache, levels, keys_zone name, expire time in minutes and max size in megabytes:</p>
<blockquote><p>
proxy_cache_path  /path/to/cache  levels=1:2   keys_zone=staticfilecache:180m  max_size=500m;<br />
proxy_temp_path /path/to/proxy_temp;</p></blockquote>
<p>Please note that proxy_cache_path and proxy_temp_path should be on the same file system.</p>
<blockquote><p>
proxy_cache_key &#8220;$scheme://$host$request_uri $do_not_cache&#8221;;<br />
proxy_cache staticfilecache;</p></blockquote>
<p>in server {} location setting you should define the following values/settings:</p>
<blockquote><p>
proxy_cache_valid 200 15m;
</p></blockquote>
<p>The above caching settings will cache all valid 200 response for 15 minutes.</p>
        <p><center>&copy; MegaBurst.com - visit the <a href="http://www.megaburst.com/">high performance</a> web site building blog.</center></p>      ]]></content:encoded>
			<wfw:commentRss>http://www.megaburst.com/nginx-high-performance-proxy-caching-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nginx worker_processes configuration and recommendations</title>
		<link>http://www.megaburst.com/nginx-worker_processes-configuration-and-recommendations/</link>
		<comments>http://www.megaburst.com/nginx-worker_processes-configuration-and-recommendations/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 17:02:06 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[Server performance]]></category>

		<guid isPermaLink="false">http://www.megaburst.com/?p=130</guid>
		<description><![CDATA[From the many posts around the Internet and our own experience worker_processes value is recommended to be set to the number of cores your server has.
For example, if you have two dual core CPU you should set worker_processes 4;
Original worker_processes help from Nginx page:
worker_processes 4;
nginx has the ability to use more than one worker process [...]]]></description>
			<content:encoded><![CDATA[<p>From the many posts around the Internet and our own experience worker_processes value is recommended to be set to the number of cores your server has.<br />
For example, if you have two dual core CPU you should set worker_processes 4;</p>
<p>Original worker_processes help from Nginx page:</p>
<blockquote><p><em>worker_processes 4;</p>
<p>nginx has the ability to use more than one worker process for several reasons:</p>
<p>1. to use SMP<br />
2. to decrease latency when workers blockend on disk I/O<br />
3. to limit number of connections per process when select()/poll() is used</p>
<p>The worker_processes and worker_connections from the event sections allows you to calculate maxclients value:</p>
<p>max_clients = worker_processes * worker_connections</em></p></blockquote>
        <p><center>&copy; MegaBurst.com - visit the <a href="http://www.megaburst.com/">high performance</a> web site building blog.</center></p>      ]]></content:encoded>
			<wfw:commentRss>http://www.megaburst.com/nginx-worker_processes-configuration-and-recommendations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing high-performance Nginx for first time</title>
		<link>http://www.megaburst.com/installing-high-performance-nginx-for-first-time/</link>
		<comments>http://www.megaburst.com/installing-high-performance-nginx-for-first-time/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 10:16:35 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Server performance]]></category>

		<guid isPermaLink="false">http://www.megaburst.com/?p=122</guid>
		<description><![CDATA[I have been somewhat lazy nowadays (hey it&#8217;s a summer!), but I thought I need to post a quick guide about installing high performance Nginx daemon. It&#8217;s a super fast web serving daemon that is the best choice for static content serving at very high speeds. It requires small hardware resources and places very small [...]]]></description>
			<content:encoded><![CDATA[<p>I have been somewhat lazy nowadays (hey it&#8217;s a summer!), but I thought I need to post a quick guide about installing high performance Nginx daemon. It&#8217;s a super fast web serving daemon that is the best choice for static content serving at very high speeds. It requires small hardware resources and places very small load on the hardware.</p>
<p>Download the <a href="/files/nginx-0.7.61.tar.gz">latest stable version 0.7.61</a> or fetch a newer version from <a style="text-decoration: line-through;" rel="nofollow" href="http://www.nginx.net">nginx.net</a>.</p>
<p>Installing nginx:<br />
(depending on the required modules, I prefer to disable all modules that are not needed, for example if you do not wish to host SSL pages, don&#8217;t enable SSL and so on).</p>
<blockquote><p>tar zxvf nginx-0.7.61.tar.gz<br />
cd nginx-0.7.61<br />
./configure</p></blockquote>
<p>(you can also specify &#8211;prefix value if you wish to install nginx in a different folder)</p>
<p>Now you will need to configure nginx.conf file before firing up Nginx daemon.</p>
<p>For better security run Nginx under a non-privileged user:</p>
<blockquote><p>user  nobody;</p></blockquote>
<p>For medium to high load sites I suggest increasing worker_processes to 5 to 15, or even more if your hardware allows it.</p>
<blockquote><p>worker_processes  10;</p></blockquote>
<p>To increase max allowed clients that can access your site increase worker_connections. A good value for start is 256 and higher if you have a more powerful hardware.</p>
<blockquote><p>events {<br />
worker_connections  512;<br />
}</p></blockquote>
<p><strong><em>Please note!</em></strong> If you run a Nginx in reverse proxy configuration you will need to divide this value by 4 because two connections will be opened to client and two to the back-end. If you have worker_processes set to 10 and worker_connections set to 256, then max clients that can access your site will be  worker_processes  * worker_connections / 2, thus  10 * 512 / 2 becomes 2560 connections.</p>
<p>Now in <em>http {}</em> section you will need to define some settings like mime.types, default_type, log_format, access_log, sendfile, tcp_nopush, keepalive_timeout. That&#8217;s pretty self explaining. Just a quick note: Nginx requires very low hardware requirements for keeping keepalive connections active and it&#8217;s well know to take less than 30Mb of RAM for 10000 active keepalive connections. Make sure you have correctly calculated max client settings using the formulas above.</p>
<p>Now comes the <em>server {}</em> section were you define Listen to address, ports and custom settings, like redirects etc.</p>
<p>Example:</p>
<blockquote><p>server {<br />
listen      10.10.10.10:80;<br />
server_name  localhost;</p>
<p>access_log  logs/host.access.log  main;</p>
<p>location / {<br />
root   html;<br />
index  index.html index.htm;<br />
}</p>
<p>error_page  404              /404.html;</p>
<p>error_page   500 502 503 504  /50x.html;<br />
location = /50x.html {<br />
root   html;<br />
}</p></blockquote>
<p>10.10.10.10 IP is just an example, you will need to specify your allocated server IP.</p>
<p>I hope this quick guide helped you out a little. We will soon publish more in-depth guide about configuring Nginx.</p>
        <p><center>&copy; MegaBurst.com - visit the <a href="http://www.megaburst.com/">high performance</a> web site building blog.</center></p>      ]]></content:encoded>
			<wfw:commentRss>http://www.megaburst.com/installing-high-performance-nginx-for-first-time/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Monitoring your Linux server load</title>
		<link>http://www.megaburst.com/monitoring-your-linux-server-load/</link>
		<comments>http://www.megaburst.com/monitoring-your-linux-server-load/#comments</comments>
		<pubDate>Wed, 20 May 2009 05:38:41 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[Server performance]]></category>

		<guid isPermaLink="false">http://www.megaburst.com/?p=36</guid>
		<description><![CDATA[You can easily monitor your Linux server load using built-in bash commands like
w
free
top
However, many folks prefer sysstat package (can be downloaded here, or from your Linux distribution site) package that provides even further performance monitoring utilities:
iostat
sar
vmstat
&#8212;&#8212;
Login into your Linux server shell and execute the above commands. iostat, sar, vmstat can be run like
vmstat 1 10
where [...]]]></description>
			<content:encoded><![CDATA[<p>You can easily monitor your Linux server load using built-in bash commands like</p>
<blockquote><p>w</p>
<p>free</p>
<p>top</p></blockquote>
<p>However, many folks prefer sysstat package (can be downloaded <a rel="nofollow" href="http://pagesperso-orange.fr/sebastien.godard/">here</a>, or from your Linux distribution site) package that provides even further performance monitoring utilities:</p>
<blockquote><p>iostat</p>
<p>sar</p>
<p>vmstat</p></blockquote>
<p>&#8212;&#8212;</p>
<p>Login into your Linux server shell and execute the above commands. iostat, sar, vmstat can be run like</p>
<blockquote><p>vmstat 1 10</p></blockquote>
<p>where 1 is the time between monitoring load, 10 is the count  how many times the data need to be read.</p>
        <p><center>&copy; MegaBurst.com - visit the <a href="http://www.megaburst.com/">high performance</a> web site building blog.</center></p>      ]]></content:encoded>
			<wfw:commentRss>http://www.megaburst.com/monitoring-your-linux-server-load/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux server management and tuning services</title>
		<link>http://www.megaburst.com/linux-server-management-and-tuning-services/</link>
		<comments>http://www.megaburst.com/linux-server-management-and-tuning-services/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 20:32:40 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[Server performance]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.megaburst.com/?p=114</guid>
		<description><![CDATA[Many of our blog readers ask if we offer tuning services and support remote server management. At this time we do not offer server management services and we do not offer blog tuning either. However, from time to time we work with a nice company called LinuxAdmin guys and they do high-load and critical blog [...]]]></description>
			<content:encoded><![CDATA[<p>Many of our blog readers ask if we offer tuning services and support remote server management. At this time we do not offer server management services and we do not offer blog tuning either. However, from time to time we work with a nice company called <a title="Linux server management" href="http://www.linuxadmin.org/">LinuxAdmin</a> guys and they do high-load and critical blog set-up,  configuration,  load balancing, management and of course full optimization. So if you are looking for a quality and very affordable <a title="Remote server management" href="http://www.linuxadmin.org/servermanagement/">remote server management</a> or <a title="Managed wordpress blog hosting" href="http://www.linuxadmin.org/blog-managed-hosting.php">Wordpress blog hosting and management</a> company &#8211; contact LinuxAdmin and I am sure you guys can work something out.</p>
        <p><center>&copy; MegaBurst.com - visit the <a href="http://www.megaburst.com/">high performance</a> web site building blog.</center></p>      ]]></content:encoded>
			<wfw:commentRss>http://www.megaburst.com/linux-server-management-and-tuning-services/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Digg effect vs Yahoo front page listing</title>
		<link>http://www.megaburst.com/digg-effect-vs-yahoo-front-page-listing/</link>
		<comments>http://www.megaburst.com/digg-effect-vs-yahoo-front-page-listing/#comments</comments>
		<pubDate>Sun, 15 Mar 2009 08:47:02 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[Load balancing]]></category>
		<category><![CDATA[Server performance]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.megaburst.com/?p=48</guid>
		<description><![CDATA[Many website owners are dreaming about hundreds of thousands of web visitors and thousands in ad profits, but will your web site handle the load and keep up the file serving? Probably not.
Digg frontpage listing usually sends 120.000  to 170.000 web visitors in two to three hours. It depends for how long you are listed [...]]]></description>
			<content:encoded><![CDATA[<p>Many website owners are dreaming about hundreds of thousands of web visitors and thousands in ad profits, but will your web site handle the load and keep up the file serving? Probably not.</p>
<p>Digg frontpage listing usually sends 120.000  to 170.000 web visitors in two to three hours. It depends for how long you are listed on Digg&#8217;s frontpage and what is the topic.  In over 95% of cases this will probably be too much for simple dedicated server &#8211; if you are hosting Wordpress blog with some plugins activated (that require some extra load) and without tuning the server box.</p>
<p>You can activate some caching plugins (wp-cache, wp-super-cache, 1blogcacher), configure more efficient content distribution (for example, use lightweight web daemon to serve static files), use less includes and optimize plugin code for performance. This will probably handle the Digg frontpage load.</p>
<p>What if you land Yahoo! frontpage listing? This will be a real challenge for your systems and system administrator. Yahoo! is very popular and if your site gets listed in frontpage they can easily &#8220;send you&#8221; a few million of web visitors. Once again, depends for how long the listing will stay on the front page. Yahoo! traffic burst will definitely make your web server unreachable and I am saying this with 99.9999% confidence. You need multiple servers to handle  the load and do load balancing, and of course have upstream bandwidth available to serve the content. You need to employ perfect caching architecture, preferable keeping the page 100% static and load it in the server memory for super fast serving to web visitors. If you read it from the hard drive &#8211; your servers will experience very high IO and load, thus slowing down web responses.</p>
<p>Last time when one of our client&#8217;s got listed on Yahoo! frontpage the site (actually a blog) got around ~900.000 unique visitor landings, over 200.000 visitors browsed site further reading other articles and comments.  The traffic burst from two web front-end servers serving the content was close to 195Mbps (2 x 100Mbps links were fully maxed out) and I am talking about serving HTML/PHP content, not the images from these servers.</p>
<p>This is why you need to plan architecture to be scalable (horizontally) and easily affordable. One server box will not make it even if you get top-notch mega box for 20k USD, period.</p>
        <p><center>&copy; MegaBurst.com - visit the <a href="http://www.megaburst.com/">high performance</a> web site building blog.</center></p>      ]]></content:encoded>
			<wfw:commentRss>http://www.megaburst.com/digg-effect-vs-yahoo-front-page-listing/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Server virtualization vs dedicated server</title>
		<link>http://www.megaburst.com/server-virtualization-vs-dedicated-server/</link>
		<comments>http://www.megaburst.com/server-virtualization-vs-dedicated-server/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 21:15:59 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Server performance]]></category>

		<guid isPermaLink="false">http://www.megaburst.com/?p=88</guid>
		<description><![CDATA[I would still love to see virtualized server in a high bandwidth environment hosting a large site with thousands of concurrent connections. I guess there is not much use for very large sites to use virtualization unless it provides advanced features like:

live migration
fail-over
snapshots
load balancing

However, virtualization software with the above features usually cost thousands of dollars [...]]]></description>
			<content:encoded><![CDATA[<p>I would still love to see virtualized server in a high bandwidth environment hosting a large site with thousands of concurrent connections. I guess there is not much use for very large sites to use virtualization unless it provides advanced features like:</p>
<ul>
<li>live migration</li>
<li>fail-over</li>
<li>snapshots</li>
<li>load balancing</li>
</ul>
<p>However, virtualization software with the above features usually cost thousands of dollars and it&#8217;s out of reach for many folks that need to make some bucks from own sites and still survive occasional Digg or Yahoo frontpage landings. Dedicated servers offer 100% performance and doesn&#8217;t have any overhead&#8230; unless of course you run many servers and want to consolidate hardware.</p>
<p>If you have a small site or site that doesn&#8217;t generate normal income don&#8217;t worry about virtualization and high-availability <img src='http://www.megaburst.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  You can still do high-availability without virtualization. For much less, err&#8230;. almost for free &#8211; you just need to pay for the hardware and someone to set-up and run the server farm for you.</p>
        <p><center>&copy; MegaBurst.com - visit the <a href="http://www.megaburst.com/">high performance</a> web site building blog.</center></p>      ]]></content:encoded>
			<wfw:commentRss>http://www.megaburst.com/server-virtualization-vs-dedicated-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tuning tcp keepalive intervals for high performance</title>
		<link>http://www.megaburst.com/tuning-tcp-keepalive-intervals-for-high-performance/</link>
		<comments>http://www.megaburst.com/tuning-tcp-keepalive-intervals-for-high-performance/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 21:27:40 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[OS performance]]></category>
		<category><![CDATA[Server performance]]></category>

		<guid isPermaLink="false">http://www.megaburst.com/?p=77</guid>
		<description><![CDATA[We are fine tuning sysctl network stack on Linux OS and  change keepalive intervals for much better &#8220;response&#8221; times and load. These settings are lowered on our all managed performance servers that do host large sites &#8211; Drupal, Wordpress and custom LAMP services.
Enter the following lines in /etc/sysctl.conf
net.ipv4.tcp_keepalive_probes = 2
net.ipv4.tcp_keepalive_intvl = 30
And execute &#8220;sysctl -p&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>We are fine tuning sysctl network stack on Linux OS and  change keepalive intervals for much better &#8220;response&#8221; times and load. These settings are lowered on our all managed performance servers that do host large sites &#8211; Drupal, Wordpress and custom LAMP services.</p>
<p>Enter the following lines in <em>/etc/sysctl.conf</em></p>
<blockquote><p>net.ipv4.tcp_keepalive_probes = 2<br />
net.ipv4.tcp_keepalive_intvl = 30</p></blockquote>
<p>And execute <em>&#8220;sysctl -p&#8221;</em> to set these settings in real-time.</p>
<p>By default it&#8217;s for Linux (Fedora, Redhat, Centos):</p>
<blockquote><p><em>net.ipv4.tcp_keepalive_probes=9<br />
net.ipv4.tcp_keepalive_intvl = 75</em></p></blockquote>
<p>Enjoy!</p>
        <p><center>&copy; MegaBurst.com - visit the <a href="http://www.megaburst.com/">high performance</a> web site building blog.</center></p>      ]]></content:encoded>
			<wfw:commentRss>http://www.megaburst.com/tuning-tcp-keepalive-intervals-for-high-performance/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Nginx performance settings</title>
		<link>http://www.megaburst.com/nginx-performance-settings/</link>
		<comments>http://www.megaburst.com/nginx-performance-settings/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 18:18:09 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[Server performance]]></category>

		<guid isPermaLink="false">http://www.megaburst.com/?p=70</guid>
		<description><![CDATA[We are running Wordpress on our multi-platform cluster and this is what we use for performance settings in nginx.conf
worker_processes 20;
events {
worker_connections 20000;
use epoll;
}
worker_rlimit_nofile 25000;
Nginx is a front-end and for backend we use Apache, however we will soon try different set-up using different architectures. I will keep you posted!
The client servers are 5400 Series Intel XEONs [...]]]></description>
			<content:encoded><![CDATA[<p>We are running Wordpress on our multi-platform cluster and this is what we use for performance settings in <em>nginx.conf</em></p>
<blockquote><p><em>worker_processes 20;</em></p>
<p><em>events {<br />
worker_connections 20000;<br />
use epoll;<br />
}</em></p>
<p><em>worker_rlimit_nofile 25000;</em></p></blockquote>
<p>Nginx is a front-end and for backend we use Apache, however we will soon try different set-up using different architectures. I will keep you posted!</p>
<p>The client servers are 5400 Series Intel XEONs with 8GB RAM running Linux and SATA hard drives.<em><br />
</em></p>
        <p><center>&copy; MegaBurst.com - visit the <a href="http://www.megaburst.com/">high performance</a> web site building blog.</center></p>      ]]></content:encoded>
			<wfw:commentRss>http://www.megaburst.com/nginx-performance-settings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux up link aggregation for high availability and network performance</title>
		<link>http://www.megaburst.com/linux-up-link-aggregation-for-high-availability-and-network-performance/</link>
		<comments>http://www.megaburst.com/linux-up-link-aggregation-for-high-availability-and-network-performance/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 08:52:39 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
				<category><![CDATA[Server performance]]></category>

		<guid isPermaLink="false">http://www.megaburst.com/?p=62</guid>
		<description><![CDATA[100Mbps up-link port is standard nowadays even for a low cost dedicated servers or  server co-location. When your web site visitors increase or you are landing Digg or Yahoo! front page a 100Mbps up-link will simply not cope with the load. If you upstream provider offers 1Gbps ports &#8211; go for it if your MRTG [...]]]></description>
			<content:encoded><![CDATA[<p>100Mbps up-link port is standard nowadays even for a low cost dedicated servers or  server co-location. When your web site visitors increase or you are landing Digg or Yahoo! front page a 100Mbps up-link will simply not cope with the load. If you upstream provider offers 1Gbps ports &#8211; go for it if your MRTG shows maxing out (or even 80Mbps or so peak time usage) 100Mbps up-link from time to time.</p>
<p>If your upstream provider doesn&#8217;t offer 1Gbps links and your server has two NIC ports, you can set-up link aggregation (network bonding) with IEEE 802.3ad mode and increase your server uplink to 200Mbps or more if you have more available network ports in your server. You can easily do 802.3ad (mode 4) on multiple 1Gbps ports as well &#8211; <strong>keep in mind that with 802.3ad link channel bonding method all your up-links must be connected through one switch</strong>. There are multiple network  channel bonding modes: balance-rr, active-backup, balance-xor, broadcast, <strong>802.3ad</strong>, balance-tlb and balance-alb, however we will look at 802.3ad mode as it provides good performance and increases availability (multiple network up-links, however you are limited to one switch, if it fails, the server connectivity will fail).</p>
<p>In our link aggregation tests with mode=4 (802.3ad) we bonded together two network up-links (2x 1Gbps Intel network card ports, HP DL rackmount server with 2Ghz CPU and 512MB RAM) and <em>iperf</em> performance tests (initiated from 6 remote boxes, different VLANs, switches, however one server was connected to the same switch and it had the best speed of roughly 700Mbps) had a top speed of <strong>1590Mbps</strong> in TCP traffic mode. Test system had CAT 5e cables and link between up-link Cisco switches and servers was 1Gbps.</p>
<p>Typical Linux set-up for network channel bonding in 802.3ad mode is as follows (executed from command line or you can set-up rc.local to execute the following commands on the system startup):</p>
<blockquote><p><em>modprobe bonding mode=4 miimon=1000 downdelay=500 updelay=500<br />
ip addr add 10.10.1.1/24 brd + dev bond0<br />
ip link set dev bond0 up<br />
ifenslave bond0 eth1 eth0<br />
route add default gw 10.10.1.254</em></p></blockquote>
<p>We also added:</p>
<blockquote><p><em>alias bond0 bonding<br />
options bond0 mode=4 miimon=100</em></p></blockquote>
<p>to <em>modprobe.conf</em> file<em><br />
</em></p>
<p>Please note that we had to reboot the box for the new settings.</p>
<p>When bonding has been set-up, the<em> ifconfig </em>will show a new device called <em>bond0</em></p>
<blockquote><p><em>bond0     Link encap:Ethernet  HWaddr </em><em>00:0c:cf:33:99:c0</em><em><br />
inet addr:10.10.1.1  Bcast:10.10.1.255  Mask:255.255.255.0<br />
UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1<br />
RX packets:100195129 errors:0 dropped:0 overruns:0 frame:0<br />
TX packets:38177579 errors:0 dropped:0 overruns:0 carrier:0<br />
collisions:0 txqueuelen:0<br />
RX bytes:2541440597 (2423.7 Mb)  TX bytes:2655446784 (2532.4 Mb)<br />
</em></p></blockquote>
<p>You can also review the contents of:</p>
<p><em>cat /proc/net/bonding/bond0</em></p>
<p>in our case the content is as follows:</p>
<blockquote><p><em>Ethernet Channel Bonding Driver: v3.0.3 (March 23, 2006)</em></p>
<p><em>Bonding Mode: <strong>IEEE 802.3ad Dynamic link aggregation</strong><br />
Transmit Hash Policy: layer2 (0)<br />
MII Status: up<br />
MII Polling Interval (ms): 100<br />
Up Delay (ms): 200<br />
Down Delay (ms): 200</em></p>
<p><em>802.3ad info<br />
LACP rate: slow<br />
Active Aggregator Info:<br />
Aggregator ID: 6<br />
Number of ports: 2<br />
Actor Key: 17<br />
Partner Key: 5<br />
Partner Mac Address: 00:0c:cf:33:99:c0</em></p>
<p><em>Slave Interface: eth1<br />
MII Status: up<br />
Link Failure Count: 1<br />
Permanent HW addr: 00:55:66:66:77:79<br />
Aggregator ID: 6</em></p>
<p><em>Slave Interface: eth0<br />
MII Status: up<br />
Link Failure Count: 0<br />
Permanent HW addr: 00:55:66:66:77:77<br />
Aggregator ID: 6</em></p></blockquote>
<p>Don&#8217; t forget that changing server IPs may limit server connectivity and you may not be able to access it remotely. I hope this helps you to increase your server performance and will offer better speeds and lower latency for your web visitors as well. Enjoy!</p>
        <p><center>&copy; MegaBurst.com - visit the <a href="http://www.megaburst.com/">high performance</a> web site building blog.</center></p>      ]]></content:encoded>
			<wfw:commentRss>http://www.megaburst.com/linux-up-link-aggregation-for-high-availability-and-network-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
