Finding bad RAM with memtest86

Lately Firefox started to crash randomly without an apparent reason. Also other software on my computer started acting weird. It took me a while to found the cause of the problems. It turned out one of my memory modules has gone bad. Finding that out was not exactly easy. Normally I would run memtest86+ from an Ubuntu live CD. That was not possible as I have an UEFI BIOS (without legacy support) and memtest86+ is lacking UEFI support.


I was able to create a virtual machine (with KVM or VirtualBox) with reserved RAM and run memtest86+ in there. That actually showed the problem. Another trick to detect the problem is to run memtest86 (without the plus) as it has support for booting using UEFI since version 5. It can be downloaded from (choose CD image) and put it on an USB stick using UNetbootin (install using apt-get).


When I found the problem there was no other way than to try to add and remove memory modules and run the test again to find out which one was broken. It took some time, but eventually I succeeded. It wasn’t a pretty process and it took way too long. Somebody should write a memory testing program in user-space that also reports the slot of the broken RAM module. In the end the broken module turned out to be the one closest to the CPU (see picture), maybe it got too hot.

Suggested tools:

  1. MemTest86 from:
  2. Memtest86+ from:
  3. Windows Memory Diagnostic from:

I hope it will help you.


High RAM usage on Ubuntu Linux

When you have 16 gigabyte RAM and you run top you might be surprised:

Tasks: 167 total,   2 running, 164 sleeping,   0 stopped,   1 zombie
Cpu(s):  0.9%us,  0.5%sy,  0.0%ni, 98.6%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  16333884k total,  1722432k used, 14611452k free,   163984k buffers
Swap: 16675836k total,        0k used, 16675836k free,   697196k cached

1198 root      20   0  143m  16m 7836 S    5  0.1   0:21.80 Xorg
2150 maurits   20   0 1039m 324m  44m S    3  2.0   0:54.05 firefox

Just booted and already 1.7 gigabyte of RAM used. Oh no, Linux ate my ram!

maurits@nuc:~$ free -m
             total       used       free     shared    buffers     cached
Mem:         15951       1657      14293          0        160        655
-/+ buffers/cache:        841      15109
Swap:        16284          0      16284

But is is actually not so bad. Using the “free” command we see that only 841 megabytes are used. Others are used for buffers. Fortunately “htop” also shows the correct RAM usage number:


So, just remember that free RAM may actually be used for buffers to optimize operating system I/O. These buffers are immediately discarded when more RAM is needed by applications and they should therefore be considered free.