<?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>alvarezp &#187; Opera browser</title>
	<atom:link href="http://blog.alvarezp.org/categorias/opera-browser/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.alvarezp.org</link>
	<description>cat &#62;&#62; /dev/blog</description>
	<lastBuildDate>Thu, 02 Feb 2012 19:19:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>La falacia de que &#8220;la RAM está para ser usada&#8221;</title>
		<link>http://blog.alvarezp.org/2011/07/15/la-falacia-de-que-la-ram-esta-para-ser-usada/</link>
		<comments>http://blog.alvarezp.org/2011/07/15/la-falacia-de-que-la-ram-esta-para-ser-usada/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 08:12:55 +0000</pubDate>
		<dc:creator>alvarezp</dc:creator>
				<category><![CDATA[Computación]]></category>
		<category><![CDATA[Español]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Opera browser]]></category>
		<category><![CDATA[Planet Gultij]]></category>
		<category><![CDATA[Planeta Linux]]></category>
		<category><![CDATA[Queja]]></category>

		<guid isPermaLink="false">http://blog.alvarezp.org/?p=1408</guid>
		<description><![CDATA[Parece que se ha vuelto popularizado un error de concepto en algunos foros de usuarios. Tal vez recuerdes esta frase:
La RAM está para ser usada.
Esta frase es cierta dentro de un contexto en particular. Se usa para permitir que el sistema operativo acelere disco a RAM tanto como sea posible, pues la RAM es significativamente [...]]]></description>
			<content:encoded><![CDATA[<p>Parece que se ha vuelto popularizado un error de concepto en algunos foros de usuarios. Tal vez recuerdes esta frase:</p>
<blockquote><p>La RAM está para ser usada.</p></blockquote>
<p>Esta frase es cierta <em>dentro de un contexto en particular</em>. Se usa para permitir que el sistema operativo acelere disco a RAM tanto como sea posible, pues la RAM es significativamente más rápida que los discos duros.</p>
<p>Sin embargo, dentro del contexto de una aplicación de usuario, en realidad es una falacia. Algunos usuarios (e incluso algunos desarrolladores) no saben mucho sobre el funcionamiento interno de su computadora y usan esta frase fuera de su contexto correcto. Lo peor es que algunas veces ni siquiera les importa el consumo de la RAM. No les importan los derrames de memoria o piensan que si ocurren sólo una vez, no pasa nada. O piensan que los lenguajes y plataformas con recolección de basura (garbage collectors) se encargarán mágicamente de todo. Sin darse cuenta, acaban usando la frase en cuestión como un equivalente de:</p>
<blockquote><p>La RAM está para ser <em>desperdiciada</em>.</p></blockquote>
<p>Hay algunas cuestiones que en realidad alimentan este modo de pensar, llevándolos a concluir que una aplicación realmente debería poner tanta información como sea posible en la RAM y que, tarde o temprano, el sistema operativo lo manejará eficientemente. Más aún, que no hacerlo es un sacrificio de rendimiento.</p>
<p>Consideremos lo siguiente (sobresimplificaré para efectos de facilidad de explicación, pero el modelo es bueno). Por una parte:</p>
<ul>
<li>Cuando una aplicación solicita RAM y el sistema operativo la <em>asigna</em>, esa memoria queda reservada para el uso <strong>exclusivo</strong> de la aplicación hasta que ésta la <em>libera</em>. Una aplicación no puede saber (y no debería) si otra requiere o solicita RAM.</li>
<li>Si la RAM física se llena y hay espacio de paginación (swap o paging) disponible en el sistema, el OS descargará algunas de las <em>páginas</em> menos usadas de la RAM hacia el espacio de paginación, sea una partición o un archivo. Cuando la RAM paginada se necesita nuevamente, se <em>intercambia</em> con otras páginas de RAM de las menos usadas. Ambas operaciones requieren de actividad en el disco duro. Eso es lo que hace a la paginación inherentemente lenta.</li>
<li>El sistema operativo siempre dejará libre algo (digamos, 50 MB) de RAM física sin usar para que haya disponible cuando necesite reaccionar a una emergencia de inestabilidad de sistema.</li>
</ul>
<p>Por otra parte:</p>
<ul>
<li>El sistema operativo usa memoria física para acelerar lecturas y escrituras a disco por medio de caché, de modo que cuando un sector de disco es leído múltiples veces, las subsecuentes se obtienen de la RAM, que es mucho más rápida.</li>
<li>El OS sólo acelerará lecturas/escrituras a disco hacia RAM física, pues sería inútil &#8220;acelerar&#8221; de disco a disco.</li>
<li>Cuando una aplicación solicita RAM, el OS liberará RAM usada para caché antes de asignarla al a aplicación solicitante. Esta operación no requiere actividad de disco si se están liberando lecturas aceleradas o escrituras ya fijadas; sin embargo, sí requiere de escribir en disco si necesita fijar escrituras aceleradas pendientes. Usualmente, el sistema operativo realiza esta fijación cuando la PC está en ocio, de modo que uno no lo nota y, cuando llega el momento, ya no hay escrituras pendientes por fijar.</li>
</ul>
<p>Por último:</p>
<ul>
<li>Linux reporta el &#8220;tamaño residente en RAM&#8221; para un proceso como &#8220;consumo de RAM física&#8221;. Si uno quiere medir el consumo de RAM por una aplicación, se debe hacer con la swap desactivada. Por favor indíquenme cómo Windows reporta la RAM consumida por un proceso.</li>
<li>Las escrituras a disco suelen ser más lentas que las lecturas.</li>
</ul>
<p>La realidad sobre esta falacia es &#8220;cierto, el sistema operativo se encargará de eso, pero se muere el caché de disco y se provoca la paginación, <strong>alentando todo el sistema, incluyendo la propia aplicación</strong>&#8220;. Entonces: sí, el sistema se encarga, pero en realidad está recuperándose del error del programador a costa de una degradación global e innecesaria de sistema y la potencial inestabilida que conlleva.</p>
<p>Analicemos dos escenarios tomados de mi propia experiencia. Repito: estoy sobresimplificando. Úsese esto como modelo.</p>
<h3>Caso 1: Un navegador acelera la red a disco en lugar de a RAM</h3>
<p>Tienes un sistema con 2 GB of RAM, de los cuales tienes 1 GB <em>libres</em> (como en &#8220;tal vez usados por el caché de disco pero ciertamente disponible para las aplicaciones&#8221;). Tú ejecutas un navegador que acelera los recursos de red a disco porque es más rápido que el Internet (pues es más rápido que el Internet) y usa unos 300 MB of RAM.</p>
<p>1000 &#8211; 300 &#8211; 50 = 650</p>
<p>Acabas con unos 650 MB of RAM para aceleración de disco por memoria caché y 50 MB de RAM física real.</p>
<p>Cuando un navegador necesita un recurso de red, intenta cargarlo de disco (pues lo está acelerando). Sin embargo, el disco queda acelerado en la RAM por el sistema operativo y las lecturas subsecuentes se realizan en RAM. La penalidad en rendimiento apenas se nota.</p>
<p>Si el navegador quiere acelerar una página visitada por primera vez, la guardará ne disco. El SO acelerará la lectura a RAM y la pospondrá hasta que el sistema esté ne ocio (cuando estás leyendo el contenido del sitio). La penalidad en rendimiento apenas se nota.</p>
<p>Cuando cualquier otro proceso lee de disco, la probabilidad de pegarle al caché es alta porque hay 650 MB de RAM disponibles par esto. Incluso si se le falla al caché, lo que se lee de disco se acelera en RAM para los accesos subsecuentes. reading.</p>
<p>Entonces, ejecutas una máquina virtual que requiere de 450 MB de RAM. Ocurre lo siguiente:</p>
<ul>
<li>El sistema operativo libera 450 MB de caché de disco. Parte de este requiere de escrituras, parte no. Esta operación es sólo tan lenta como la cantidad de escrituras requeridas para fijar las escrituras aceleradas, así que no es <em>tan</em> lento. Además, el usuario en cierto modo lo espera porque le pidió a la PC cargar la VM.</li>
<li>No hay paginación. No es necesario.</li>
<li>Finalmente se asignan los 450 MB a la VM.</li>
<li>La VM escribe a ese espacio físico de RAM asignado.</li>
</ul>
<p>Aún quedan 200 MB disponibles para caché de disco, que el SO procurará usar eficientemente.</p>
<p>Ahora, el navegador quiere cargar algo de su &#8220;cache de disco&#8221;. Hay una probabilidad, claro que mayor que 0, de pegarle al caché y que el SO sirva el dato directamente desde la RAM. Supongamos que no, que fue leída desde disco. El navegador aún está acelerando la navegación pues el disco local es más rápido que el Internet. Más aún, el SO acelerará este objeto en la RAM para sus accesos subsecuentes.</p>
<p>Claro: la VM continúa corriendo desde la RAM sin necesitar de ningún tipo de paginación (o hiperpaginación). El sistema responde perfectamente. El usuario sabe (o debería saber) que si quiere liberar memoria, debe cerrar la VM o el navegador.</p>
<h3>Caso 2: Un navegador usa más RAM que la que requiere, para su aceleración</h3>
<p>Tienes un sistema con 2 GB of RAM, de los cuales tienes 1 GB <em>libres</em> (como en &#8220;tal vez usados por el caché de disco pero ciertamente disponible para las aplicaciones&#8221;). Tú ejecutas un navegador que acelera los recursos de red a disco porque es más rápido que el Internet (pues es más rápido que el Internet) y usa unos 300 MB of RAM.</p>
<p>1000 &#8211; 600 &#8211; 50 = 350</p>
<p>Acabas con unos 350 MB of RAM para aceleración de disco y 50 MB de RAM física real.</p>
<p>Cuando el navegador necesita un recurso de red, trata de cargarlo desde su asignación de RAM, así que es muy rápido (aún así, tiene que leerlo primero de disco si no estaba previamente disponible en RAM).</p>
<p>Cuando cualquier otra aplicación lee de disco hay una baja probabilidad de pegarle al caché. En cualquier caso, la probabilidad general de que otra aplicación le pegue al caché es más baja, pues la memoria está exclusivamente asingada para el navegador. Esto incrementa significativamente la probabilidad de acceder a disco, lo que puede llevar a una alentar todo el sistema.</p>
<p>Minimizar el navegador <em>no</em> libera memoria para otras aplicaciones. la memoria aún está asignada para su uso exclusivo para éste.</p>
<p>Entonces, ejecutas una máquina virtual que requiere de 450 MB de RAM. Ocurre lo siguiente:</p>
<ul>
<li>El sistema operativo libera 350 MB de caché de disco. Parte de este requiere de escrituras, parte no. Esta operación es sólo tan lenta como la cantidad de escrituras requeridas para fijar las escrituras aceleradas, así que no es <em>tan</em> lento.</li>
<li>Determina los 100 MB menos usados de RAM y las mueve al espacio de paginación. Esta operación es lenta pues implica varias escrituras inevitables a disco.</li>
<li>Finalmente se asignan los 450 MB a la VM</li>
<li>La VM escribe a ese espacio físico de RAM asignado.</li>
</ul>
<p>El sistema ya no tiene caché de disco. Cuando otra aplicación necesita leer de disco, no le pegarán al inexistente caché y el SO tendrá que acceder físicamente al disco para servir esta petición. Esto es lento. Lo peor es que el acceso a disco no será acelerado para sus subsecuentes lecturas.</p>
<p>Ahora, el navegador quiere cargar algo desde su propia &#8220;caché de memoria&#8221; (que, por cierto, tal vez está paginada a disco). Puede pasar una de dos:</p>
<p>Si el recurso a extraer del caché de RAM de la aplicación está paginado en disco, el SO necesitará leerlo de vuelta. Puesto que los datos leídos ahora serán memoria &#8220;más reciente usada&#8221;, el SO podría intercambiarlos de disco contra algo de la RAM de la VM o de otra aplicación menos usada. Esta operación es lenta pues implica varias escrituras inevitables a disco. O:</p>
<p>Si el recurso aún está en la propia &#8220;caché de memoria&#8221; de la aplicación, será extraída como de rayo de la RAM. Sin embargo, la VM aún necesita su propia RAM para continuar al igual que las demás aplicaciones. Esto fuerza al sistema operativo a usar paginación nuevamente. Además, no hay RAM disponible para caché de disco y otras solicitudes de disco estarán continuamente siendo servidas desde disco sin la posibilidad de acelerar las subsecuentes hacia RAM. Esto genera una actividad constante a disco, alentando todo el sistema <strong>incluyendo al navegador</strong>. El &#8220;caché de memoria&#8221; de la aplicación no sirvió para nada.</p>
<p>Claro que la máquina virtual continúa corriendo y su RAM se necesita constantemente, así que la escritura a disco por paginación se vuelve una constante. El sistema operativo se alenta por lo que se llama <em>hiperpaginación</em>. En casos extremos, el sistema deja de responder, impidiendo al usuario de siquiera cerrar una de las dos aplicaciones para recuperarlo.</p>
<h3>Conclusiones</h3>
<p>Sí, la RAM está ahí para ser usada cuando se necesita, no para desperdiciarse. La RAM es un recurso limitado. Hay maneras de usar la RAM eficientemente. Por ejemplo, cargar los índices de un buzón de correo en RAM (sin cargar el contenido completo del buzón) puede, si se hace correctamente, acelerar significativamente la búsqueda de mensajes.</p>
<p>Sin embargo, acelerar disco a RAM puede que no sea una buena idea. La aceleración ya se hace por el SO, así que sólo se desperdicia una función eficiente del sistema operativo. A veces puede ser una buena idea, pero lo más probable, especialmente en aplicaciones de escritorio, es que no.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.alvarezp.org/2011/07/15/la-falacia-de-que-la-ram-esta-para-ser-usada/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The &#8220;RAM is there to be used&#8221; fallacy</title>
		<link>http://blog.alvarezp.org/2011/07/14/the-ram-is-there-to-be-used-fallacy/</link>
		<comments>http://blog.alvarezp.org/2011/07/14/the-ram-is-there-to-be-used-fallacy/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 02:09:32 +0000</pubDate>
		<dc:creator>alvarezp</dc:creator>
				<category><![CDATA[Computación]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Opera browser]]></category>
		<category><![CDATA[Queja]]></category>

		<guid isPermaLink="false">http://blog.alvarezp.org/?p=1403</guid>
		<description><![CDATA[There seems to be a common misconception around some user forums. Maybe you recall this phrase:
RAM is there to be used.
This phrase is true within a particular context. It is used to let the operating system cache as much disk as possible into RAM, as RAM is significantly faster than hard disks.
However, within the context [...]]]></description>
			<content:encoded><![CDATA[<p>There seems to be a common misconception around some user forums. Maybe you recall this phrase:</p>
<blockquote><p>RAM is there to be used.</p></blockquote>
<p>This phrase is true <em>within a particular context</em>. It is used to let the operating system cache as much disk as possible into RAM, as RAM is significantly faster than hard disks.</p>
<p>However, within the context of a user-space application it is actually a fallacy. Some users (and even some developers) don&#8217;t know much about the inner workings of their computers, and use this phrase outside of its proper context. What is worse, sometimes they don&#8217;t even care much about RAM consumption. They don&#8217;t care about memory leaks, or think that if memory leaking occurs only once, it&#8217;s fine. Or they think garbage-collected frameworks or languages will take care of everything by magic. Without knowing, they end up using the aforementioned phrase as the equivalent of:</p>
<blockquote><p>RAM is there to be <em>wasted</em>.</p></blockquote>
<p><span id="more-1403"></span><br />
There are some issues that may lead to actually feed this thought, leading them to think that an application actually should put as much information as needed in RAM, and that, sooner or later, &#8220;the OS will handle it efficiently&#8221;. Furthermore, that not doing this is just a performance sacrifice.</p>
<p>Consider the following (I&#8217;ll oversimplifying for the sake of easy explanation, but the model is true). On one hand:</p>
<ul>
<li>When an application requests for RAM and the OS <em>allocates</em> it, the memory is being reserved for its <strong>exclusive</strong> use until the application <em>frees</em> it. An application can not know (and should not know) if another application requires or requests RAM.</li>
<li>If physical RAM gets topped and there is swap space available in the system, the OS will move out some of the least used RAM <em>pages</em> out to swap space, be it a partition or a file. When the paged-out RAM in swap space is needed, it gets <em>swapped</em> with other least-used physical RAM pages. Both operations require hard disk activity. That&#8217;s what makes swapping inherently slow.</li>
<li>The operating system will always leave some (say, 50 MB) physical RAM unused, so it has RAM available to react to a system instability emergency.</li>
</ul>
<p>On the other hand:</p>
<ul>
<li>Operating systems use free physical memory to cache disk reads and writes, so when a disk sector is read multiple times, subsequent reads are read from RAM, which is much faster.</li>
<li>The OS will only cache disk reads/writes to free physical RAM, as it would be useless to &#8220;cache&#8221; disk to disk.</li>
<li>When an application requests for RAM, the OS will free RAM used by disk cache before allocating it to the requesting application. This operation doesn&#8217;t require disk activity if freeing up RAM-cached reads or flushed disk writes; however, it does require disk writes if freeing up unflushed RAM-buffered disk writes. Usually, the OS flushes cached disk writes when system is idle, so you don&#8217;t really notice it, and when the time comes, everything is already flushed.</li>
</ul>
<p>And last:</p>
<ul>
<li>Linux, report &#8220;resident RAM size&#8221; for a process as &#8220;physical RAM usage&#8221;. So if you measure your application RAM requirements, you should do it with your swap partitions disabled. Please enlighten me about how Windows reports RAM for a process.</li>
<li>Disk writes are usually slower than disk reads.</li>
</ul>
<p>The actual truth around this fallacy is &#8220;sure, the OS handles it, but you kill the disk cache and encourage memory swapping, <strong>slowing the whole system down, including your own application</strong>&#8220;. So yes, the system &#8220;takes care&#8221; of it, but it is actually recovering from the programmer&#8217;s mistake at the cost of overall, unnecessary, system slow down and potential instability.</p>
<p>So let&#8217;s analyze two scenarios taken out of my own experience. I repeat: I am oversimplifying. Use this as a model.</p>
<h3>Case 1: A browser caches on disk instead of RAM.</h3>
<p>You have a system with 2 GB of RAM, out of which you have 1 GB <em>free</em> (as in &#8220;maybe used by disk cache but surely available for applications&#8221;). You fire up a web browser that caches resources on disk (because it is faster than the Internet) and needs about 300 MB of RAM.</p>
<p>1000 &#8211; 300 &#8211; 50 = 650</p>
<p>You end up with about 650 MB of RAM for disk cache optimization and 50 MB of actual free physical RAM.</p>
<p>Whenever the browser needs a network resource it tries to load it up from disk. However, disk gets cached on RAM by the OS, so subsequent reads will be read out from RAM. Performance penalty it is barely noticeable.</p>
<p>If the browser wants to cache a newly-visited website, it will save it to disk. The OS will buffer the write to RAM so it will postpone it until the system is idle (when you are reading the website). Performance penalty it is barely noticeable.</p>
<p>Whenever another application reads from disk there is a high probability of hitting the cache because there is 650 MB of RAM available for this purpose. Even if missing the cache, whatever was read from disk will be cached in RAM for subsequent reading.</p>
<p>You, then, fire up a VM that requests 450 MB of RAM. The following occurs:</p>
<ul>
<li>The operating system frees up 450 MB of disk cache. Some of it requires writing, some not. This operation is only as slow as the disk-writes required for unflushed writes, so it&#8217;s not really <em>that</em> slow. Besides, the user somewhat expects it because he just commanded the PC to load up a VM.</li>
<li>There is no swapping at all. There is no need.</li>
<li>It finally allocates 450 MB to the VM.</li>
<li>The VM writes to that physical RAM allocated for it.</li>
</ul>
<p>There is still 200 MB available for disk caching, which the OS will try to efficiently use.</p>
<p>Now, the browser wants to load something from &#8220;disk cache&#8221;. There is some probability, higher than 0 of course, of hitting the cache and the OS serving the data directly from RAM. Let&#8217;s assume not: it was read from disk. The browser is still accelerating web surfing, as the local disk is still faster than the Internet. Furthermore, the OS will cache the object on RAM for subsequent access.</p>
<p>Of course, the VM continues running from RAM without ever needing of any kind of swapping or disk trashing. The system is fully responsive. The user knows (or should know) that if it wants to free up RAM it will close the VM or the browser.</p>
<h3>Case 2: A browser uses more RAM than it should, for caching.</h3>
<p>You have a system with 2 GB of RAM, out of which you have 1 GB <em>free</em> (as in &#8220;maybe used by disk cache but surely available for applications&#8221;). You fire up a web browser that could work really nice with 300 MB of RAM but instead caches everything up for the sake of speed and ends up using 600 MB of RAM.</p>
<p>1000 &#8211; 600 &#8211; 50 = 350</p>
<p>You end up with about 350 MB of RAM for disk cache optimization and 50 MB of actual free physical RAM.</p>
<p>Whenever the browser needs a network resource it loads it up from its own RAM allocation, so it is really fast. (It still has to load it first from disk if not previously available on RAM).</p>
<p>Whenever any other application reads from disk there is a lower probability of hitting the cache. In any case, the overall probability of the other applications of hitting the cache is lower, as memory is exclusively allocated for the web browser. This significantly increases the probability of accessing disk, which may lead to slow the whole system down.</p>
<p>Minimizing the browser <em>does not</em> free memory for other applications. Memory is still being allocated for exclusive use by it.</p>
<p>You, then, fire up a VM that requests for 450 MB of RAM. The following occurs:</p>
<ul>
<li>The operating system frees up 350 MB of disk cache. Some of it requires writing, some not. This operation is only as slow as the disk-writes required, so it&#8217;s not really that slow.</li>
<li>It determines the least used 100 MB of physical RAM and moves it out to swap space. This operation is slow, as it involves a lot of unavoidable on-the-fly disk writes.</li>
<li>It finally allocates 450 MB to the VM application.</li>
<li>The VM writes to that physical RAM allocated for it.</li>
</ul>
<p>The system has no memory for disk cache anymore. Whenever other applications need to read from disk, they will miss the cache and the OS will have to physically access the disk to serve the request. This is slow. What is worse, the disk access will not be cached for subsequent reading.</p>
<p>Now, the browser wants to load something from its own &#8220;RAM cache&#8221; (which, by the way, may probably be out in swap space, now). It may happen one of two things:</p>
<p>If the RAM cache resource is on swap space, the OS will need to read it back. Since that data will be now a &#8220;more recently used&#8221; memory page, the OS might swap RAM and disk with some contents of the VM or another least-used application. This operation is slow because it requires another lot of unavoidable on-the-fly disk writes. Or:</p>
<p>If the resource is still in the application own &#8220;RAM cache&#8221;, it will be retrieved flash-fast from RAM. However, the VM still needs its own RAM to continue, and so do all other applications. This forces the operating system to swap memory again. Also, there is no RAM available for disk cache, and other applications disk requests will still served continuously from disk without the possibility of RAM caching for subsequent access. This generates constant disk activity, slowing all the system, <strong>including the browser</strong>. The browser &#8220;extra RAM cache&#8221; did no good at all.</p>
<p>Of course, the VM continues running and its RAM will continuously be needed back, so disk writing becomes a constant. The whole system slows down by what is called <em>disk trashing</em>. In really bad cases, the system may become unresponsive, restricting the user from even being able to close one of the two applications to recover the system back.</p>
<h3>Conclusions</h3>
<p>Yes, RAM is there to be used when it is needed, not wasted. RAM is a limited resource. There are ways to use RAM efficiently. For instance, loading the indexes of a mailbox in RAM (but not the whole mailbox content), if done correctly, may significantly speed up mail searching.</p>
<p>However, caching disk to RAM might not be a good idea. The caching is already done by the OS, so it is just discarding an efficient OS function by an application. Sometimes it may be a good idea but most probably, particularly in desktop applications, it is not.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.alvarezp.org/2011/07/14/the-ram-is-there-to-be-used-fallacy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sin alternativa</title>
		<link>http://blog.alvarezp.org/2009/11/06/sin-alternativa/</link>
		<comments>http://blog.alvarezp.org/2009/11/06/sin-alternativa/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 17:54:48 +0000</pubDate>
		<dc:creator>alvarezp</dc:creator>
				<category><![CDATA[Anécdota]]></category>
		<category><![CDATA[Opera browser]]></category>
		<category><![CDATA[Tenía que ser un geek.]]></category>

		<guid isPermaLink="false">http://blog.alvarezp.org/?p=835</guid>
		<description><![CDATA[Estaba revisando mi correo electrónico y quise mover un mensaje de una carpeta IMAP a otra en Opera, cuando de pronto:

El texto dice:
Uno o más de los mensajes seleccionados no tienen el cuerpo descargado localmente, ¿Desea que Opera descargue los cuerpos faltantes antes de la exportación (sumamente recomendado)?
:-D
]]></description>
			<content:encoded><![CDATA[<p>Estaba revisando mi correo electrónico y quise mover un mensaje de una carpeta IMAP a otra en Opera, cuando de pronto:</p>
<p><a href="http://blog.alvarezp.org/wp-content/uploads/2009/11/opera.png"><img src="http://blog.alvarezp.org/wp-content/uploads/2009/11/opera.png" alt="sin-alternativas" title="sin-alternativas" width="440" height="171" class="aligncenter size-full wp-image-836" /></a></p>
<p>El texto dice:</p>
<blockquote><p>Uno o más de los mensajes seleccionados no tienen el cuerpo descargado localmente, ¿Desea que Opera descargue los cuerpos faltantes antes de la exportación (sumamente recomendado)?</p></blockquote>
<p>:-D</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.alvarezp.org/2009/11/06/sin-alternativa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Opera and mysterious font aliasing problem in Ubuntu and Debian</title>
		<link>http://blog.alvarezp.org/2009/09/20/opera-and-mysterious-font-aliasing-in-ubuntu-and-debian/</link>
		<comments>http://blog.alvarezp.org/2009/09/20/opera-and-mysterious-font-aliasing-in-ubuntu-and-debian/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 05:04:43 +0000</pubDate>
		<dc:creator>alvarezp</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Diseño web]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Opera browser]]></category>
		<category><![CDATA[Planet Gultij]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blog.alvarezp.org/?p=517</guid>
		<description><![CDATA[Opera renders text without antialiasing under Ubuntu and Debian when a value in the font-family CSS property matches a &#8220;Core X&#8221; font before an Xft font.
That&#8217;s why Opera can be set to ignore core X fonts, by unchecking the Enable Core X fonts configuration option. You can use this as a workaround.
So, the result of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Opera_(web_browser)">Opera</a> renders text without <a href="http://en.wikipedia.org/wiki/Antialiasing">antialiasing</a> under Ubuntu and Debian when a value in the <a href="http://www.w3.org/TR/CSS2/fonts.html#font-family-prop">font-family</a> CSS property matches a &#8220;Core <a href="http://en.wikipedia.org/wiki/X_Window_System">X</a>&#8221; font before an <a href="http://en.wikipedia.org/wiki/Xft">Xft</a> font.</p>
<p>That&#8217;s why Opera can be set to ignore core X fonts, by unchecking the <a href="opera:config#UserPrefs|EnableCoreXFonts">Enable Core X fonts</a> configuration option. You can use this as a workaround.</p>
<p><span id="more-517"></span>So, the result of having this option enabled can be compared in the following images. The first image shows the rendering when the <code>font-family: "Deja Vu Sans", sans-serif</code> directive is used. The second image shows the same page when the &#8220;Deja Vu Sans&#8221; option is removed from the directive. In this second case, Opera renders the text using the &#8220;sans-serif&#8221; font, whatever it matches.</p>
<p style="text-align: center">
<img style="padding: 5px; margin: 10px; border: 1px solid black" src="http://blog.alvarezp.org/imagenes/opera-antialias/aliased.png"/><br />
<img style="padding: 5px; margin: 10px; border: 1px solid black" src="http://blog.alvarezp.org/imagenes/opera-antialias/antialiased.png"/>
</p>
<p>Seen from a different perpective, it appears to be that when Opera asks X for a font, X returns an antialised core font. Does this happen on other distributions too?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.alvarezp.org/2009/09/20/opera-and-mysterious-font-aliasing-in-ubuntu-and-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making Opera work with Cisco Secure ACS 4.1.</title>
		<link>http://blog.alvarezp.org/2009/09/18/making-opera-work-with-cisco-secure-acs-41/</link>
		<comments>http://blog.alvarezp.org/2009/09/18/making-opera-work-with-cisco-secure-acs-41/#comments</comments>
		<pubDate>Sat, 19 Sep 2009 06:25:18 +0000</pubDate>
		<dc:creator>alvarezp</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Opera browser]]></category>
		<category><![CDATA[Planet Gultij]]></category>

		<guid isPermaLink="false">http://blog.alvarezp.org/?p=649</guid>
		<description><![CDATA[This post should be called instead &#8220;Making Opera work around a Cisco Secure ACS 4.1 interoperability bug&#8221;.
Continuing with the stream of web browser interoperability issues I recently found how to make Opera 10 work with a Cisco Secure Access Control Server 4.1.
The problem I experienced is briefly described as, clicking any option in the menu [...]]]></description>
			<content:encoded><![CDATA[<p>This post should be called instead &#8220;Making Opera work around a Cisco Secure ACS 4.1 interoperability bug&#8221;.</p>
<p>Continuing with the stream of web browser interoperability issues I recently found how to make <a href="http://www.opera.com/browser/features/">Opera 10</a> work with a <a href="http://www.cisco.com/">Cisco</a> <a href="http://www.cisco.com/en/US/products/sw/secursw/ps2086/">Secure Access Control Server</a> 4.1.</p>
<p>The problem I experienced is briefly described as, clicking any option in the menu (in the left frame) will open the menu again in the right frame, instead of actually showing the selected option.</p>
<p><span id="more-649"></span>The answer is simple: set Opera to identify as <a href="http://www.mozilla.com/en-US/firefox/features/">Firefox</a> for that domain or IP. This is located under Tools » Preferences » Advanced » Content » Manage Site Preferences. Add the site and under Network, change &#8220;Browser identification&#8221; to &#8220;Identify as Firefox&#8221;.</p>
<p><a href="http://blog.alvarezp.org/wp-content/uploads/2009/09/opera-cisco-acs-image.png"><img src="http://blog.alvarezp.org/wp-content/uploads/2009/09/opera-cisco-acs-image.png" alt="opera-cisco-acs-image" title="opera-cisco-acs-image" class="aligncenter size-full wp-image-652" style="max-width: 100%" /></a></p>
<p>Here are the screenshots. Click on them.</p>
<div id="attachment_656" class="wp-caption alignleft" style="width: 310px"><a href="http://blog.alvarezp.org/wp-content/uploads/2009/09/opera-cisco-acs.png"><img src="http://blog.alvarezp.org/wp-content/uploads/2009/09/opera-cisco-acs-300x217.png" alt="Opera identified as such." title="opera-cisco-acs" width="300" height="217" class="size-medium wp-image-656" /></a><p class="wp-caption-text">Opera identified as such.</p></div>
<div id="attachment_658" class="wp-caption alignleft" style="width: 310px"><a href="http://blog.alvarezp.org/wp-content/uploads/2009/09/opera-cisco-acs-2.png"><img src="http://blog.alvarezp.org/wp-content/uploads/2009/09/opera-cisco-acs-2-300x217.png" alt="Opera identified as Firefox." title="opera-cisco-acs-2" width="300" height="217" class="size-medium wp-image-658" /></a><p class="wp-caption-text">Opera identified as Firefox.</p></div>
<p style="clear: both">
<p>The analysis narrows down to this code in the menu:</p>
<pre class="code">// unfortunately the Object model in IE doesn't match the Netscape one so we have to check the browser...
if( "Netscape" == navigator.appName )
{
	obj.href=sequence_url;
}
else
{
	ua=navigator.userAgent;
	v=navigator.appVersion.substring(0,1);
	if ((ua.lastIndexOf("MSIE")!=-1) &#038;&#038; (v!='1') &#038;&#038; (v!='2') &#038;&#038; (v!='3'))
	{
		// MSIE 4.0 and later.
		obj.href=sequence_url;
	}
	else
	{
		parent.parent.R.location=sequence_url;
	}
}

(some code snipped)

&lt;A HREF="" TARGET=R onClick="getURL( this , 'setup.exe?action=make_r_fs&#038;option=users' )" >
&lt;IMG SRC="images/cisco_buttons/user-up.gif" BORDER=1 ALT="User Setup">&lt;/A>
</pre>
<p>So Cisco is actually trying to detect the UA, but instead of assuming a standards-complaint browser and applying special fixes for IE, it assumes IE and applies a special fix for Mozilla (Netscape).</p>
<p>That&#8217;s why changing the identifier for that site actually works. Now the JavaScript code correctly detects the UA and performs the correct action of loading the page in the &#8220;R&#8221; frame.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.alvarezp.org/2009/09/18/making-opera-work-with-cisco-secure-acs-41/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

