Quick setup own distcc farm

When I migrated to Gentoo, I have realised how easy can be compiling from the sources. We have faster computers, couple of cores in one processor. Seems to compiling everything from scratch shouldn’t be difficult. But how we can speed up this process. If you poses some unused PCs, laptops and you could use them for the moment, you can create computer farm for the tool called distccd. Ok but you can say there is a Windows or no system. It doesn’t matter. If there is a network adapter and computer is bootable from pendrive/cdrom, that’s everything what you need. The knowledge about clouds, matrix or clustering is unnecessary. I will try to explain how to easy create own distcc-livecd image.

Distcc

As we can read on official website, distcc is a program to distribute builds of C, C++, Objective C or Objective C++ code across several machines on a network. Distcc should always generate the same results as a local build, is simple to install and use, and is usually faster than a local compile. Configuration is also written well on that website and better in the Gentoo context we may find on Gentoo Distcc Documentation

Calculate Linux

Calculate linux is one of the distributions created on top of Gentoo. We can use portage and the same tools. This distro can be downloaded in few different versions:

Continue reading

Advertisements

how to autoload modules

I installed zen kernel and some key modules stopped load automatically. I was frustrating to load every time from command line. There is very easy way for autoloading.

Create dir:

lenovo greg # mkdir /etc/modules.autoload.d

add file there and inside write module names in order you want to load…

lenovo modules.autoload.d # vi vmlinuz-2.6

thats all!

NTFS(3g) under linux

I have external HD, unfortunately files should be available also for Windows users, so I had to create ntfs partition. How does it work under my Gentoo? There is general problem that is impossible to create new files and folders even you have read/write support enabled in kernel.

On my laptop I got warnings like:

[ 1869.202693] NTFS-fs warning (device sdb1): parse_options(): Option utf8 is no longer supported, using option nls=utf8. Please use option nls=utf8 in the future and make sure utf8 is compiled either as a module or into the kernel.

To solve this problem helps ntfs3g:

lenovo / # emerge -av ntfs3g

lenovo / # ln -s mount.ntfs-3g mount.ntfs

Now you can connect your external HD over usb. Write mode should be fully enabled.

Please use more RAM then swap…

As we can read on http://kerneltrap.org: “Swappiness is a kernel “knob” (located in /proc/sys/vm/swappiness) used to tweak how much the kernel favors swap over RAM; high swappiness means the kernel will swap out a lot, and low swappiness means the kernel will try not to use swap space.”
Less swap usage = less I/O operations = higher performance. Of course it has some limits. In order to set it we need to edit /etc/sysctl.conf and add value:
vm.swappiness=30
vm.swappiness can be set from 0..100 where less value means use less swap but more RAM. By default the most of distros set 60. You can check current value by:
lenovo init.d # sysctl vm.swappiness
vm.swappiness = 30

More accurate articles we can find here:
http://www.linuxvox.com/2009/10/what-is-the-linux-kernel-parameter-vm-swappiness/
http://lwn.net/Articles/100978/