Puget Systems print logo

https://www.pugetsystems.com

Read this article at https://www.pugetsystems.com/guides/462
Article Thumbnail

How to Check ECC RAM Functionality

Written on April 3, 2013 by Matt Bach
Share:

Introduction

ECC (error-correcting code) RAM is essential in servers and many workstations as it dramatically improves the reliability of the system's memory by detecting common kinds of data corruption and fixing the errors automatically. Without the error correction of ECC memory, memory errors can cause data corruption or even blue screens.

ECC RAM Functionality

In order for ECC RAM to work correctly, you need three things:

  1. ECC RAM
  2. A CPU that supports ECC RAM
  3. A motherboard that supports ECC RAM

Even if you have all three and ECC should be working, it is often the case that you will want to check to make sure that ECC is functioning as it should. After all, you paid the extra money for ECC RAM so it stands to reason that you would want to make sure it is working properly.

Unfortunately, while this sounds simple it is actually very difficult to do. Many motherboards have a BIOS option to enable or disable ECC, but even then you are only ensured that the BIOS is trying to use ECC and not that it is actually running. In order to do so, there are three methods that we have found to semi-accurately show if ECC is enabled and working. Unfortunately, there are several instances when one or more of these methods do not show ECC as working when it actually is, so even if one of these methods does not detect ECC as working that does not mean that it is not working. All it means is that the program/utility does not detect that ECC is working. If, however, any one of these methods shows ECC as enabled and working, you know that ECC is actually working.

BIOS Information

The easiest way to see if ECC is enabled is to look in the motherboard BIOS. Unfortunately, like all the other methods we will be showing in this article this method is not fool-proof. While many server-class motherboards will have something in the BIOS that shows that ECC is enabled, in our experiance the majority will not.

Even so, this is the easiest method to use and requires no special software or OS versions so it is what we recommend doing first. However, every BIOS is different so you will want to check your motherboard's manual to see exactly where this setting is if it exists.

Memtest 86+

One of the easiest ways to confirm that ECC is working is to use Memtest 86+. This is a great memory diagnostic program that we include on our Tools Disc that is included with every system we sell. Unfortunately, it is sometimes slow to update to support new chipsets so things like ECC detection are not reported accurately on systems with the latest hardware. If you do not have access to one of our Tools Discs you can download an ISO of Memtest 86+ and burn it to a CD/DVD instead.

Simply boot to either our Tools Disc and select "Memtest 86+" or boot to the Memtest 86+ disc and the program will load and begin running. If Memtest detects that ECC is working, it will simply show "On" in the ECC column. If it shows "off", this does not mean that ECC is not working, but rather that Memtest does not detect ECC for your chipset and you need to try one of the other methods to determine if ECC is working properly.

Memtest 86+ ECC

Ubuntu Live CD - dmidecode

Dmidecode is a utility built into Ubuntu that reports information on various aspects of the hardware in a system. The nice thing is that it is even built into the LiveCD version of Ubuntu which does not require you to actually install Ubuntu onto your system. You can simply run Ubuntu directly from a CD/DVD which leaves your actual operating system completely untouched. The downside to Dmidecode is that it only tells you if the RAM supports ECC, not if ECC is working and functional. For example, if you use a CPU that does not support ECC, but RAM that does, DmiDecode will report that that RAM is ECC capable, not that ECC is actually functional.

To start, download Ubuntu 12.10 and burn the ISO to a CD/DVD. Next, boot to the CD/DVD and when the option to either "Try Ubuntu" or "Install Ubuntu" comes up, select "Try Ubuntu" and wait for Ubuntu to load. Try Ubuntu
Once Ubuntu is fully loaded, click on the Ubuntu logo at the top-left of the screen, type "Terminal" in the search field, and click on the Terminal application. Ubuntu Launch Terminal
The first thing we need to do is to login as the root (admin). Since this is a blank OS, we first have to actually create a password for the root account by entering the command "sudo passwd root". You will prompted to enter a new password - "password" works fine. Next, type "su" and enter your password to change to the root account. Ubuntu Set Root Password

At this point, all of the initial setup is done and we can see if the RAM supports ECC. Simply enter the command "dmidecode -t memory" to list all of the information about the system's memory. This command outputs a lot of information, but the part we are concerned about is at the very beginning so you will want to scroll up to right after where you entered the command. If dmidecode detects that the RAM supports ECC, there will be an entry for "Error Correction Type:" and the type of Error Correction that is detected. If ECC support is not detected, then this entry will not be listed or will say "None".

Ubuntu dmidecode -t Memory ECC Enabled Ubuntu dmidecode -t Memory ECC Disabled
ECC detected and working ECC not detected

Again, Dmidecode only shows that the RAM itself does or does not support ECC, not that ECC is actually functional. If "Error Correction Type:" is not listed, this does not mean that ECC is not working, just that dmidecode does not detect ECC. If this is the case, we suggest trying our third and final method for determining if ECC is working which also uses an Ubuntu LiveCD.

Ubuntu Live CD - ecc_check.c

This method is courtesy of jack-kr123 on [H]ardForum and uses a small C program that you must first compile then run in Ubuntu. This is actually quite easy even for a user that is unfamiliar with Linux, but does require the use of a USB thumbdrive.

To start, copy the code for the C Program to a blank notepad file. Save the file to your USB drive as "ecc_check.c" making sure that "Save as type" is set to "All Files". Alternatively, you can create this text file directly in the Ubuntu LiveCD to avoid using a thumbdrive to transfer the file to Ubuntu. ecc_check.c
Next, plug the USB drive into the machine running the Ubuntu LiveCD (if Ubuntu is not already running, follow the first three steps in the dmidecode section to boot into the Ubuntu LiveCD and login as root). Once the drive is detected, click on the icon for the thumbdrive on the left side of the screen. Navigate to the "ecc_check.c" file, right-click on the file, and select "Copy to --> Desktop". Ubuntu Open Thumbdrive

