Tuesday, March 2, 2021

How much memory does a laptop need?

I bought a laptop in 2003 which had a single core CPU, a 30GB hard disc, and 256MB of RAM. It used to grind to a halt if I opened too many programs.

This laptop was a cheap, low-end laptop, bought in 2015. It has a dual core CPU, a 500GB hard drive, and 4GB of RAM. (And was a sixth of the price of the previous one.)

That is sixteen times as much memory.

But it still sometimes grinds to a halt if I have a lot of programs open. The program I'm working in works OK, but switching to another program can take a long time. Why? Because the memory is full and background programs have been moved to swap, or virtual memory as it's called in Windows. (I'm using XFCE.)

How come a computer with sixteen times as much memory as my 2003 laptop still doesn't have enough? Let's have a look.

The graphics card takes a 700MB bite out of memory before the OS (Debian Linux) loads. XFCE is a light desktop, but even then, the OS and desktop alone takes up almost 870MB of memory.

Let's open up Firefox.

Memory usage jumps to 1.5GB, 47%, with a dozen or more tabs open from yesterday. But those tabs are blank, with the contents cached to the hard drive. Let's look at each tab so the contents are in memory.

78% memory usage, 2.5GB. Now let's open another program.

86% memory usage, 2.8GB, and the computer is starting to use swap memory - writing memory to the hard disc. Swap memory is 9% full.

Later in the day, after several hours use:

93% memory use, 3GB, with swap 69% full, 675MB. Switching between programs and tabs is now going to be slow, as the computer has to retrieve memory from the hard disc.

Time to close a few tabs in Firefox:

The biggest memory hog is obviously Firefox, but at least part of the reason for this is that web pages are now huge. Back in 2003 I was using dial-up, and web pages weren't full of images and videos and scripts because it would have taken a day to load one of today's pages.

It seems the answer to the question in the title is: more than 4GB.

The good news is my laptop has a free memory slot, and I found an identical memory card to the one installed for a reasonable price on ebay. 

In a few days the laptop will have 8GB, which seems to be the recommended minimum these days. I will post again on how much of an improvement in performance I see.






No comments:

Post a Comment