RSS Feed for This Post

Reduce your Linux memory footprint


rfid news

A lack of physical memory can severely hamper Linux® performance. In this article, learn how to accurately measure the amount of memory your Linux system uses. You also get practical advice on reducing your memory requirements using an Ubuntu system as an example.

A much-touted benefit of Linux is that it is more efficient than Microsoft® Windows®, and will therefore perform better on less than cutting-edge hardware. This performance makes Linux a very attractive upgrade for the many people who have old Windows 98-era boxes still sitting around that are no longer being treated to the latest and greatest software (particularly security patches).

The truth of the matter, however, is that while the Linux kernel can still be configured to be reasonably small and efficient, as new computers have increased in power, many Linux desktop environments (such as KDE and GNOME) have added lots of features. Consequently, the default install of most distributions offer a less than stellar level of performance when installed on older hardware. The same is true of many modern applications also — Web browsers such as Firefox and office suites such as OpenOffice are fully featured, but trying to run them on a machine with 128MB of RAM can be a painful experience!

So what is the answer? Throw away all of your old hardware and upgrade? Install a Linux distribution from circa 1995? (If you decide to go that route, I recall having a good experience with Linux-FT.)

Never fear: as those in the Linux community have known for years, a great strength (some would say the great strength) of the Linux kernel and Linux distributions in general lies in their ability to be customized. This article delves into how you can tailor your Linux systems for better performance on modest hardware.

Thanks for the memory

In most cases, the single most important factor in desktop operating system performance is the amount of system memory available. It’s all well and good to have a fast processor, but if there isn’t enough physical memory to keep that processor utilized, the system will spend all its time shuffling data between physical memory and swap space (a condition known as thrashing) and the CPU will spend most of its time idle. For older systems, therefore, adding extra memory is usually the easiest way to improve performance. There are a number of reasons why this may not be possible, however, ranging from a lack of free slots, to a scarcity of affordable RAM for some systems (particularly laptops or RAMBUS-based systems), to an understandable reluctance to spend more money on an aging system.

If you are unable or unwilling to upgrade your RAM, the next best thing is to reduce the RAM requirements on your system. This article shows you five simple steps to memory nirvana for your Linux machine.

Step 1: Choose the right desktop environment

Your single most important choice is the Linux distribution and desktop environment (DE) you’re going to install. While these are two distinct choices, the choice of distribution can affect the choice of DE. There is nothing stopping you from installing, say, Fluxbox on Ubuntu; however, you’ll find that life is a lot easier if you simply use the default DE that comes with your distribution.

In the scenario in this article, the goal is to find a simple desktop-oriented distribution that is easy for new users. I have started off with Ubuntu 6.10, which comes with GNOME 2.16.

For my base system, I have chosen an old machine with an 800MHz processor and 256MB of RAM. I will execute each of my tests twice, once booting as normal with the full 256MB of RAM and once with mem=128M appended to the kernel line, which forces the kernel to only recognize 128MB of the physical memory. This effectively allows me to examine both a 256MB machine and a 128MB machine without actually using a second physical machine (or repeatedly physically removing the RAM chips from my machine and then putting them back in). This kernel-line option provides a close enough approximation of how a 128MB machine will behave; note, however that if you really have only 128MB, you may experience additional complications — for instance, with Ubuntu you must use an install disk different from the common one for machines with less than 192MB of RAM.

To get a base level of memory usage, I booted the system, logged in to the desktop, and started a terminal (in the rest of this article, I’ll refer to this setup as my base level ); then I checked the amount of free memory using the free command, with the results as shown in Listing 1.

Source and More : www-128.ibm.com

,

498 Read

Trackback URL