Showing posts with label Memory upgrade. Show all posts
Showing posts with label Memory upgrade. Show all posts

Saturday, December 10, 2022

Lenovo C20 Gets a Memory Upgrade

The good thing about "old" computers is that memory gets cheaper, and adding memory gives the computer a new lease of life. I have added 500MB, 1GB, and 4GB memory to my old laptops for a very reasonable price after about 6-8 years. As I recall, I paid about £10-15 each time, for memory that was originally perhaps 4-5 times that price. I have also upgraded the memory on an old tower PC for less than a couple of pounds, but in that case, the computer was more like 10-12 years old, and the memory card a salvage item from eBay.

Extra memory will make a computer run much better if it is using a high percentage of that memory, because the computer starts to use swap (Linux) or virtual memory (Windows), writing memory to hard disk to free RAM space. This makes switching applications or browser tabs or opening menus slow, as these things have been swapped from RAM to HD as RAM becomes full. (I don't know if the same thing applies to SSDs, because I don't have one.) It won't make a computer faster at gaming or video editing, but with web pages and web browsers using more and more memory, it will make using the internet (especially with multiple tabs open) a much better experience.

Indeed, I upgraded the memory on my newest laptop for just this reason. It would work perfectly well with 4GB of RAM - without a web browser open! With 8GB, web browsing is perfectly fluid, even with dozens of tabs open, as I documented here.

I had not upgraded this machine, a Lenovo all-in-one C20 previously because it only has one memory slot, which would have meant buying a expensive 8GB memory card, rather than, as with my laptop, adding a cheaper 4GB card to a spare slot. 

Recently though, the Lenovo has been having issues, with the HD churning when switching applications (a good sign that the computer is having to move memory between swap and RAM), and the main menu taking 15 seconds to appear.

Investigating memory usage showed 86% of RAM in use, with 1.7GB of swap memory in use.

A previous screenshot of memory usage from a few weeks ago did not show the same high usage of swap, so I'm wondering if this could be a result of a memory leak in the latest version of Firefox (I'm using 107).

Whatever the cause, I found a refurbished 8GB card from a well-known memory supplier for £14.94 with a lifetime guarantee, and couldn't resist. This was not a dusty old card from a salvage machine, but as sellers of refurbished hardware like to say "cosmetically indistinguishable from new". An unwanted return? Anyway, a bargain, and here is memory usage after fitting.

This is with multiple active tabs open in Firefox. Switching between tabs is instant, the main menu appears in a fraction of a second again, and there is still room to open other applications. Result! 

With a browser open, 8GB of memory seems to be the minimum for a usable system these days, as was the case with my laptop. For older machines, a memory upgrade becomes an affordable option, but how was the actual procedure? Pretty awful, it has to be said. This machine is not designed to be easily opened.

The key is to pull back the rubber feet on the legs to remove two screws. I would never have noticed these without finding a guide on the internet. There is another screw under a removable panel behind the stand hinge. After removing these, insert a blunt screwdriver in to the legs and start cracking off the screen. Slide the screwdriver along the gap until resistance is felt, then twist to pop the next catch along. Level of difficulty: high. Chance of damaging case or screen: high. Do I wish I'd bought a tower? Yes.



When the screen is detached, the card slot is easily accessible on the mother board. Don't forget to earth yourself before touching memory cards.


If you are wondering why I'm in the process of removing the motherboard, it's because I thought I would clean the fan while I had the case open, but the only way to access the fan is to take out the motherboard. Yes, worst design ever, but that's another story...

Sunday, March 7, 2021

Toshiba laptop gets a memory upgrade

Previously on this blog I described how my laptop was using 93% of its available RAM and 69% of available swap memory after a few hours use, largely due to having a dozen or more browser tabs open. Not an ideal situation. That doesn't leave any memory available to open up a word processing application or an image editor without the computer slowing down as Firefox is forced to cache tab content to disk. I have noticed that with several memory-intensive programs running, background programs are very slow to reopen, presumable because they have cached content to the disk. And of course with both RAM and swap (virtual memory) almost full, it leaves the computer likely to experience thrashing and crashing, if a program uses too much memory, whether due to me asking it to work on a large file, or some sort of bug causing excessive memory use.

So, time for some new memory. I found an identical card to the existing 4GB card in the laptop on eBay and popped it in the empty slot.

I didn't take a picture, but I have one from when I cleaned the fan (hence the very dusty fan in the corner). The procedure is very simple. Pull out the metal cover between the two sockets, put in the new card pins into socket at a 45 degree angle, push it down till it clicks, and replace the metal cover. Be careful because it has a lug on one side that goes into a hole in the board. Don't forget to earth yourself. I put my naked toe on the copper radiator pipe - only issue in the winter, it's hot, ouch!

A useful command to check memory is:

dmidecode --type memory | less

Which tells you about the cards installed, including manufacturer, part number and specification, all of which matched for my eBay card, although the label was different - something I will have to investigate later.

Here is a comparison shot of Task Manager with 43(!) tabs open in Firefox.

Swap memory has also increased since my previous post, when the laptop had 975MB of swap. The default installation of Debian Bullseye created this much swap. Supposedly this is done automatically according to memory and hard disk space available, but my other computer has the same amount of memory and the same hard disk size, and yet it has four times as much swap.

There are a lot of different recommendations for swap size on the internet, but 975MB certainly seems too small a size - it certainly isn't big enough to hibernate the computer because that involves writing the entire memory to disk, and 4GB won't fit in 975MB. Swap memory was at 69% as mentioned before, which doesn't allow much room for manoeuvrer. 

Increasing the size of swap memory was actually fairly easy, but it does involve booting into a GParted live CD or USB. Once I had done so I could shrink the main partition to make room for the swap partition to expand. The swap partition is found inside an extended partition, at the "end" of the main partition, so it's necessary to move the extended partition to the left before expanding the swap partition.

Grab the arrows at the ends of the partition to resize because the buttons take forever.

I gave the extended swap partition 9542MB, a fairly arbitrary figure, but as I actually did this before adding the extra RAM, it meant I had over twice as much swap as RAM. Surely enough to hibernate?

I tried hibernating the computer, but unfortunately ran into a video driver bug that means the screen remains blank after coming out of hibernation.

kernel: [drm:radeon_dp_link_train [radeon]] *ERROR* displayport link status failed
kernel: [drm:radeon_dp_link_train [radeon]] *ERROR* clock recovery failed
kernel: [drm:radeon_dp_link_train [radeon]] *ERROR* displayport link status failed
kernel: [drm:radeon_dp_link_train [radeon]] *ERROR* clock recovery failed
Oh, well. On a 500GB disk, I'm not really missing 9.5GB. The computer hasn't touched available swap space since I installed the new memory, but maybe the video bug will get fixed and allow hibernation at some point.




 



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.