optimize Gentoo with tmpfs

Today has been a very rewarding day for finding interesting articles. Apart from the articles that I will mentioned in my next article here is one for my readers who runs the Gentoo operating system.

http://apcmag.com/6636/Gentoo tip for the love of tmpfs

Basically the idea is to mount a virtual file-system over the directory that stores temporary files used during compilation of new software (/var/tmp/portage). As most you you might know, Gentoo includes a system that automatically compile and install software for you. The great part is that it is very easy to use, the down part however is that it sometimes takes hours to install a certain software. The Hard Drive being the slowest part in the equation has just to be removed.

To try it out simply add this line to your /etc/fstab file and mount it as root or reboot.

none /var/tmp/portage tmpfs size=212M,nr_inodes=1M 0 0

You might also want to kill the content for the directory before, as it most probably contains lost of useless data which would then be hidden behind the mount.

rm -fr /var/tmp/portage ; mkdir /var/tmp/portage

Now the guy in the article use a 1412M sized tmpfs virtual partition on a 2G of RAM system. I really wonder how this would work on a 512MB RAM system. It might just swap all the time removing the whole idea. So I'm not sure this tricks helps people who really needs help. (the people with regular hardware)

What I really would like to understand is how the tmpfs kernel module know when to delete or not a file from the memory. I'd be afraid that it kills some .o out of the memory before the full compilation comes to an end. Or that it keeps all these temporary files in memory for hours after the compilation is done. I'd like to understand the magic.

For more Linux related article, checkout their Kernel Knowledge page

Update: Then later I found in the comment it is useless to add an extra tmpfs as Gentoo always have one enabled.

And I Quote .... "You can always do this by using the existing tmpfs, /dev/shm. /dev/shm will allocate up to 1/2 of your system RAM for tmpfs and it should already exist. To use it change/add the following three lines to your gentoo /etc/make.conf file:"

PORTAGE_TMPFS="/dev/shm"
PORTAGE_TMPDIR="/dev/shm"
BUILD_PREFIX="/dev/shm"

Good luck in your trials. And please post comments on your experimentations.

Tags , , , , , , ,

Posted in , , | Posted on 23 Aug 2007 02:38by somekool | 4 comments

My new KDE desktop

I changed my KDE desktop feels, I like it so much better :) And feel much more productive since then. it's been about a month now. and I totally love it.

I got rid of everything, make it simpler looking and giving me more screen space.

1 - kickerkicker is too large and takes too much of my desktop space for things I don't need that often. making kicker smaller bugs me even more. because than I miss kicker space to put my favorite applets. some applets are annoying in their small version. but some applets are worse when kicker is vertically positioned.solution ? getting rid of it. hard. with so many programs using the systray. I can't really. Hide it ? I always hated auto-hide, but still worth the try. And I made it so its fine. I wanted hidden, easily accessible but not over-annoying like hitting a edge by accident would raise it. The top-right corner of the screen is busy for the close button. so I choose the top-left corner of the screen as a hotcorner to raise the kicker. I moved the systrays icons to the left, because systray icons are really the most important reason why I still need kicker. And I don't want to ride my mouse from the top-left corner to my systray at the other end. so I then reordered all my applets by how often I am accessing them. putting the clock on the full right as I am not clicking on it very often. the K menu that I use maybe once a month. and the Garbage not so far as I am trying it out but so far, not appealing enough.2 - desktop icons.actually I like them, I press F11 to show my desktop and I use them very often. but recently I've been hitting on a bug that makes my desktop and kwin crash when I use the context menu of a desktop icon. and I don't like when it happens and I can't wait for the bug to be fixed. so I removed desktop icons. its nice to see my desktop backgrounds without a mess of icons on it.3 - task switcher.I use kompose, with a hotcorner on the bottom-right and F9/F10 hotkeys. its perfect. I'm also ALT-TAB addict but I like using kompose a lot.4 - flaws ?only one so far, I don't get changes notification from kwin. so I need to close kopete window or else I forget to answer my friends. its a big problem I'm trying to deal with. if you got any idea. I wish kompose could wake me up ;)4a - changes notification systemand two more requests: 4b - get the trash applet a better tooltip, 4c - titlebar buttons are just a 22 years old technlogy.got solutions or comments for me ? my ears are wide open.

Tags , , , , , , , , , , , , , ,

Posted in , , , , | Posted on 04 May 2006 09:39by somekool | no comments

Subscribe

Personal Links

Tags

Categories

Archives

my Xbox 360 gamertag

my last twitter posts

Copyright © Mathieu Jobin's Life and Thoughts

Tech Blue designed by Hive Designs • Ported by Free WordPress Themes and Frédéric de Villamil Powered by Typo