在 Linux 裡面記憶體的多少對效能有很大的影響,以下這篇在 IBM developerWorks 的文章介紹了準確計算 Linux 系統所使用的記憶體,裡面還有一些在 Ubuntu 減少記憶體需求的實例。看完後可以更加了解 Linux 如何使用及分配實體及虛擬 (swap) 記憶體。
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.