1. Home
  2. Computing & Technology
  3. Linux

From Authors, for About.com

    with a signature at the end.

  • Clean Temporary Files: , e.g. /tmp , there is even a tool tmpwatch .

  • Shorten the Log Files: usually the files in /var/log . There are some nice helpers for this task around, e.g. savelog .

  • Remove Files: Remove files which are not "necessary" under all circumstances such as man pages, documentation /usr/doc and sources e.g. /usr/src .

  • Unnecessary Libraries: You may use the binstats package to find unused libraries (Thanks to Tom Ed White).

  • Filesystem: Choose a filesystem which treats disk space economically e.g. rsfs aka Reiser Filesystem. Tune your filesystem e.g. tune2fs . Choose an appropriate partition and block size.

  • Reduce Kernel Size: Either by using only the necessary kernel features and/or making a compressed kernel image bzImage .

  • Compressed read-write filesystems:

    - There was a project to add compression support to ext2 filesystems: e2compr . This project has a very limited usefulness as it is currently inactive and only supports very old 2.4 and 2.6 kernel versions. No chance to get a working patch on the latest 2.4 and 2.6 releases.

    - Fortunately, a very serious solution exists in the Reiser4 filesystem which includes a compression plugin. Using compression is even reported to be faster than not using it. Actual results should of course vary with the CPU and disk speed, and results might be disappointing on old machines. See how to use Reiser4 . This filesystem is supported on all recent kernel versions, and merging with mainstream is their top priority.

  • Compressed read-only filesystems

    - The idea is store parts of the system (typically executables and libraries through the /bin , /sbin and /usr directories) in a separate, compressed and read-only filesystem. This is great for saving space and for protecting the system from extern attacks. However, the constraint is that software upgrades can no longer be done when the filesystem is mounted. The whole filesystem contents must be rebuilt and replaced at once.

    - CramFS was the first implemented solution, used by many embedded system makers. Though still maintained, it is dramatically outperformed by SquashFS.

    - SquashFS is the solution everyone should use now. Unlike CramFS, it has no limitations on filesystem and file size, and it achieves much better compression and read speed (up to 5 times!). On slow storage (like USB flash drives), replacing ext2 with SquashFS resulting in a 50% reduction on system boot time (observed in a Linux demo developped by Free Electrons ).

  • Partition Sharing: You may share swap-space (see Swap-Space-HOWTO) or data partitions between different OS (see mount ).

  • C library: use uClibc instead of the default GNU C library aka glibc . It takes approximately 400 KB instead of 1700 (glibc). It used by many embedded Linux projects as well as by several tiny Linux distributions. It should satisfy most needs, as the whole Debian 3.0 was ported to it. Caution: if you replace the C library, all applications also need to be recompiled with a dedicated gcc toolchain.

  • Busybox - A toolbox implementing most Unix commands. It takes at most 500 KB instead of approximately 10-30 MB with GNU implementations! It is used by almost all embedded Linux projects and small Linux distros. Most commands are implemented, even vi , wget , a dhcp server and client, and even a http server sufficient for

Explore Linux
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Linux

©2009 About.com, a part of The New York Times Company.

All rights reserved.