2.11 System optimization

Faster bootup

Calculate Linux boots up using OpenRC. After the binary profiles were introduced, but thanks to numerous optimizations as well, system performance has much improved, and the bootup is considerably faster. OpenRC support parallel boot; it is now enabled by default in the /etc/rc.conf file:

rc_parallel="YES" 

Applications launching faster

prelink is a tool used to prelink binaries. It comes with all Calculate Linux distributions. Since CLD/CLDX 9.9, prelink has been added to cron tasks and thus runs on schedule. Edit the /etc/conf.d/prelink file to toggle this behavior:

PRELINKING="yes" 

Preload

Beginning with version 9.9, Calculate Linux Desktop includes the preload utility. The preload daemon starts at the boot runlevel and constantly analyses how frequently your applications are run while you are working on your computer. Then it caches any necessary applications and libraries; please note that it will take some time to see the result.

Due to the fact that preload uses disk cache, never stopping it does not make your system unavailable. Moreover, it not only makes applications launch faster, but also speeds up the bootup, somewhat as in parallel computing.

Improving system performance

Calculate Linux distributions are built with compiler flags allowing to run the system on all 32bit and 64bit compatible processors. You can adjust these settings, thus improving performance for new packages: just uncomment the CFLAGS and CXXFLAGS lines in your /etc/make.conf file:

CFLAGS="-O2 -march=native -pipe" 
CXXFLAGS="${CFLAGS}" 

You should rebuild the whole system now to get the best of your optimization:

emerge -e system
emerge -e world

Be careful, rebuilding all packages may require a certain experience, specifically to resolve possible compilation conflicts. Every package will be fetched and recompiled. Allow at least 5 hours min for the whole procedure, though how much time it takes depends on your distribution and hardware configuration.

Reducing the distribution size

Remove unnecessary languages

Calculate Linux has inbuilt support for several languages. However, you can leave just the one(s) you need, once you have your system running.

To do so, append the LINGUAS line to your /etc/make.conf, as shown below:

LINGUAS="en fr" 

Now update your system so that it gets rid of unused language files. Numerous packages will be rebuilt in the process. Take notice that, if you actually specify the locale in /etc/make.conf, all localized packages will never come as binaries again, you will always have to compile them as long as this option is set on.

Free some space

If you are building a customized system with binary updates from your own repository only, you can significantly reduce the size of your LiveCD image by removing the kernel sources, the Portage tree, and perhaps even the gcc compiler.

That's how much space you gain if you remove:
  • ...the Portage tree: 35МB of image data and 513MB after installation.
  • ...the kernel sources: 76МB of image data and 367MB after installation.
Thank you!