Posted by Mathieu Jobin
Thu, 23 Aug 2007 09:40:52 GMT | no comments
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.
Posted in Tech / Computers / Programming, Gentoo, English
Posted by Mathieu Jobin
Fri, 17 Nov 2006 15:28:42 GMT | no comments
If you are like me, you like system that works and you care much more about the latest version of KDE than the latest version of XOrg. especially when updating KDE is pain-less and bug-free while XOrg means talking with God, backup-ing your Mother and what not.
So I wanted to be able to run
emerge -avUNt world
like everyone else, while staying on XOrg 6.9
Like you might know, the recent portage are not forcing us to do the update. you cannot run 'emerge world' without upgrading. and upgrading is far from being easy. While preventing portage from forcing is not as easy as it sound. It is not that hard. thanks to /etc/portage system.
here is how to do it.
- first add the following lines in /etc/portage/package.mask
### I dont want to update X
>=x11-base/xorg-x11-7.0
>=app-doc/doxygen-1.4.5
>=media-gfx/imagemagick-6.2.5.6
>=x11-libs/qt-4.1.4-r1
>=media-gfx/graphviz-1.16-r2
>=app-office/openoffice-bin-2.0.3
>=media-libs/libsdl-1.2.8-r2
x11-libs/libXScrnSaver
### END
- then add the following line in /etc/portage/package.unmask
<x11-base/xorg-x11-7.0
after that you might get 1 or 2 more problem. I remember I also had to modify an ebuild and remove a useless dependency on a package. if it does not work for you. please comment below. I'm gonna help you to go through it and I'll update this post for a more accurate information.
have a nice day.
Posted in Tech / Computers / Programming, Linux, Gentoo, English
Posted by Mathieu Jobin
Sat, 12 Aug 2006 07:35:00 GMT | no comments
Maybe some of you have tried the excellent Enlightenment 17. Although still under heavy development, its definitly worth the look. Luckily for us gentoo user, there is ebuilds already done which makes the compiling task easy. Still, when is time to upgrade, it's a not all automatic. The problem is; all packages keeps de same version (9999 for development). So, if you re-emerge e, it will not re-emerge all the dependencies, because they are already installed and the version number has NOT changed. So You have to check all the dependencies and make sure to re-emerge them all, in order. its a bit of a pain in the butt when you just want to see the latest development the team has made. So I wrote a script to make it even easier. I wrote it few months ago while I was doing it by hand. and Few days ago, I thought I might upgrade E17 again and check it out. so I tried out my script which worked with not too many bug fixes ;) hehe.
click more for the script and to send comments
Read more...
Posted in Tech / Computers / Programming, Linux, Gentoo, English