Once the ecc_check.c file is copied to the desktop, enter the command "CD Desktop" into the terminal to change the active directory to the Desktop which is where the ecc_check.c file is now located. Next, compile the file with the command "gcc ecc_check.c -o ecc_check". You will get a few warnings, but they are expected and completely normal. The final step is to actually run the compiled program which is done with the command "./ecc_check".

The program will output a few lines of text; of which only the values in the far-right column are relevant. The values in this column represent whether ECC is working or not and correlate to the following:

0: ECC disabled
1: ECC is active in I/O; ECC logic is not active in this case.
2: ECC is disabled in I/O, but ECC logic is enabled.
3: ECC active in both I/O and ECC logic

In other words, anything but a 3 in this column indicates that this program does not detect that ECC is working. Again, this method is only an indicator that ECC is working properly, not that is it not working.

Ubuntu ecc_check.c ECC Enabled Ubuntu ecc_check.c ECC Disabled
ECC detected and working ECC not detected

Conclusion

For something that is critical for servers and some workstations, you would think that checking to see if ECC is working would be a simple matter. Unfortunately, we have found that there is no consistent, conclusive way to determine if ECC RAM is working properly. Even if none of the three methods we showed indicate that ECC is working, all that means is that none of them could detect that ECC is working. On the positive side, on every system we have needed to verify that ECC is working we have been able to confirm it by using one of the methods we showed in this article.

We've actually asked Intel, Kingston and Asus over the years for their recommendations for methods to confirm that ECC is working, but we haven't gotten much more back than a blank stare. While the methods we are currently using have worked for us so far, we wish that there was a better, easier, and more consistent method available. Unfortunately, until Intel or the various memory manufactures come up with a better way, we are stuck having to go through multiple programs and utilities to find one that will correctly report that ECC is actually working.

Tags: ECC, Memory, RAM
AndCycle

there is an issue in your description about memtest86+,

first
that ECC is default off, even if your board support it,
you can configure it to on in menu,

second, there is no info about ECC in v5.01

and ecc_check.c is only suitable for Intel

Posted on 2014-12-04 05:07:40
ECC-User

The ECC check is only suitable for i3 intels. It doesn't work on Xeons or i7s.

Posted on 2015-07-10 11:42:53
hun

I used 8GB ECC UNBUFFERED 204pin 10600 RAM in my toshiba x505 laptop. It worked for 3 weeks and then nothing, It's new ram and new board. Why did it stop working (laptop doesnt reach bios like there's no ram at all) and is there anyway to get it to work again? thx

Posted on 2015-09-14 06:10:59
AndCycle

that kind of question should take to toshiba customer support,
and by the spec, toshiba x505 use 720QM which doesn't support ECC at all.

Posted on 2015-09-14 07:15:49
hun

Thanks! Support ended for this laptop long time ago. I doubted that the ram would work at all but it did and was really fast. Someone suggested it was the Win 7 64-bit OS that worked with it for a while but then an onboard buffer became full or some other HW limit was reached. 8GB 10600 one piece ram is relatively cheap at $45-50 used. Guess I'll have to go back to non-ecc. Can't think of a way to reset whatever it was that reached limit. Not many other QA online discussing the subject intelligently either.

Posted on 2015-09-14 14:55:25

ECC memory should work just fine on CPUs/motherboards that don't support ECC, you just won't get the error correcting feature of ECC. Essentially, the RAM will just work as normal RAM even though you paid for ECC. Registered ECC (or Buffered RAM) is completely different and won't work at all (it won't even POST) on a CPU/motherboard that does not support Reg. ECC memory.

In other words, I doubt the fact that the RAM was ECC-capable was why it stopped working after three weeks. The stick could have just failed of course, but that would be unrelated.

Posted on 2015-09-14 16:55:54
hun

Thanks! I used this: (new) Micron PN# MT18KSF1G72HZ-1G4 8GB PC3L 204p Unbuffered ECC. But I mixed it with a 2GB PC3-8500 Non-ECC for 3 weeks. Now it won't post at all with ECC. I tried the other new one also but the board won't recognize either of them. Doesn't POST - the power led comes on and fan spins. Put the non-ECC back in and it works fine.

I also tried both pieces in a toshiba C675 with an i5-2520, which normally takes 10600 ram, but no POST there either. I get that the theory says it should work but it doesn't. It's possible both pieces don't work at all but one is brand new and the other was used for 3 weeks. I don't have any other pc's to test them in so I can't be 100% sure that they work so I guess we can't go any further.

Posted on 2015-09-15 06:57:46
hun

Just checked the Micron site and these ram only work with certain cpu's like Sandy Bridge, but not Clarksfield. I think that explains it, sort of except that the i5-2520 is a Sandy Bridge. These ram are also no longer supported. Samsungs are better.

Posted on 2015-09-15 07:14:51
sam

ECC_check.c is only suitable for Intel CPU. Do you know how to test ECC function with AMD CPU? Thank you.

Posted on 2016-09-12 06:38:30
goblin072 .

It would be nice if there were a workstation motherboard that could do what my Dell R610 server does with ECC. It can alert you via email, pop ups etc. It can also take a bad stick off line and keep running.

The ability to monitor ECC is a great feature. On workstations you just have to trust that its working and when it gets an error you have no idea and if a stick goes back it won't alert you like my R610. Show me a workstation MB that can do this and I might buy it.
https://uploads.disquscdn.c...

Posted on 2016-12-29 00:02:12
Keith

No need for `sudo passwd root.` followed with `su`. Rather, you can just use `sudo -i'.

Posted on 2017-02-17 17:51:15