<?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>Felipe Barriga Richards &#187; FreeNET</title>
	<atom:link href="http://blog.felipebarriga.cl/tag/freenet/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.felipebarriga.cl</link>
	<description>Blog personal de Felipe Barriga Richards</description>
	<lastBuildDate>Sat, 17 Jul 2010 23:52:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Speedup FreeNET Startup (entropy)</title>
		<link>http://blog.felipebarriga.cl/privacidad/speedup-freenet-startup-entropy/</link>
		<comments>http://blog.felipebarriga.cl/privacidad/speedup-freenet-startup-entropy/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 17:08:04 +0000</pubDate>
		<dc:creator>fbarriga</dc:creator>
				<category><![CDATA[Privacidad]]></category>
		<category><![CDATA[FreeNET]]></category>

		<guid isPermaLink="false">http://blog.felipebarriga.cl/?p=155</guid>
		<description><![CDATA[FreeNET needs some good random data to startup. When the node start it can take some time getting this data and this message is going to appear: Freenet is starting up Not enough entropy is available! There isn&#8217;t enough entropy available on your system&#8230; Freenet won&#8217;t start until it can gather enough. To avoid this [...]]]></description>
			<content:encoded><![CDATA[<p>FreeNET needs some good random data to startup.<br />
When the node start it can take some time getting this data and this message is going to appear:<br />
<center><br />
<strong><br />
Freenet is starting up<br />
Not enough entropy is available!<br />
There isn&#8217;t enough entropy available on your system&#8230; Freenet won&#8217;t start until it can gather enough.<br />
</strong><br />
</center><br />
<span id="more-155"></span><br />
To avoid this or speedup the process you can generate some <a href="http://en.wikipedia.org/wiki/Entropy_%28computing%29">entropy</a> doing some random hard disk drive seeks. You can use <a href="http://www.linuxinsight.com/files/seeker.c">this little program</a> to do that (and also <a href="http://www.linuxinsight.com/how_fast_is_your_disk.html">know the average random seek of your hard disk drive</a>):</p>

<div class="wp-terminal">user@computer:$ wget http://www.linuxinsight.com/files/seeker.c<br/></div>


<div class="wp-terminal">user@computer:$ gcc -O3 seeker.c -o seeker<br/></div>


<div class="wp-terminal">user@computer:$ sudo ./seeker /dev/sda<br/>Benchmarking /dev/sda [238475MB], wait 30 seconds.............................<br/>Results: 54 seeks/second, 18.46 ms random access time<br/></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.felipebarriga.cl/privacidad/speedup-freenet-startup-entropy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speedup FreeNET on SunOS/Solaris/BSD/Linux</title>
		<link>http://blog.felipebarriga.cl/privacidad/speedup-freenet-on-sunossolarisbsdlinux/</link>
		<comments>http://blog.felipebarriga.cl/privacidad/speedup-freenet-on-sunossolarisbsdlinux/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 16:40:53 +0000</pubDate>
		<dc:creator>fbarriga</dc:creator>
				<category><![CDATA[Privacidad]]></category>
		<category><![CDATA[FreeNET]]></category>

		<guid isPermaLink="false">http://blog.felipebarriga.cl/?p=143</guid>
		<description><![CDATA[If you have used FreeNET you can notice that if you have to many persistent downloads (~ more than 500) your CPU is going to get very busy. That happens because node.db4o (the file where persistent downloads queue are stored) is updated extremely frequently. On every update the cache of this file is flushed to [...]]]></description>
			<content:encoded><![CDATA[<p>If you have used <a href="http://freenetproject.org/">FreeNET</a> you can notice that if you have to many persistent downloads (~ more than 500) your CPU is going to get very busy. That happens because <strong>node.db4o</strong> (the file where persistent downloads queue are stored) is updated extremely frequently. On every update the cache of this file is flushed to filesystem making a process delay (waiting I/O).<br />
A little trick to avoid this is to install <a href="http://freenetproject.org/">FreeNET</a> then move it to a RAM memory Filesystem (<a href="http://en.wikipedia.org/wiki/Tmpfs">tmpfs</a>) so the file updates are not going to slow down the process (wait I/O caused by random writes).</p>
<p>To create the RAM filesystem you need to execute:<br />
<span id="more-143"></span></p>

<div class="wp-terminal">user@computer:$ sudo mkdir /tmpfs<br/></div>


<div class="wp-terminal">user@computer:$ sudo mount tmpfs -o size=2g,uid=user,gid=user_group,mode=755 -t tmpfs /tmpfs<br/></div>

<p>Then you can check if all is ok:</p>

<div class="wp-terminal">user@computer:$ df -h | grep \/tmpfs<br/>tmpfs                 2.0G  344M  1.7G  17% /tmpfs<br/></div>

<p>Now copy the FreeNET files to this filesystem:</p>

<div class="wp-terminal">user@computer:$ mkdir /tmpfs/FreeNET<br/></div>


<div class="wp-terminal">user@computer:$ cp -Rf ~/freenet_installation/* /tmpfs/FreeNET<br/></div>

<p>The <strong>datastore</strong> and <strong>persistent-temp-XXXX</strong> (replace XXXXX with the corresponding number) directories usually grows a lot so you need to put somewhere else and make the symbolic links:</p>

<div class="wp-terminal">user@computer:$ cd /tmpfs/FreeNET<br/></div>


<div class="wp-terminal">user@computer:$ ln -s ~/freenet_data/datastore .<br/></div>


<div class="wp-terminal">user@computer:$ ln -s ~/freenet_data/persistent-temp-XXXX .<br/></div>

<p><em>Note: Is a good idea to put that directories in a <a href="http://en.wikipedia.org/wiki/RAID_0#RAID_0">RAID-0</a> block device.<br />
</em></p>
<p>Now you are ready to take advantages of using tmpfs.<br />
To avoid some steps you can write an small script and/or put the creation of <strong>/tmpfs</strong> on <strong>/etc/fstab</strong>:</p>

<div class="wp-terminal">user@computer:$ echo "tmpfs /tmpfs  tmpfs size=2g,uid=user,gid=user_group,mode=755  0  0" >> /etc/fstab<br/></div>

<p>Also you may want to disable logger because it generate some I/O. Edit <strong>freenet.ini</strong>:</p>

<div class="wp-terminal">user@computer:$ echo "logger.enabled=false" >> freenet.ini<br/></div>

<p><strong>Remember to backup and then restore /tmpfs/FreeNET on every shutdown/boot !</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.felipebarriga.cl/privacidad/speedup-freenet-on-sunossolarisbsdlinux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
