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

<channel>
	<title>Observando a la lluvia &#187; apache2</title>
	<atom:link href="http://blog.luchorossi.com.ar/tag/apache2/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.luchorossi.com.ar</link>
	<description></description>
	<lastBuildDate>Fri, 02 Dec 2011 19:46:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Instalando APC PHP Cache en Debian / Lenny para Drupal</title>
		<link>http://blog.luchorossi.com.ar/2010/06/15/instalando-apc-php-cache-en-debian-lenny-para-drupal/</link>
		<comments>http://blog.luchorossi.com.ar/2010/06/15/instalando-apc-php-cache-en-debian-lenny-para-drupal/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 18:32:41 +0000</pubDate>
		<dc:creator>lucho</dc:creator>
				<category><![CDATA[Software Libre]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[apc]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[gcoop]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[virtualhost]]></category>

		<guid isPermaLink="false">http://blog.luchorossi.com.ar/?p=454</guid>
		<description><![CDATA[Hace poco me estuve peleando con la lentitud de drupal 5 al que no le podía activar la cache que viene con el core. Entonces empecé a investigar la posibilidad para mejorar la performance del lado del servidor. Una de las cosas que miré y me ayudó fue el APC PHP Cache Accelerator Este módulo [...]]]></description>
			<content:encoded><![CDATA[<p>Hace poco me estuve peleando con la lentitud de <a title="Drupal" href="http://www.drupal.org" target="_blank">drupal</a> 5 al que no le podía activar la cache que viene con el core. Entonces empecé a investigar la posibilidad para mejorar la performance del lado del servidor. Una de las cosas que miré y me ayudó fue el <a title="apc php cache" href="http://php.net/manual/es/book.apc.php" target="_blank">APC PHP Cache Accelerator</a></p>
<p>Este módulo de PHP hace un caché del código y reduce increíblemente la carga del sitio web. Sobre todo si tienen un drupal con muchos módulos!</p>
<p>Para instalar el php-apc en debian lenny como usuario root ejecutar:</p>
<blockquote><p><span style="color: #000000;">aptitude install php-apc</span></p></blockquote>
<p>También le configuré algunos parámetros del apc ya que los que vienen por defecto a mi no me servían:</p>
<p>Abrimos el php.ini:</p>
<blockquote><p>sudo vim /etc/php5/apache2/php.ini</p></blockquote>
<p>Y pasteamos las siguientes lineas al final de todo:</p>
<pre>#<strong>APC</strong> 3.0.16 tuning below

extension="<strong>apc</strong>.so"
<strong>apc</strong>.enabled=1
<strong>apc</strong>.shm_segments=1
<strong>apc</strong>.shm_size=128
<strong>apc</strong>.num_files_hint=2048
<strong>apc</strong>.user_entries_hint=4096
<strong>apc</strong>.gc_ttl=3600
<strong>apc</strong>.cache_by_default=1
<strong>apc</strong>.mmap_file_mask=/dev/zero
<strong>apc</strong>.slam_defense=0
<strong>apc</strong>.file_update_protection=2
<strong>apc</strong>.enable_cli=0
<strong>apc</strong>.max_file_size=1M
<strong>apc</strong>.stat=0
<strong>apc</strong>.write_lock=0
<strong>apc</strong>.report_autofilter=0
<strong>apc</strong>.include_once_override=1
<strong>apc</strong>.localcache=0</pre>
<p>Luego de restartear nuestro servidor web (apache2 en nuestro caso) comienza a correr el APC.</p>
<blockquote><p>sudo /etc/init.d/apache2 restart</p></blockquote>
<p>De esta forma activamos el APC PHP para todos los virtualhost de nuestro apache2.</p>
<p>Si por alguna razón quisieramos deshabilitar el APC para alguno de los virtualhost que tenemos en el servidor, debemos agregar la siguiente linea en el .htaccess o la configuración del sitio web correspondiente.</p>
<blockquote><p>php_flag apc.cache_by_default Off</p></blockquote>
<p>Si queremos habilitar el APC únicamente para algunos sitios debemos agregar la linea</p>
<blockquote><p>php_flag apc.cache_by_default On</p></blockquote>
<p>Si queremos visualizar el uso del cache por el APC ejecutamos lo siguiente:</p>
<blockquote><p>gunzip /usr/share/doc/php-apc/apc.php.gz<br />
ln -s /usr/share/doc/php-apc/apc.php /var/www/apc.php</p></blockquote>
<p>Deberiamos de ver unos gráficos como estos</p>
<p><img class="alignnone size-full wp-image-458" title="APC INFO_1" src="http://blog.luchorossi.com.ar/wp-content/uploads/APC-INFO_1.png" alt="APC INFO_1" width="465" height="481" /></p>
<p><img class="alignnone size-full wp-image-459" title="APC INFO_2" src="http://blog.luchorossi.com.ar/wp-content/uploads/APC-INFO_2.png" alt="APC INFO_2" width="458" height="492" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.luchorossi.com.ar/2010/06/15/instalando-apc-php-cache-en-debian-lenny-para-drupal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

