<?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>Linux~ized &#187; script</title>
	<atom:link href="http://www.linuxized.com/tag/script/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.linuxized.com</link>
	<description>wired&#039;s /dev/urandom space</description>
	<lastBuildDate>Tue, 19 Apr 2011 18:56:50 +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>speeding up firefox with tmpfs and automatic rsync</title>
		<link>http://www.linuxized.com/2009/05/speeding-up-firefox-with-tmpfs-and-automatic-rsync/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://www.linuxized.com/2009/05/speeding-up-firefox-with-tmpfs-and-automatic-rsync/#comments</comments>
		<pubDate>Tue, 12 May 2009 15:46:22 +0000</pubDate>
		<dc:creator>wired</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[speed]]></category>
		<category><![CDATA[speeding up]]></category>
		<category><![CDATA[tmpfs]]></category>

		<guid isPermaLink="false">http://www.linuxized.com/?p=63</guid>
		<description><![CDATA[Comzeradd posted a great article recently on how to speed up firefox by moving your ~/.mozilla folder on a tmpfs mount. As you probably know, firefox keeps track of everything you visit while you browse the web infinity, then allows you to quick-search that history just by typing in its awesome bar &#8211;err, address bar [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://autoverse.net/identity/" target="_blank">Comzeradd</a> posted <a href="http://autoverse.net/blog/2009/apr/23/speed-firefox/" target="_blank">a great article</a> recently on how to speed up firefox by moving your <strong>~/.mozilla</strong> folder on a <strong>tmpfs</strong> mount.</p>
<p>As you probably know, firefox keeps track of everything you visit while you browse the web infinity, then allows you to quick-search that history just by typing in its awesome bar &#8211;err, address bar <img src='http://www.linuxized.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Unfortunately, after a while the whole thing slows down and gets a bit annoying. So what <a href="http://autoverse.net/identity/" target="_blank">Comzeradd</a> tried was to move <strong>~/.mozilla</strong> (which includes the history database) on a <strong>tmpfs</strong> mount.</p>
<p><strong>The difference is staggering! </strong>Searches are snappy again and even firefox itself feels faster!</p>
<p><a href="http://autoverse.net/identity/" target="_blank">Comzeradd</a> offers a script that syncs your <strong>tmpfs ~/.mozilla</strong> with a folder on your hdd to make sure you won&#8217;t lose your data on reboot/shutdown/powerfail.</p>
<p>I took this a step further by creating a <a title="speedfox" href="http://www.linuxized.com/wp-content/uploads/2009/05/speedfox#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed" target="_blank">firefox wrapper script</a>. After you move your <strong>~/.mozilla</strong> folder to a safe place, this script makes sure that your data is always synced between the <strong>tmpfs</strong> folder and your hdd folder on a fixed interval.</p>
<p><strong>what the script does, in steps:</strong></p>
<ol>
<li>check that we don&#8217;t have any stale <strong>~/.mozilla</strong> folder</li>
<li>rsync our hdd copy of .mozilla with our tmpfs</li>
<li>launch a background process that syncs any changes on the tmpfs .mozilla folder back to our hdd copy every one minute (adjustable)</li>
<li>launch firefox</li>
<li>when firefox ends, kill background process and sync back to the hdd one last time</li>
</ol>
<p>To use <a href="http://www.linuxized.com/wp-content/uploads/2009/05/speedfox#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed" target="_blank">the script</a>, you&#8217;ll first need to mount tmpfs to a folder. On my laptop I have my /var/tmp as tmpfs (useful for gentoo emerges too). To make /var/tmp a tmpfs folder, you need to edit your /etc/fstab file and add the following line:</p>
<blockquote><p><code>tmpfsÂ Â Â Â  Â Â Â  Â Â Â  Â /var/tmpÂ Â  Â tmpfsÂ  size=768M,mode=0777Â Â Â Â Â Â Â Â  0 0</code></p></blockquote>
<p>You should adjust the <strong>size= </strong>option based on the ram you have available.</p>
<p>Then just <strong>mount</strong> the &#8220;partition&#8221; with:</p>
<blockquote><p><code>mount /var/tmp</code></p></blockquote>
<p>and <strong>execute</strong> the script</p>
<blockquote><p>chmod +x speedfox</p>
<p><code>speedfox</code></p></blockquote>
<p><strong>Thats it</strong>! This simple process gives firefox a real boost!</p>
<p>If you start speedfox from a terminal, you can see the rsync info at the beginning and after each minute =]</p>
<p>You can <a title="speedfox" href="http://www.linuxized.com/wp-content/uploads/2009/05/speedfox#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed" target="_blank">get the script here.</a></p>
<p>Don&#8217;t forget to edit it, read the instructions and configure its variables!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxized.com/2009/05/speeding-up-firefox-with-tmpfs-and-automatic-rsync/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
	</channel>
</rss>

