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 filesystem making a process delay (waiting I/O).
A little trick to avoid this is to install FreeNET then move it to a RAM memory Filesystem (tmpfs) so the file updates are not going to slow down the process (wait I/O caused by random writes).
To create the RAM filesystem you need to execute:
Then you can check if all is ok:
tmpfs 2.0G 344M 1.7G 17% /tmpfs
Now copy the FreeNET files to this filesystem:
The datastore and persistent-temp-XXXX (replace XXXXX with the corresponding number) directories usually grows a lot so you need to put somewhere else and make the symbolic links:
Note: Is a good idea to put that directories in a RAID-0 block device.
Now you are ready to take advantages of using tmpfs.
To avoid some steps you can write an small script and/or put the creation of /tmpfs on /etc/fstab:
Also you may want to disable logger because it generate some I/O. Edit freenet.ini:
Remember to backup and then restore /tmpfs/FreeNET on every shutdown/boot !
0 Comments until now
Add your Comment!