Most people are familiar with the concept of RAM, which is temporary memory used for storing program data. This is very useful, as it means the computer doesn't have to use the hard drive for storing temporary data, and the hard drive is significantly slower than the RAM is. However, when you run out of RAM, then you start having problems. When your free memory drops below a certain threshold, your system starts "swapping".
Swapping allows the computer to store some temporary data on a section of your hard drive instead of the RAM, thereby preventing your RAM from running out completely. However, the less free memory you have available in RAM, the more your computer will use swapping. When you run completely out of memory, then almost all memory operations will be done on the hard drive.
When this happens, system performance slows to a crawl. Programs take forever to load or to even close, and the system becomes barely useable. Your system shoots up to 100% CPU load. If you're on a laptop, this is extra bad because it'll drain the battery faster. When you have this problem frequently, you generally have two solutions: you can run fewer programs so that you're not using as much memory, or you can buy more RAM. However, the second solution is often impractical for a few reasons. One, RAM costs money, especially for newer grades of RAM. Two, system motherboards can only support up to a certain amount of RAM. And three, some systems (especially laptops and netbooks) can't be upgraded, or are very difficult to upgrade.
My system has four gigabytes of RAM installed (or 3.2 gigabytes, since I'm presently on a 32bit system). Memory usage generally isn't a problem for me except. The only memory-hogging application I use is Second Life's viewer (or one of the open source forks of it, rather), and I only run into memory problems if I've been running it for a few hours and have teleported between several regions.
But, I do get swapping, due in large part from my multitasking. I have several applications that I run, but I have chosen to mostly use lightweight applications: ones that aren't overloaded with junk and use less memory as a result. But, what among those applications is my second-largest memory hog?
It's the web browser.
Currently, I'm using Chromium (or rather its privacy-enhanced fork, SRWare Iron). It almost always uses more memory than any other of my applications, especially since I have multiple tabs. And its browser tabs that are the real point of this blog post.
The current design of internet browsers and web sites originated with having just one page loaded at a time. There were no tabs. If you wanted more than one web page open at once, you had to run a second browser window. But then, internet browsers started adding tabs, alowing you to have multiple pages open at once. For a multitasker like me, this was a dream come true!
However, as I've come to realize in the past year, having all those tabs open is not a very good idea if you're trying to conserve system memory. Add higher-resolution images and javascript-enabled websites to the mix, and this adds up even more! As I write this, I have three other tabs open: Plurk, Poddery, and the InWorldz forums. I look at chromium's memory usage page, and it shows the browser using 390 megabytes of memory.
390 megabytes doesn't sound like much when my system has at close to ten times than available to it, but if you're on an older machine, that's quite a bit. My old laptop has just 512 megabytes of RAM available, so using my browser the same way on that system would leave it with over half of its memory used up! Most netbooks have twice as much memory, but this is still not much of an improvement. Running tabs with heavyweight websites like Facebook or Google+ can really increase memory usage a lot (yet another reason I'm glad I don't use either anymore).
And the future doesn't look good for memory usage on the internet. There's development underway for 3D websites that utilize technologies such as WebGL and HTML5 to add 3D rendering into the mix. 3D web pages may be nice for eye candy, but they're not exactly going to be nice for system performance and memory usage.
So, I think one of two things need to happen, or perhaps both:
- Website developers need to design their websites with greater emphasis on reducing memory usage.
- Browser developers need to find new ways to cut down on memory usage.
Chromium is already very good at this. It already uses half as much memory as Firefox does when I run it, and it leaks memory a lot more slowly than firefox. But for me, memory usage in the browser is not a problem until the Second Life viewer's memory usage becomes a problem. My solution to the problem will be (if I can afford it) getting more RAM and upgrading to 64bit.
As for systems that have less ram (especially older systems), memory usage is a much greater problem. Netbook systems, as implied by their name, are geared primarily towards internet usage. And because they are manufactured with less resources than a laptop or a desktop system, they are typically limited in how much RAM they have.
There's a lot of other things that users on such systems can do to reduce memory usage, and thereby reduce the frustration and the problems that come with swapping. But, shouldn't such memory optimizations be up to the developers to make, rather than putting all of the responsibility on users?