


<?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/"
		xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>DeServ - Info &#187; performance</title>
	<atom:link href="http://blog.deserv.info/tag/performance/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.deserv.info</link>
	<description>Seu Caderno de Anotações de Informática</description>
	<lastBuildDate>Wed, 25 Jan 2012 17:47:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<copyright>Copyright &#xA9; DeServ - Info 2011 </copyright>
	<managingEditor>flavio.aparecido@gmail.com (DeServ - Info)</managingEditor>
	<webMaster>flavio.aparecido@gmail.com (DeServ - Info)</webMaster>
	<image>
		<url>http://blog.deserv.info/wp-content/plugins/podpress/images/powered_by_podpress.jpg</url>
		<title>DeServ - Info</title>
		<link>http://blog.deserv.info</link>
		<width>144</width>
		<height>144</height>
	</image>
	<itunes:subtitle></itunes:subtitle>
	<itunes:summary>Seu Caderno de Anotações de Informática</itunes:summary>
	<itunes:keywords></itunes:keywords>
	<itunes:category text="Society &#38; Culture" />
	<itunes:author>DeServ - Info</itunes:author>
	<itunes:owner>
		<itunes:name>DeServ - Info</itunes:name>
		<itunes:email>flavio.aparecido@gmail.com</itunes:email>
	</itunes:owner>
	<itunes:block>no</itunes:block>
	<itunes:explicit>no</itunes:explicit>
	<itunes:image href="http://blog.deserv.info/wp-content/plugins/podpress/images/powered_by_podpress_large.jpg" />
		<item>
		<title>Configurando Apache para Performance Maxima</title>
		<link>http://blog.deserv.info/2011/11/17/configurando-apache-para-performance-maxima-2/</link>
		<comments>http://blog.deserv.info/2011/11/17/configurando-apache-para-performance-maxima-2/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 17:34:54 +0000</pubDate>
		<dc:creator>Flávio  Silva</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Dicas]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Sistemas Operacionais]]></category>
		<category><![CDATA[Softwares Adicionais]]></category>
		<category><![CDATA[Tutoriais]]></category>
		<category><![CDATA[AllowOverride]]></category>
		<category><![CDATA[Apache-performance]]></category>
		<category><![CDATA[Apache2]]></category>
		<category><![CDATA[FollowSymLinks]]></category>
		<category><![CDATA[KeepAlive and KeepAliveTimeout]]></category>
		<category><![CDATA[MaxClients]]></category>
		<category><![CDATA[MaxRequestsPerChild]]></category>
		<category><![CDATA[MaxSpareServers]]></category>
		<category><![CDATA[MinSpareServers]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[StartServers]]></category>
		<category><![CDATA[SymLinksIfOwnerMatch]]></category>
		<category><![CDATA[Vishnu Ram]]></category>

		<guid isPermaLink="false">http://blog.deserv.info/?p=624</guid>
		<description><![CDATA[Introdução Apache é a implementação open source de um servidor HTTP. Ele é o webserver mais popular na Internet. Uma pesquisa realizada em 2005 pela NetCraft mostra que cerca de 70% dos sites na Internet rodam sobre o Apache. Opções de Configuração em tempo de Compilação Carrege apenas os módulos necessários O servidor Apache é [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fblog.deserv.info%252F2011%252F11%252F17%252Fconfigurando-apache-para-performance-maxima-2%252F%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Configurando%20Apache%20para%20Performance%20Maxima%22%20%7D);"></div>
<h2>Introdução</h2>
<p align="justify">Apache é a implementação open source de um servidor HTTP. Ele é o webserver mais popular na Internet. Uma pesquisa realizada em 2005 pela NetCraft mostra que cerca de 70% dos sites na Internet rodam sobre o Apache. <span id="more-624"></span></p>
<h2>Opções de Configuração em tempo de Compilação</h2>
<h3>Carrege apenas os módulos necessários</h3>
<p align="justify">O servidor Apache é um programa modular onde o administrador pode escolher entre as funcinalidade que deseja incluir no servidor selecionando um pacote de módukis. Os módulos podem ser compilados estaticamente no binário httpd ou dinamicamente como DSOs(Dynamic Shared Objects). Módulos DSO podem ser compilados quando o servidor for compilado ou poem ser compilados utilizando o apxs para adicioná-los mais tarde. O modulo mod_so deve ser compilado estaticamente no Apache para que o suporte a DSO seja ativo.</p>
<p align="justify">Execute o apache apenas com os módulos necessários. Isto reduz o consumo de memória aumenta a performance do servidor. Compilar os módulos estaticamente irá reduzir o consumo de RAM que é utilizado para suportar módulos compilados dinamicamente, mas será necessário recompilar o apache toda vez que um módulo for adicionado ou removido. È aqui que o DSO se torna útil. Uma vez que o modulo mod_so seja compilado estaticamente, qualquer outro módulo pode ser inserido ou removido utilizando o comando LoadModule no arquivo httpd.conf &#8211; , mas você terá que compilar os módulos utilizando apxs se ele não foi compilado quando o servidor foi feito.</p>
<h3>Escolha o MPM apropriado</h3>
<p align="justify">O apache vem com uma selação de Módulos Multi-Processadores (MPMs) que são responsáveis por abrir as portas de rede na máquina, aceitando requisições, e despachando processos para cuidar das requisições. Apenas um MPM pode ser carregado por vez.</p>
<p align="justify">Escolher o MPM depende de vários fatores, por exemplo se o SO suporta threads, quanta memória está disponível, escalabilidade versus estabilidade, modulos externos,etc .. Sistemas Linux podem escolher entr utilizar um MPM com suporte (worker) a threads ou um prefork sem threads:</p>
<p align="justify">O MPM Worker utiliza múltiplos processos. Ele é multi-threaded com cada processo e cada thread cuidando de uma única conexão. Esté é mais rápido e mais escalável e a memória consumida e relativamente baixa. Funciona bem com múltiplos processadores. Porém, o worker é menos tolerante a módulos defeituosos, e threads defeituosas podem afetar todas as outras threads de um processo.</p>
<p align="justify">O MPM Prefork utiliza múltiplos processos filhos, cada filho cuidad de apenas uma conexão por vez. Prefork é muito bem gerenciada por processadores simples ou múlitplos, a velocidade é comparável ao worker e é mais tolerante a falhas em modulos e processos que terminam inesperadamente. Mas o consumo de memória é alto, mais tráfego leva a mais consumo de memória.</p>
<h2>Opções de Configuração em Tempo de Execução</h2>
<h3>DNS lookup</h3>
<p align="justify">A diretiva HostnameLookips habilita a consulta de DNS, então os hostnames podem ser logados ao invés de endereços IP. Isto adiciona latência em cada requisição desde que a consulta do DNS tem que ser completada antes que a requisição seja terminada. Esta opção é desabilitada por padrão no Apache 1.3 e superiores. Deixe isto inativo e utilize programas pós-processamento como o logresolve para determinar os IPs dos logs. Logresolve vem com Apache.</p>
<p align="justify">Quando utilizar as diretivas Allow from ou Deny from, utilize endereços IP ao invés de nomes de domínios. Caso contrário uma consulta dupla ao DNS será executada para ter certeza de que o domínio ou host não está sendo spoofado.</p>
<h3>AllowOverride</h3>
<p align="justify">Se o AllowOverride está setado para &#8216;None&#8217;, então o Apache irá tentar abrir o arquivo .htaccess (especificada pela diretiva AccessFileName) em cada diretório que for acessado. Por exemplo:</p>
<blockquote>
<pre>DocumentRoot /var/www/html
&lt;Directory /&gt;
AllowOverride all
&lt;/Directory&gt;</pre>
</blockquote>
<p align="justify">Se uma requisição for feita para acessar /index.html, o Apache irá tentar abrir /.htaccess, /var/.htaccess, /var/www/.htaccess, and /var/www/html/.htaccess. Estas tentativas aumentam a latência. Se o arquivo .htaccess for necessário para um diretório, habilite apenas para este diretório.</p>
<h3>FollowSymLinks e SymLinksIfOwnerMatch</h3>
<p align="justify">Se a opção FollowSymLinks estiver setada, então o servidor permitirá que links simbólicos possam ser seguidos neste diretório. Se a opção SymLinksIfOwnerMatch estiver setada, então o servidor permitirá acessar o link apenas se o destino dele bater com o dono do link.</p>
<p align="justify">Se a opção SymLinksIfOwnerMatch estiver setada, então o Apache terá que realizar consultas adicionais ao sistema para verificar se os donos coincidem. Chamadas adicionais também são necessárias quando a opção FollowSymLinks NÃO está setada. Por exemplo:</p>
<blockquote>
<pre>DocumentRoot /vaw/www/html
&lt;Directory /&gt;
Options SymLinksIfOwnerMatch
&lt;/Directory&gt;</pre>
</blockquote>
<p align="justify">Para uma requisição feita para /index.html, o Apache irá executar lstat() em /var, /var/www, /var/www/html, and /var/www/html/index.html. Estas requisições adicionais também irão aumentar a lantência. Os resultados do lstat não são cacheados, então as consultas irão ocorrer em cada requisição.</p>
<p align="justify">Para uma máxima performance, sete FollowSymLinks em cada lugar e nunca sete SymLinksIfOwnerMatch. Ou então, se SymLinksIfOwnerMatch for necessário para um diretório, sete ele para apenas este diretório.</p>
<h3>Content Negotiation</h3>
<p align="justify">Evite utilizar content negotiation para respostas mais rápidas. Se content negotiation é necessário para o site, utilize arquivos type-map ao invés da diretiva Options MultiViews. Com MultiViews, Apache precisa scanear o diretório em busca de arquivos, o que adiciona latência.</p>
<h3>MaxClients</h3>
<p align="justify">O MaxClients seta o número máximo de clientes simultâneos que pode ser suportada por cada servidor. Nenhum processo além do que está definido será aberto. Ele não deve conter um número muito baixo já que as requisições serão colacadas em fila, o que eventualmente irá dar time-out e os recursos do servidor continuarão não utilizados. Setar este valor muito alto irá causar o início de swap e o tempo de resposta irá cair drasticamente. O valor apropriado para MaxClientes pode ser calculado por: MaxClientes = Total RAM / Tamanho Máximo de Processos . O tamanho dos processos para arquivos estáticos é de mais ou menos 2-3MB. Para dinâmicos como PHP, deve ser por volta de 15MB. A coluna RSS de:</p>
<blockquote>
<pre># ps -ylC httpd --sort:rss</pre>
</blockquote>
<p align="justify">Mostra a memória física non-swapped utilizada pelos processos do Apache em kilo Bytes.</p>
<p align="justify">Se existem mais usuários concorrentes do que MaxClients, as requisições serão colocadas em fila até o número baseado na diretiva ListenBacklog. Aumente o ServerLimit para setar o MaxClients acima de 256.</p>
<h3>MinSpareServers, MaxSpareServers, e StartServers</h3>
<p align="justify">MaxSpareServers e MinSpareServers determina quantos processos filhos devem ser mantidos rodando. Se MinSpareServers for muito baixo e muitas requisições forem iniciadas, então o Apache terá que abrir processos adicionais para atender as requisições. Criar processos filhos é relativamente caro. Se o servidor estiver ocupado criando processos, ele não estará disponível para servir as requisições imediatamente. MaxSpareServers não deve ser muito alto, ele pode causar problemas de recursos desde que cada processo consome os recursos da máquina.</p>
<p align="justify">Sete MinSpareServers e MaxSpareServers para um valor com que o Apache não precise frequentemente abrir mais de 4 processos por segundo. (O Apache pode abrir o máximo de 32 processos por segundo). Quando mais de 4 processos por segundo forem abertos, uma mensagem será logada no ErrorLog.</p>
<p align="justify">A diretiva StartServers define o número de processos criados na inicialização do Apache. O Apache irá continuar abrir os processos até que alcance o número de MinSpareServers. Não afeta muito a performance já que o servidor não é reiniciado frequentemente. Se existem muitas requisições e o Apache é reiniciado frequentemente, sete este valor para um número alto.</p>
<h3>MaxRequestsPerChild</h3>
<p align="justify">A diretiva MaxRequestsPerChild definie o número de requisições que um processo do servidor irá gerenciar. Depois as requisições MaxRequestsPerChild irão morrer. É definido para 0 por padrão, o que significa que o processo não irá expirar nunca. É apropriado setar este valor para alguns milhares. Isto pode ajudar a previnir vazamento de memória desde que o processo morre depois de servir um número de requisições. Não sete este valor muito baixo, já que criar novos processos causa overhead.</p>
<h3>KeepAlive and KeepAliveTimeout</h3>
<p align="justify">A diretiva KeepAilve permite que múltiplas requisições possam ser enviadas pela mesma conexão TCP. Isto é útil para páginas com muitas imagens. Se o KeepAlive estiver Off, então para cada imagem, uma nova conexão TCP precisa ser aberta.</p>
<p align="justify">KeepAliveTimeout determinada quanto tempo deve esperar até a próxima requisição. Sete para um valor baixo, por volta de 2 a 5 segundos. Se for setado para um valor muito alto, os processos ficam amarrados esperando pelo cliente quando eles poderiam ser utilizados para servir novos clientes.</p>
<h2>Compressão HTTP &amp; Caching</h2>
<p align="justify">O servidor utiliza os métodos gzip ou deflate para as respostas payload antes que ele seja enviado para os clientes. Então o cliente descompacta o payload. Não existe necessidade de instalar softwares adicionais no lado do cliente desde que a maioria dos navegadores suporta isto. Utilizar compressão irá economizar banda e irá aumentar o tempo de resposta, estudos mostram que em média o ganho da compressão é de 75%. A compressão pode ser habilitada utilizando módulo mod_deflate. O Payload é compactado apenas se o navegador requisitar a compactação, ou então o conteúdo descompactado será enviado. Um navegador capaz de utilizar o conteúdo compactado envia o seguinte cabeçalho na requisição: &#8220;Accept-Encoding: gzip,deflate&#8221;. Então o servidor irá enviar o payload compactado e o cabeçalho da reposta é &#8220;Content-Encoding: gzip&#8221;</p>
<p align="justify">O exemplo a seguir utiliza o telnet para verificar os cabeçalhos de requisição e de resposta:</p>
<blockquote>
<pre>bash-3.00$ telnet www.webperformance.org 80
Trying 24.60.234.27...
Connected to www.webperformance.org (24.60.234.27).
Escape character is '^]'.
HEAD / HTTP/1.1
Host: www.webperformance.org
Accept-Encoding: gzip,deflate

HTTP/1.1 200 OK
Date: Sat, 31 Dec 2005 02:29:22 GMT
Server: Apache/2.0
X-Powered-By: PHP/5.1.1
Cache-Control: max-age=0
Expires: Sat, 31 Dec 2005 02:29:22 GMT
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 20
Content-Type: text/html; charset=ISO-8859-1</pre>
</blockquote>
<p align="justify">O module mod_cache pode ser utilizado no lado do servidor, está em produção estável na versão 2.2 do Apache.</p>
<h2>Servidor separado para conteúdo estático e dinâmico</h2>
<p align="justify">Processos do apache para conteúdo dinâmico consome cerca de 3-20MB de RAM. E cresce para acomodar o conteúdo e nunca diminui até que o processo termine. Digamos que um processo cresca até os 20MB para servir um conteúdo dinâmico. Depois de completar a requisição, ele está libre para servir outra requisição. Se vier uma requisição para uma imagem, então esses 20MB de processos está servindo um conteúdo estático que poderia ser executado por um processo de 1MB. A memória é utilizada ineficientemente.</p>
<p align="justify">Utilize uma pequena compilação do Apache (com o mínimo de módulos compilados estaticamente) como sendo o servidor front-end para servir conteúdos estáticos. As requisições para conteúdos dinâmicos serão encaminhadas para um apache robusto (compilado com todos os módulos necessários). Utilizar um servidor front-end leve tem a vantagem de que os conteúdos estáticos são enviados rapidamente sem o consumo alto de memória e apenas o conteúdo dinâmico é passado para o servidor robusto.</p>
<p align="justify">Encaminhamento de requisições pode ser implementado utilizando os módulos mod_proxy e mod_rewrite. Suponha que exista um servidor apache leve rodando na porta 80 e o robusto na porta 8088. Então a configuração a seguir pode ser utilizada no apache leve para encaminhar todas as requisições de conteúdo dinâmico para o servidor robusto.</p>
<blockquote>
<pre>ProxyPassReverse / http://%{HTTP_HOST}:8088/
RewriteEngine on
RewriteCond   %{REQUEST_URI} !.*\.(gif|png|jpg)$
RewriteRule ^/(.*) http://%{HTTP_HOST}:8088/$1 [P]</pre>
</blockquote>
<p align="justify">Todas as requisições, exceto as imagens serão encaminhadas para o apache robusto. As respostas são recebidas pelo servidor front-end que as encaminha para o cliente. Todas as respostas aparentam vir de um único servidor.</p>
<h2>Conclusão</h2>
<p align="justify">Configurar o Apache para obter o máximo de performance pode ser traiçoeiro, não existem regras rápidas. Entenda as necessidades do servidor web e experimente com várias opções. Utiliza ferramentas como ab e httperf para medir a performance do servidor. Servidores leves como tux, thttpd também podem ser utilizados como servidores front-end. Se um servidor de banco de dados é utilizado, tenha certeza de que ele está otimizado para que ele não crie nenhum gargalo. No caso do MySQL, mtop pode ser utilizado para monitorar querys lentas. Performance de scripts PHP pode ser melhorada utilizando produtos de cache como o Turck MMCache. Ele elimina o overhead da compilação realizando cache dos scripts em seu estado compilado.</p>
<p>&nbsp;</p>
<h2>Fonte</h2>
<ul>
<li><a href="http://www.howtoforge.net/configuring_apache_for_maximum_performance" rel="nofollow">http://www.howtoforge.net/configuring_apache_for_maximum_performance</a></li>
<li>http://under-linux.org/wiki/Tutoriais/Apache/Apache-performance</li>
</ul>
<h2>Autor</h2>
<p align="justify">Escrito por: Vishnu Ram is an MTech. in Communication Systems from IIT Madras. He joined Bobcares in 2003 and has been working for Poornam since then.</p>

]]></content:encoded>
			<wfw:commentRss>http://blog.deserv.info/2011/11/17/configurando-apache-para-performance-maxima-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nginx + Apache + PHP5 + APC + Linux + Memcached = PERFORMANCE!! (parte 2)</title>
		<link>http://blog.deserv.info/2011/08/16/nginx-apache-php5-apc-linux-memcached-performance-parte-2/</link>
		<comments>http://blog.deserv.info/2011/08/16/nginx-apache-php5-apc-linux-memcached-performance-parte-2/#comments</comments>
		<pubDate>Tue, 16 Aug 2011 19:24:19 +0000</pubDate>
		<dc:creator>Flávio  Silva</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Instalação e Compilação de SW]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[Sistemas Operacionais]]></category>
		<category><![CDATA[Softwares Adicionais]]></category>
		<category><![CDATA[APC]]></category>
		<category><![CDATA[Memcached]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[otimização]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.deserv.info/?p=564</guid>
		<description><![CDATA[Depois de apresentar a configuração do Apache, PHP, APC e Memcached na primeira parte, agora é hora do Nginx. Basicamente, vamos utilizar o Nginx para servir apenas conteúdo estático (imagens, css, javascript, etc), pois ele possui recursos que garantem uma boa performance para este fim, como por exemplo usar o Memcached como cache. Quando ele [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fblog.deserv.info%252F2011%252F08%252F16%252Fnginx-apache-php5-apc-linux-memcached-performance-parte-2%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2FofLwXW%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Nginx%20%2B%20Apache%20%2B%20PHP5%20%2B%20APC%20%2B%20Linux%20%2B%20Memcached%20%3D%20PERFORMANCE%21%21%20%28parte%202%29%22%20%7D);"></div>
<p>Depois de apresentar a configuração do <a href="http://httpd.apache.org/" target="_blank">Apache</a>, <a href="http://www.php.net/" target="_blank">PHP</a>, <a href="http://pecl.php.net/package/APC" target="_blank">APC</a> e <a href="http://memcached.org/" target="_blank">Memcached</a> na <a href="http://www.bragil.net/linux-unix/nginx-apache-php5-apc-memcached-linux-performance-1/" target="_self">primeira parte</a>, agora é hora do <a href="http://wiki.nginx.org/Main" target="_blank">Nginx</a>. Basicamente, vamos utilizar o <a href="http://wiki.nginx.org/Main" target="_blank">Nginx</a> para servir apenas conteúdo estático (imagens, css, javascript, etc), pois ele possui recursos que garantem uma boa performance para este fim, como por exemplo usar o <a href="http://memcached.org/" target="_blank">Memcached</a> como cache. Quando ele recebe uma requisição para processar um arquivo <a href="http://www.php.net/" target="_blank">PHP</a>, ele “passa a bola” para o <a href="http://httpd.apache.org/" target="_blank">Apache</a>, servindo também como um proxy. Fica mais fácil de entender olhando o fluxo abaixo: <span id="more-564"></span></p>
<blockquote>
<pre>                                PHP
requisição --&gt; [Nginx] ------------&gt; [Apache] ---&gt; (PHP + APC)
                  |
                  |
                  |
                  | conteúdo estático
                  | (imagens, js, css, etc)
                  |
            (Memcached)</pre>
<p>Após o famoso comando <strong>apt-get install nginx</strong>, devemos editar os arquivos de configuração e acertar os detalhes para que tudo isso aí em cima funcione corretamente. Vamos começar pelo arquivo <strong>/etc/nginx/nginx.conf</strong>, onde estão as configurações globais:</p></blockquote>
<div>
<div>
<blockquote>
<pre>user www-data;
worker_processes  2;
 
error_log  /var/log/nginx/error.log;
pid        /var/run/nginx.pid;
 
events {
    worker_connections  1024;
}
 
http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;
 
    access_log  /var/log/nginx/access.log;
    client_body_temp_path /var/lib/nginx/body 1 2;
    sendfile        on;
 
    keepalive_timeout  65;
    tcp_nodelay        on;
 
    # Habilitar a compressão gzip
    gzip  on;
    gzip_buffers 32 8k;
    gzip_comp_level   6;
    gzip_http_version 1.0;
    gzip_min_length   0;
    gzip_types        text/html text/css image/x-icon
        application/x-javascript application/javascript text/javascript application/atom+xml application/xml ;
 
    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;
}</pre>
</blockquote>
</div>
</div>
<p>Não há muito segredo, principalmente se você já mexeu com os arquivos de configuração de outros web servers, como o <a href="http://httpd.apache.org/" target="_blank">Apache</a>. O próximo passo agora é a configuração do virtual server, onde ficam os detalhes mais importantes. O arquivo para configuração do virtual server default é o <strong>/etc/nginx/sites-enabled/default</strong>:</p>
<div>
<div>
<blockquote>
<pre># O alias "wordpressapache" aponta para o servidor Apache,
# onde serão redirecionados os scripts PHP para processamento.
upstream wordpressapache {
        server dominio.com:8080 weight=1 fail_timeout=120s;
}
 
server {
        listen   80;
        server_name www.dominio.com;
        access_log  /var/log/nginx/wordpressapache.access.log;
 
        location / {
                # Diretório raiz do site
                root /home/site;
                # As linhas abaixo servem para configurar o redirecionamento
                # para o servidor Apache, quando necessário.
                proxy_pass      http://wordpressapache;
                proxy_redirect off;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                client_max_body_size 10m;
                client_body_buffer_size 128k;
                proxy_connect_timeout 90;
                proxy_send_timeout 90;
                proxy_read_timeout 90;
                proxy_buffer_size 4k;
                proxy_buffers 4 32k;
                proxy_busy_buffers_size 64k;
                proxy_temp_file_write_size 64k;
 
                # Aqui vão as configurações para que o Nginx use o Memcached
                # como cache, para aumentar a performance.
                set $memcached_key $uri;
                memcached_pass 127.0.0.1:11211;
                error_page 404 = @fallback;
        }
 
        # Caso a página não seja encontrada no memcached, passa para o Apache.
        location @fallback {
                proxy_pass      http://wordpressapache;
        }
 
        # Quando forem requisitados scripts PHP, redireciona para o Apache.
        location ~* wp\-.*\.php|wp\-admin {
                proxy_pass      http://wordpressapache;
        }
 
        # Todo o conteúdo estático será processado pelo Nginx.
        location ~* \.(htm|html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$ {
                root /home/site;
                expires max;
                break;
        }
 
        if (-f $request_filename) {
                break;
        }
 
        # Nega o acesso aos arquivos .htaccess
        location ~ /\.ht {
                deny all;
        }
 
}</pre>
</blockquote>
</div>
</div>
<p>Após acertar as configurações, reinicie o daemon do <a href="http://wiki.nginx.org/Main" target="_blank">Nginx</a> com o comando <strong>/etc/init.d/nginx restart</strong>. Podemos conferir o benchmark usando o Apache Benchmark:</p>
<div>
<div>
<blockquote>
<pre> ab -n 1000 -c 5 http://www.dominio.com:80/
This is ApacheBench, Version 2.3 &amp;lt;$Revision: 655654 $&amp;gt;
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
 
Benchmarking www.dominio.com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests
 
Server Software:        nginx/0.6.32
Server Hostname:        www.dominio.com
Server Port:            80
 
Document Path:          /
Document Length:        91427 bytes
 
Concurrency Level:      5
Time taken for tests:   1.230 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      91715000 bytes
HTML transferred:       91427000 bytes
Requests per second:    812.80 [#/sec] (mean)
Time per request:       6.152 [ms] (mean)
Time per request:       1.230 [ms] (mean, across all concurrent requests)
Transfer rate:          72798.78 [Kbytes/sec] received
 
Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.1      0       1
Processing:     2    6   1.8      6      12
Waiting:        1    5   1.4      5      10
Total:          2    6   1.8      6      12
 
Percentage of the requests served within a certain time (ms)
  50%      6
  66%      7
  75%      7
  80%      7
  90%      8
  95%      9
  98%     10
  99%     10
 100%     12 (longest request)</pre>
</blockquote>
<p>&nbsp;</p>
</div>
<p>&nbsp;</p>
</div>
<p>Fonte: http://www.bragil.net/</p>

]]></content:encoded>
			<wfw:commentRss>http://blog.deserv.info/2011/08/16/nginx-apache-php5-apc-linux-memcached-performance-parte-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nginx + Apache + PHP5 + APC + Linux + Memcached = PERFORMANCE!! (parte 1)</title>
		<link>http://blog.deserv.info/2011/08/16/nginx-apache-php5-apc-linux-memcached-performance-parte-1/</link>
		<comments>http://blog.deserv.info/2011/08/16/nginx-apache-php5-apc-linux-memcached-performance-parte-1/#comments</comments>
		<pubDate>Tue, 16 Aug 2011 19:20:22 +0000</pubDate>
		<dc:creator>Flávio  Silva</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Instalação e Compilação de SW]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[Sistemas Operacionais]]></category>
		<category><![CDATA[Softwares Adicionais]]></category>
		<category><![CDATA[APC]]></category>
		<category><![CDATA[Memcached]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[otimização]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.deserv.info/?p=562</guid>
		<description><![CDATA[A seguir vou detalhar o passo-a-passo resumido da configuração usada, que eu apelidei carinhosamente de NAPALM (sigla para Nginx + Apache + PHP + APC + Linux + Memcached). Nginx é um servidor web que tem ganhado fama por ser extremamente rápido e também por ser uma excelente escolha para servir conteúdo estático, sendo usado [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fblog.deserv.info%252F2011%252F08%252F16%252Fnginx-apache-php5-apc-linux-memcached-performance-parte-1%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2FmZL7DL%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Nginx%20%2B%20Apache%20%2B%20PHP5%20%2B%20APC%20%2B%20Linux%20%2B%20Memcached%20%3D%20PERFORMANCE%21%21%20%28parte%201%29%22%20%7D);"></div>
<p>A seguir vou detalhar o passo-a-passo resumido da configuração usada, que eu apelidei carinhosamente de <strong>NAPALM</strong> (sigla para <a href="http://wiki.nginx.org/Main">Nginx</a> + <a href="http://httpd.apache.org/" target="_blank">Apache</a> + <a href="http://www.php.net/" target="_blank">PHP</a> + <a href="http://pecl.php.net/package/APC" target="_blank">APC</a> + Linux + <a href="http://memcached.org/" target="_blank">Memcached</a>).</p>
<p><a href="http://wiki.nginx.org/Main">Nginx</a> é um servidor web que tem ganhado fama por ser extremamente rápido e também por ser uma excelente escolha para servir conteúdo estático, sendo usado como proxy para servidores de aplicação.</p>
<p>O <a href="http://httpd.apache.org/" target="_blank">Apache </a>dispensa apresentações, assim como o <a href="http://www.php.net/" target="_blank">PHP</a>. <span id="more-562"></span></p>
<p>O <a href="http://pecl.php.net/package/APC" target="_blank">APC</a> é uma extensão para o <a href="http://www.php.net/" target="_blank">PHP</a> que otimiza o código intermediário e mantém um cache dos dados e do código compilado na memória compartilhada. Isto faz aumentar sensivelmente a performance de aplicações <a href="http://www.php.net/" target="_blank">PHP</a>.</p>
<p>O <a href="http://memcached.org/" target="_blank">Memcached</a> é um sistema de cache em memória de alta performance, bastante usado por grandes nomes da Internet, como <a href="http://twitter.com/" target="_blank">Twitter</a>, <a href="http://www.flickr.com/" target="_blank">Flickr</a>, <a href="http://www.wikipedia.org/" target="_blank">Wikipedia</a>, <a href="http://www.youtube.com/" target="_blank">Youtube</a>, dentre outros.</p>
<p>Quer performance para sua aplicação <a href="http://www.php.net/" target="_blank">PHP</a>? Basta misturar isso tudo!! E o melhor, a configuração é tranquila.</p>
<p>Para começar, instale o <a href="http://httpd.apache.org/" target="_blank">Apache</a> 2 e o <a href="http://www.php.net/" target="_blank">PHP</a> 5. Não vou abordar a instalação e configuração do servidor <a href="http://httpd.apache.org/" target="_blank">Apache</a> 2 + <a href="http://www.php.net/" target="_blank">PHP</a> 5, pois basta ir no Google, você encontrará bastante coisa.</p>
<p><strong>Configuração do Apache</strong></p>
<p>Depois do <a href="http://httpd.apache.org/" target="_blank">Apache</a> + <a href="http://www.php.net/" target="_blank">PHP</a> instalados e configurados, altere a porta onde o <a href="http://httpd.apache.org/" target="_blank">Apache</a> receberá as conexões para 8080. No Debian, edite as seguintes linhas do arquivo /etc/apache2/ports.conf para o seguinte:</p>
<div>
<div>
<blockquote>
<pre>NameVirtualHost dominio.com:8080
Listen 8080</pre>
</blockquote>
</div>
</div>
<p>E altere também a porta na configuração do virtual host:</p>
<div>
<div>
<blockquote>
<pre>VirtualHost dominio.com:8088</pre>
</blockquote>
</div>
</div>
<p>Isto significa que o <a href="http://httpd.apache.org/" target="_blank">Apache</a> deixará de atender as requisições na porta 80 (padrão). Ou seja, usaremos o <a href="http://httpd.apache.org/" target="_blank">Apache</a> apenas para processar os arquivos <a href="http://www.php.net/" target="_blank">PHP</a>, deixando todo o conteúdo estático (imagens, javascript, css, etc) para o <a href="http://wiki.nginx.org/Main">Nginx</a>.</p>
<p>Reinicie o servidor <a href="http://httpd.apache.org/" target="_blank">Apache</a>. No Debian, o comando é <strong>/etc/init.d/apache2 restart</strong>.</p>
<p><strong>Instalação e Configuração do APC</strong></p>
<p>Agora é a instalação do <a href="http://pecl.php.net/package/APC" target="_blank">APC</a>. No Debian 5, isso é extremamente simples:</p>
<div>
<div>
<blockquote>
<pre>apt-get install php-apc</pre>
</blockquote>
</div>
</div>
<p>Após instalar, edite o arquivo /etc/php5/conf.d/apc.ini, adicionando as seguintes linhas:</p>
<div>
<div>
<blockquote>
<pre>extension=apc.so
apc.enabled=1</pre>
</blockquote>
</div>
</div>
<p>É possível configurar vários parâmetros, consulte a documentação do <a href="http://pecl.php.net/package/APC" target="_blank">APC</a>.</p>
<p>Para a nova configuração surtir efeito, reinicie o <a href="http://httpd.apache.org/" target="_blank">Apache</a>:</p>
<div>
<div>
<blockquote>
<pre>/etc/init.d/apache2 restart</pre>
</blockquote>
</div>
</div>
<p><strong>Instalação e Configuração do Memcached</strong></p>
<div>
<div>
<blockquote>
<pre>apt-get install memcached</pre>
</blockquote>
</div>
</div>
<p>Após a instalação, edite o arquivo <strong>/etc/memcached.conf</strong>. Geralmente não é necessário mudar muita coisa, a não ser o tamanho máximo da memória para o <a href="http://memcached.org/" target="_blank">Memcached</a> (o default é 64 MB). O <a href="http://memcached.org/" target="_blank">Memcached</a> usa a porta 11211 por padrão, mas também é possível mudar. O arquivo de configuração vem todo comentado, não há segredo.</p>
<p>Para alterar o tamanho do espaço de memória, altere a linha <strong>-m 64</strong> para o quanto for necessário (128, 256, 512, 1024,…). Lembrando que o <a href="http://memcached.org/" target="_blank">Memcached</a> só ocupa o espaço de memória que estiver em uso pelo cache, ele não reserva todo o espaço inicialmente. Feita a configuração, reinicie o daemon do <a href="http://memcached.org/" target="_blank">Memcached</a> com o comando:</p>
<div>
<div>
<pre>/etc/init.d/memcached restart</pre>
</div>
</div>
<p>Agora só falta o <a href="http://wiki.nginx.org/Main">Nginx</a>.</p>
<p><strong>Instalação do Nginx</strong></p>
<p>Adivinhem?</p>
<div>
<div>
<blockquote>
<pre>apt-get install nginx</pre>
</blockquote>
</div>
</div>
<p>Vamos abordar a configuração em um outro artigo. Até lá, que tal dar uma olhada nos arquivos de configuração do Nginx, em <strong>/etc/nginx </strong>? Bons estudos!</p>
<p>Fonte: http://www.bragil.net/</p>

]]></content:encoded>
			<wfw:commentRss>http://blog.deserv.info/2011/08/16/nginx-apache-php5-apc-linux-memcached-performance-parte-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reverse Proxy Performance – Varnish vs. Squid (Part 2)</title>
		<link>http://blog.deserv.info/2009/12/15/reverse-proxy-performance-%e2%80%93-varnish-vs-squid-part-2/</link>
		<comments>http://blog.deserv.info/2009/12/15/reverse-proxy-performance-%e2%80%93-varnish-vs-squid-part-2/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 20:33:40 +0000</pubDate>
		<dc:creator>Flávio  Silva</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[Sistemas Operacionais]]></category>
		<category><![CDATA[Softwares Adicionais]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[proxy reverso]]></category>
		<category><![CDATA[squid]]></category>
		<category><![CDATA[varnish]]></category>
		<category><![CDATA[varnish cache]]></category>

		<guid isPermaLink="false">http://blog.deserv.info/?p=162</guid>
		<description><![CDATA[In part one of this series I tested the raw throughput performance of Varnish and Squid.  My results are consistent with all the blogs and comments floating around the blogosphere – Varnish blows away Squid.

Unfortunately, the first series of tests were somewhat uninformative.  Since they only tested the raw performance of serving cached content from memory, it did not mimic a real world scenario of serving cached content as well as fetching content from the backend and caching it. ]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fblog.deserv.info%252F2009%252F12%252F15%252Freverse-proxy-performance-%2525e2%252580%252593-varnish-vs-squid-part-2%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2F89Pb70%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Reverse%20Proxy%20Performance%20%E2%80%93%20Varnish%20vs.%20Squid%20%28Part%202%29%22%20%7D);"></div>
<p><img style="border-width: 0px; margin: 0px 20px 0px 0px; display: inline;" title="squid-vs-varnish" src="http://deserialized.com/wp-content/uploads/2009/09/squidvsvarnish.gif" border="0" alt="squid-vs-varnish" width="133" height="153" align="left" /></p>
<p>In <a title="Reverse Proxy Performance – Varnish vs. Squid (Part 1)" href="http://deserialized.com/reverse-proxy-performance-varnish-vs-squid-part-1/">part one</a> of this series I tested the raw throughput performance of <a title="Varnish is a state-of-the-art, high-performance HTTP accelerator" onclick="javascript:pageTracker._trackPageview('/outgoing/varnish.projects.linpro.no/');" href="http://varnish.projects.linpro.no/">Varnish</a> and <a onclick="javascript:pageTracker._trackPageview('/outgoing/www.squid-cache.org/');" href="http://www.squid-cache.org/">Squid</a>.  My results are consistent with all the blogs and comments floating around the blogosphere – Varnish blows away Squid.</p>
<p>Unfortunately, the first series of tests were somewhat uninformative.  Since they only tested the raw performance of serving cached content from memory, it did not mimic a real world scenario of serving cached content as well as fetching content from the backend and caching it. <span id="more-162"></span></p>
<p>While we would hope for a primed, full cache, it is unlikely to happen and you will undoubtedly see a decent amount of backend requests from your caching proxy.</p>
<p>A better test of the two proxies would involve a large set of random URLs, but not <em>too</em> random because we want to simulate both cache hits and cache misses.  To accomplish this, I wrote a small PHP script that would take two parameters: total number of URLs to generate and the hostname for those URLs.</p>
<h2>Generating a usable URL list</h2>
<p>Generating the list is simple.  This script looks like this:</p>
<div>
<div>
<pre style="font-family: monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
        <span style="color: #990000;">ob_start</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$total</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">[</span><span style="color: #0000ff;">'total'</span><span style="color: #009900;">]</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$host</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">[</span><span style="color: #0000ff;">'host'</span><span style="color: #009900;">]</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">for</span> <span style="color: #009900;">(</span><span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <span style="color: #000088;">$total</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
                <span style="color: #666666; font-style: italic;">// generate random numbers</span>
                <span style="color: #990000;">srand</span><span style="color: #009900;">(</span><span style="color: #990000;">time</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
                <span style="color: #000088;">$random</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mt_rand</span><span style="color: #009900;">(</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">40</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
                <span style="color: #000088;">$random2</span> <span style="color: #339933;">=</span>  <span style="color: #990000;">mt_rand</span><span style="color: #009900;">(</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">100</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>

                <span style="color: #b1b100;">if</span> <span style="color: #009900;">(</span><span style="color: #990000;">substr</span><span style="color: #009900;">(</span><span style="color: #000088;">$random2</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">)</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span>
			<span style="color: #000088;">$as</span><span style="color: #339933;">=</span><span style="color: #0000ff;">"?as=<span style="color: #006699; font-weight: bold;">$random2</span>"</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">}</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">{</span>
			<span style="color: #000088;">$as</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">""</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">}</span>
                <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">"http://<span style="color: #006699; font-weight: bold;">$host</span>/varnish/gen/<span style="color: #006699; font-weight: bold;">$random</span><span style="color: #006699; font-weight: bold;">$as</span><span style="color: #000099; font-weight: bold;">\n</span>"</span><span style="color: #339933;">;</span>
                <span style="color: #990000;">flush</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span> <span style="color: #990000;">ob_flush</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">}</span>
        <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">"http://<span style="color: #006699; font-weight: bold;">$host</span>/varnish/gen/<span style="color: #006699; font-weight: bold;">$random</span><span style="color: #006699; font-weight: bold;">$as</span>"</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre>
</div>
</div>
<p>All this does is create a long list of URLs.  I used PHPs output buffering mechanisms to flush the buffer which is necessary when creating large URL lists so that you don’t wait forever.  Maybe it could have been written better but I don’t care – that wasn’t the point of this test.</p>
<p>The URLs that are created are in the format of:</p>
<pre>http://host/varnish/gen/50?as=100

http://host/varnish/gen/50</pre>
<p>This URL is mapped to another PHP file that simply generates dummy data of the size specified in the URL.  In the above cases, the files would be 50Kb large.  The query parameter “as” is just a useless piece of information that is meant to tell the proxy to cache it.  If the “as” query parameter does not exist, the proxy will forward the request to the backend and not cache it.  Its a simple way to generate cacheable and non-cacheable URLs.</p>
<p>To generate the list and store it in a local file, I used this command:</p>
<pre>curl http://192.168.165.101/varnish/makelist.php?total=10000&amp;host=192.168.165.104:8080
	&gt; urls-10k.txt</pre>
<p><strong>Verify the results of the script</strong></p>
<p>For your own sanity, make sure that the script did in fact generate a list of URLs that suits your needs.</p>
<p>Count the amount of URLs generated:</p>
<pre>cat urls-10k.txt | wc –l</pre>
<p>(yes, I know it creates one extra URL … Its fine by me.)</p>
<p>Count the amount of cacheable URLs containing the “as” query parameter:</p>
<pre>cat urls-10k.txt | grep as | wc –l</pre>
<p>Count the amount of unique cacheable URLs:</p>
<pre>cat urls-10k.txt | grep as | sort | uniq | wc –l</pre>
<h2>Running the tests</h2>
<p>In part one I used ApacheBench to load the servers but for these tests, I used <a title="Siege is an http regression testing and benchmarking utility" onclick="javascript:pageTracker._trackPageview('/outgoing/www.joedog.org/index/siege-home');" href="http://www.joedog.org/index/siege-home">Siege</a> and <a title="http_load runs multiple http fetches in parallel, to test the throughput of a web server" onclick="javascript:pageTracker._trackPageview('/outgoing/acme.com/software/http_load/');" href="http://acme.com/software/http_load/">http_load</a> which both allowed me to load URLs from a file.</p>
<p>I started with Varnish using the following commands:</p>
<pre>curl http://192.168.165.101/varnish/makelist.php?total=100000&amp;host=192.168.165.104:8080
	&gt; urls-100k.txt</pre>
<pre>http_load -parallel 10 -fetches 100000 urls-100k.txt
http_load -parallel 25 -fetches 100000 urls-100k.txt
http_load -parallel 50 -fetches 100000 urls-100k.txt
http_load -parallel 100 -fetches 100000 urls-100k.txt
http_load -parallel 200 -fetches 100000 urls-100k.txt
http_load -parallel 400 -fetches 100000 urls-100k.txt</pre>
<p>In between each http_load command, I restarted the Varnish service so that each test ran with an empty cache.  When I was done with the Varnish tests, I ran the same tests against Squid using the same commands above.</p>
<h2>The results</h2>
<p>The results of these tests represent the typical web application much better than the original tests did.</p>
<p>This first graph shows the average time for the proxy to accept a connection.  As concurrency goes up, it is expected that the time to connect would go up too.  Squid suffers more than Varnish does, but the difference is negligible.</p>
<p><a onclick="javascript:pageTracker._trackPageview('/downloads/wp-content/uploads/2009/09/image.png');" href="http://deserialized.com/wp-content/uploads/2009/09/image.png"><img style="border-width: 0px; display: inline;" title="image" src="http://deserialized.com/wp-content/uploads/2009/09/image_thumb.png" border="0" alt="image" width="580" height="188" /></a></p>
<p>The second graph is much more interesting.  As concurrency goes up, the Time-To-First-Byte for Squid goes up very sharply while Varnish holds its ground and remains very quick around 25ms.</p>
<p><a onclick="javascript:pageTracker._trackPageview('/downloads/wp-content/uploads/2009/09/image1.png');" href="http://deserialized.com/wp-content/uploads/2009/09/image1.png"><img style="border-width: 0px; display: inline;" title="image" src="http://deserialized.com/wp-content/uploads/2009/09/image_thumb1.png" border="0" alt="image" width="579" height="188" /></a></p>
<p>This third graph shows another interesting behavior.  As concurrency goes up, Varnish begins to even itself out at just under 800 fetches per second while Squid peaks at around 1100 fetches per second with around 50 concurrent connects and then sharply drops off as concurrency goes up.</p>
<p><a onclick="javascript:pageTracker._trackPageview('/downloads/wp-content/uploads/2009/09/image2.png');" href="http://deserialized.com/wp-content/uploads/2009/09/image2.png"><img style="border-width: 0px; display: inline;" title="image" src="http://deserialized.com/wp-content/uploads/2009/09/image_thumb2.png" border="0" alt="image" width="579" height="187" /></a></p>
<h2>Conclusion</h2>
<p>Squid versus Varnish is just another holy war that may never end.  The tests that I have performed have been very helpful for me and my team but your results may vary.  Of course, there are many more things to consider and I plan to write about some of the major differences between Squid and Varnish.</p>
<p>My results show that in raw cache hit performance, Varnish puts Squid to shame.  In real world scenarios I found that Squid can hold its own when dealing with small amounts of traffic, but it’s performance drops off very sharply as it begins to handle more connections. Varnish handles them without a sweat, as it was designed to do.</p>
<p>My next blog post will detail the differences between Varnish and Squid’s architecture, features, and the reasons I am pushing for Varnish in our environment.</p>
<p><strong>Edit:</strong></p>
<p>Some people are complaining in comments on Reddit and HackerNews that I have not provided any information about the hardware or operating system for my tests.  This information was posted in <a href="http://deserialized.com/reverse-proxy-performance-varnish-vs-squid-part-1/">Part one</a> of this post.</p>
<p>Fonte: http://deserialized.com</p>

]]></content:encoded>
			<wfw:commentRss>http://blog.deserv.info/2009/12/15/reverse-proxy-performance-%e2%80%93-varnish-vs-squid-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reverse Proxy Performance – Varnish vs. Squid (Part 1)</title>
		<link>http://blog.deserv.info/2009/12/15/reverse-proxy-performance-%e2%80%93-varnish-vs-squid-part-1/</link>
		<comments>http://blog.deserv.info/2009/12/15/reverse-proxy-performance-%e2%80%93-varnish-vs-squid-part-1/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 20:30:20 +0000</pubDate>
		<dc:creator>Flávio  Silva</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[Tutoriais]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[prox]]></category>
		<category><![CDATA[proxy reverso]]></category>
		<category><![CDATA[Software Livre]]></category>
		<category><![CDATA[squid]]></category>
		<category><![CDATA[varnish]]></category>
		<category><![CDATA[varnish cache]]></category>

		<guid isPermaLink="false">http://blog.deserv.info/?p=160</guid>
		<description><![CDATA[Typical web applications require dozens of SQL queries to generate a single page.  When your application is serving over 1,000,000 pages per day, you quickly realize that the performance bottleneck is your database.  The typical answer to slow database queries is “just use memcached!”  Memcached and other data caches can only take you so far.  This is where reverse proxies come in.  There are a handful of them out there, including Nginx, Perlbal, Squid and Varnish.  Which to use is up to you.]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fblog.deserv.info%252F2009%252F12%252F15%252Freverse-proxy-performance-%2525e2%252580%252593-varnish-vs-squid-part-1%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2F4HBuEw%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Reverse%20Proxy%20Performance%20%E2%80%93%20Varnish%20vs.%20Squid%20%28Part%201%29%22%20%7D);"></div>
<p><img style="border: 0px none ; margin: 0px 20px 0px 0px; display: inline;" title="squid-vs-varnish" src="http://deserialized.com/wp-content/uploads/2009/09/squidvsvarnish.gif" border="0" alt="squid-vs-varnish" width="133" height="153" align="left" /> Typical web applications require dozens of SQL queries to generate a single page.  When your application is serving over 1,000,000 pages per day, you quickly realize that the performance bottleneck is your database.  The typical answer to slow database queries is “just use <a onclick="javascript:pageTracker._trackPageview('/outgoing/www.danga.com/memcached/');" href="http://www.danga.com/memcached/">memcached</a>!”  <a onclick="javascript:pageTracker._trackPageview('/outgoing/www.danga.com/memcached/');" href="http://www.danga.com/memcached/">Memcached</a> and other data caches can only take you so far.  This is where reverse proxies come in.  There are a handful of them out there, including <a title="nginx [engine x] is a HTTP server and mail proxy server" onclick="javascript:pageTracker._trackPageview('/outgoing/nginx.net/');" href="http://nginx.net/">Nginx</a>, <a title="Perlbal is a Perl-based reverse proxy load balancer and web server" onclick="javascript:pageTracker._trackPageview('/outgoing/www.danga.com/perlbal/');" href="http://www.danga.com/perlbal/">Perlbal</a>, <a title="Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more" onclick="javascript:pageTracker._trackPageview('/outgoing/www.squid-cache.org/');" href="http://www.squid-cache.org/">Squid</a> and <a title="Varnish is a state-of-the-art, high-performance HTTP accelerator. It uses the advanced features in Linux 2.6, FreeBSD 6/7 and Solaris 10 to achieve its high performance." onclick="javascript:pageTracker._trackPageview('/outgoing/varnish.projects.linpro.no/');" href="http://varnish.projects.linpro.no/">Varnish</a>.  Which to use is up to you.</p>
<p><span id="more-160"></span></p>
<h2>Deciding what is best for you</h2>
<p>Assuming that you have taken a step back and really analyzed your problem first, the next step is to analyze the possible solutions.  For us, Varnish seems like the best option with Squid close behind.  To be fair, I’ve set up a test server with both Varnish and Squid running.  I’ll use <a title="ab is a tool for benchmarking your Apache Hypertext Transfer Protocol (HTTP) server" onclick="javascript:pageTracker._trackPageview('/outgoing/httpd.apache.org/docs/2.0/programs/ab.html');" href="http://httpd.apache.org/docs/2.0/programs/ab.html">ApacheBench</a> to generate load and requests.</p>
<p>I’ve analyzed our pages to see what the typical page size is and recorded the average page sizes for 5 different page types.  They range from around 10KB to 35KB (<a onclick="javascript:pageTracker._trackPageview('/outgoing/developer.yahoo.com/performance/rules.html#gzip');" href="http://developer.yahoo.com/performance/rules.html#gzip">gzipped</a>).  For my test, I’ll be benchmarking with 10KB, 15KB, 20KB, 30KB, 40KB, and 50KB files to get a good range of different size requests.</p>
<p>To test under different load capacities, I’ll use <a title="ab is a tool for benchmarking your Apache Hypertext Transfer Protocol (HTTP) server" onclick="javascript:pageTracker._trackPageview('/outgoing/httpd.apache.org/docs/2.0/programs/ab.html');" href="http://httpd.apache.org/docs/2.0/programs/ab.html">ApacheBench</a> to generate loads with different amounts of concurrent users ranging from 10 to 400.</p>
<h2>The test</h2>
<p>I’ll be using two identical machines on the same local class C network to eliminate (as much as possible) network latency.</p>
<p><strong>The machines look something like this:</strong></p>
<ul>
<li>Pentium 4 3GHz (8KB Level 1, 512KB Level 2)</li>
<li>2GB (4×512 DDR 400MHz)</li>
<li>120GB ATA Western Digital Caviar WD1200JB</li>
<li>CentOS 5</li>
</ul>
<p>(I don’t have more information than that.  Suffice to say that it is a few years old and not very powerful)</p>
<p>I am using Varnish 2.04 and Squid 2.6.STABLE21.  There are newer versions of Squid but i am using this version because the 3.x branch is missing features found in the 2.x branch and I have read several reports of 2.7 crashing, etc.</p>
<p><strong>The command to run the load test looks something like this:</strong></p>
<p>ab –c concurrent_users –n total_requests “url”</p>
<p>This will let you specify how many concurrent users to run and how many requests to make.  I have the proxy servers running on ServerA and I run the benchmark from ServerB.</p>
<h2>The results</h2>
<p>In general, Varnish seems to perform twice as well as Squid does.  In every test, Varnish serves nearly 2x more requests per second and has half the average response time.</p>
<table border="2" cellspacing="0">
<tbody>
<tr valign="bottom">
<td colspan="2" align="center"></td>
<td colspan="3" align="center" valign="middle" bgcolor="#d7e4bd"><span style="font-family: Calibri; color: #9bbb59; font-size: large;"><strong>Varnish</strong></span></td>
<td colspan="3" align="center" valign="middle" bgcolor="#d7e4bd"><span style="font-family: Calibri; color: #9bbb59; font-size: large;"><strong>Squid</strong></span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center" valign="middle"><span style="font-family: Calibri; font-size: small;">File Size</span></td>
<td width="59" align="center" valign="middle"><span style="font-family: Calibri; font-size: small;">Concurrent Users</span></td>
<td width="58" align="center" valign="middle"><span style="font-family: Calibri; font-size: small;">(V) Requests per second</span></td>
<td width="64" align="center" valign="middle"><span style="font-family: Calibri; font-size: small;">(V) Avg across all requests</span></td>
<td width="60" align="center" valign="middle"><span style="font-family: Calibri; font-size: small;">(V) Average Request (ms)</span></td>
<td width="59" align="center" valign="middle"><span style="font-family: Calibri; font-size: small;">(S) Requests per second</span></td>
<td width="65" align="center" valign="middle"><span style="font-family: Calibri; font-size: small;">(S) Avg across all requests</span></td>
<td width="57" align="center" valign="middle"><span style="font-family: Calibri; font-size: small;">(S) Average Request (ms)</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">10k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">10</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">6592</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.152</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">1</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">3078</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.325</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">3</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">10k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">25</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">6915</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.145</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">3</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">3568</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.280</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">7</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">10k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">50</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">7071</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.141</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">7</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">3539</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.283</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">14</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">10k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">100</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">6860</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.146</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">13</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">3565</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.280</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">28</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">10k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">200</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">7252</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.138</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">27</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">3506</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.285</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">57</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">10k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">400</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">7181</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.139</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">56</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">3518</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.284</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">113</span></td>
</tr>
<tr valign="bottom">
<td width="40" bgcolor="#748c42"></td>
<td width="59" bgcolor="#748c42"></td>
<td width="58" bgcolor="#748c42"></td>
<td width="64" bgcolor="#748c42"></td>
<td width="60" bgcolor="#748c42"></td>
<td width="59" bgcolor="#748c42"></td>
<td width="65" bgcolor="#748c42"></td>
<td width="57" bgcolor="#748c42"></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">15k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">10</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">4636</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.216</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">2</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">2949</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.339</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">3</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">15k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">25</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">5954</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.168</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">4</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">3168</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.316</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">7</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">15k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">50</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">6036</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.166</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">8</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">3118</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.321</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">16</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">15k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">100</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">6060</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.165</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">16</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">3247</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.308</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">30</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">15k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">200</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">6066</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.165</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">32</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">3226</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.310</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">61</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">15k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">400</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">6048</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.165</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">66</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">3092</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.323</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">129</span></td>
</tr>
<tr valign="bottom">
<td width="40" bgcolor="#748c42"></td>
<td width="59" bgcolor="#748c42"></td>
<td width="58" bgcolor="#748c42"></td>
<td width="64" bgcolor="#748c42"></td>
<td width="60" bgcolor="#748c42"></td>
<td width="59" bgcolor="#748c42"></td>
<td width="65" bgcolor="#748c42"></td>
<td width="57" bgcolor="#748c42"></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">20k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">10</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">4689</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.213</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">2</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">2553</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.392</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">3</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">20k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">25</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">5342</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.187</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">4</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">2675</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.374</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">9</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">20k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">50</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">5422</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.184</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">9</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">2799</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.357</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">17</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">20k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">100</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">5446</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.184</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">18</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">2861</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.349</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">34</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">20k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">200</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">5430</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.184</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">36</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">2795</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.358</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">71</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">20k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">400</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">5400</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.185</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">74</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">2656</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.376</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">150</span></td>
</tr>
<tr valign="bottom">
<td width="40" bgcolor="#748c42"></td>
<td width="59" bgcolor="#748c42"></td>
<td width="58" bgcolor="#748c42"></td>
<td width="64" bgcolor="#748c42"></td>
<td width="60" bgcolor="#748c42"></td>
<td width="59" bgcolor="#748c42"></td>
<td width="65" bgcolor="#748c42"></td>
<td width="57" bgcolor="#748c42"></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">25k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">10</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">4135</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.242</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">2</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">2331</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.429</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">4</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">25k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">25</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">4485</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.223</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">5</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">2308</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.433</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">10</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">25k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">50</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">4488</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.223</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">11</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">2221</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.450</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">22</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">25k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">100</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">4446</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.225</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">22</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">2217</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.451</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">45</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">25k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">200</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">4311</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.232</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">46</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">2180</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.459</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">91</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">25k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">400</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">4160</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.240</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">96</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">2026</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.493</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">197</span></td>
</tr>
<tr valign="bottom">
<td width="40" bgcolor="#748c42"></td>
<td width="59" bgcolor="#748c42"></td>
<td width="58" bgcolor="#748c42"></td>
<td width="64" bgcolor="#748c42"></td>
<td width="60" bgcolor="#748c42"></td>
<td width="59" bgcolor="#748c42"></td>
<td width="65" bgcolor="#748c42"></td>
<td width="57" bgcolor="#748c42"></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">30k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">10</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">3463</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.289</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">2</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">1936</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.516</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">5</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">30k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">25</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">3689</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.271</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">6</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">2002</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.499</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">12</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">30k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">50</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">3661</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.273</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">13</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">1887</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.530</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">26</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">30k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">100</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">3627</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.276</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">27</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">1778</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.562</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">56</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">30k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">200</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">3589</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.279</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">55</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">1746</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.573</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">114</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">30k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">400</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">3541</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.282</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">112</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">1798</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.556</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">222</span></td>
</tr>
<tr valign="bottom">
<td width="40" bgcolor="#748c42"></td>
<td width="59" bgcolor="#748c42"></td>
<td width="58" bgcolor="#748c42"></td>
<td width="64" bgcolor="#748c42"></td>
<td width="60" bgcolor="#748c42"></td>
<td width="59" bgcolor="#748c42"></td>
<td width="65" bgcolor="#748c42"></td>
<td width="57" bgcolor="#748c42"></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">40k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">10</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">2752</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.363</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">3</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">1602</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.624</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">6</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">40k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">25</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">2824</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.354</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">8</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">1584</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.631</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">15</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">40k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">50</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">2826</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.354</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">17</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">1492</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.670</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">33</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">40k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">100</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">2827</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.354</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">35</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">1551</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.645</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">64</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">40k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">200</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">2822</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.354</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">70</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">1538</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.65</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">130</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">40k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">400</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">2794</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.358</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">143</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">1372</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.728</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">291</span></td>
</tr>
<tr valign="bottom">
<td width="40" bgcolor="#748c42"></td>
<td width="59" bgcolor="#748c42"></td>
<td width="58" bgcolor="#748c42"></td>
<td width="64" bgcolor="#748c42"></td>
<td width="60" bgcolor="#748c42"></td>
<td width="59" bgcolor="#748c42"></td>
<td width="65" bgcolor="#748c42"></td>
<td width="57" bgcolor="#748c42"></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">50k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">10</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">2254</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.443</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">4</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">1401</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.713</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">7</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">50k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">25</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">2265</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.441</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">11</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">1379</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.725</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">18</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">50k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">50</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">2266</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.441</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">22</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">1368</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.731</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">36</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">50k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">100</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">2268</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.441</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">44</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">1360</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.735</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">73</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">50k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">200</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">2266</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.441</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">88</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">1230</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.813</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">162</span></td>
</tr>
<tr valign="bottom">
<td width="40" align="center"><span style="font-family: Calibri; font-size: small;">50k</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">400</span></td>
<td width="58" align="center"><span style="font-family: Calibri; font-size: small;">2267</span></td>
<td width="64" align="center"><span style="font-family: Calibri; font-size: small;">0.441</span></td>
<td width="60" align="center"><span style="font-family: Calibri; font-size: small;">176</span></td>
<td width="59" align="center"><span style="font-family: Calibri; font-size: small;">1216</span></td>
<td width="65" align="center"><span style="font-family: Calibri; font-size: small;">0.822</span></td>
<td width="57" align="center"><span style="font-family: Calibri; font-size: small;">328</span></td>
</tr>
</tbody>
</table>
<p>Here are the graphs of the above data for easier visualization:</p>
<p><a onclick="javascript:pageTracker._trackPageview('/downloads/wp-content/uploads/2009/09/varnishsquidbenchmarkreqpersecond2.gif');" href="http://deserialized.com/wp-content/uploads/2009/09/varnishsquidbenchmarkreqpersecond2.gif"><img style="border: 0px none ; display: inline;" src="http://deserialized.com/wp-content/uploads/2009/09/varnishsquidbenchmarkreqpersecond_thumb2.gif" border="0" alt="" width="200" height="244" /></a> <a onclick="javascript:pageTracker._trackPageview('/downloads/wp-content/uploads/2009/09/varnishsquidbenchmarkavgrequesttime2.gif');" href="http://deserialized.com/wp-content/uploads/2009/09/varnishsquidbenchmarkavgrequesttime2.gif"><img style="border: 0px none ; display: inline;" src="http://deserialized.com/wp-content/uploads/2009/09/varnishsquidbenchmarkavgrequesttime_thumb2.gif" border="0" alt="" width="200" height="244" /></a></p>
<h2>Something is wrong here</h2>
<p>These are simply benchmarks and are not meant to represent real world scenarios for a few reasons.  Most importantly, this test takes place on a local network that goes through one router.  Running this test on a local network does not take into consideration the typical network latency you would find across the internet.</p>
<p>Secondly, this test only illustrates the raw speed of serving up cached content which isn’t a typical real world scenario.  To really test the overall performance of both of these, we need to simulate the three major steps of a reverse proxy:</p>
<ol>
<li>Forwarding a request to a backend server</li>
<li>Physically caching it (memory or disk)</li>
<li>Serving the cached data</li>
</ol>
<p>Testing any of these three steps is good, and shows the raw performance of that function but it doesn’t give us a general overview of the overall performance.</p>
<h2>Next Steps</h2>
<p>I need to come up with a way to generate load on the server such that it represents the typical flow of requests that we would normally see on a server.  I am running this on a test server, not against production data, so if anyone has an idea of how I can do this, please do let me know.  The results of this test will be Part 2 of this post.</p>
<p>Additionally, please let me know if you spot inefficiencies in my testing methodology. I don’t claim to be a load testing expert so any advice you can offer is appreciated.</p>
<p>Fonte: http://deserialized.com</p>

]]></content:encoded>
			<wfw:commentRss>http://blog.deserv.info/2009/12/15/reverse-proxy-performance-%e2%80%93-varnish-vs-squid-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

