1. Home
  2. Computing & Technology
  3. Linux

From

    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 most needs. Even if some rare command options are not implemented, even an experienced Unix user hardly makes the difference with GNU commands!

  • Kernel: If your needs are fitted with an older kernel version, you can save some space.

    However, with old kernels, you will miss cool features (such as real-time preemption, making your system much more responsive) and support for recent peripherals. It is true that the Linux kernel accumulated bloat over the years: more features, support for more special cases... Now that Linux is taking an increasingly dominant place in embedded systems, work is being done to control the kernel size. The LinuxTiny project releases a set of patches to the Linux kernel sources. In the Configure Standard Kernel Features for Small Systems kernel configuration section, you can unselect features you do not need in a simple computer. The minimum compressed size you can achieve for a Linux 2.6 kernel for a simple PC is approximately 350 KB. Note that more and more LinuxTiny changes are now available in the standard Linux kernel (no patching necessary).

    With the latest kernel releases, you may also try the real-time preemption patches from Ingo Molnar. When full preemption is enabled, it adds

Explore Linux
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

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

  1. Home
  2. Computing & Technology
  3. Linux

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

All rights reserved.