Memtest - Port 25: The Open Source Community at Microsoft
< Back to Blogs
Memtest by jcannon on July 11, 2006 04:32PM

*Updated* So, this weeks tech tip is about memtest, and yes, I am sure there are some that might scoff at this....But I think we have a tendency to loose sight of the basics. For instance, last week we had quite an interesting time debugging a problem that occurred intermittently and we where not able to find a way to consistently reproduce the problem. We ran through all kinds of things until we decided for grins and giggles to run memtest. And low and behold, it found memory errors. We replaced the memory and have not seen a recurrence of the problem.

We decided to pull this old but trusty tool back out of the stable. Special thanks goes to Kyle Adams and Stephen Zarkos who did a lot of the footwork on this one.

Memtest is a simple program that is designed for the x86 architecture.  You would use it for things such as when hardware hangs or when your computer doesn’t boot at all.  Either way, you could just grab memtest and throw it onto your computer. 

Actually, there is not a hard and fast rule when to use it. There are two ways I would put it in the toolbox to use, and they have to do with methodology more than anything. 

  1. I have no clue what is wrong and I am completely out of ideas, I am just stabbing in the dark.
  2. As a standard suite of checks and tests I do to debug a problem I will run memtest.
Honestly, I think number one is one that happens more in real life. A lot of people do not think that HW like memory will be causing any problems. They forget that often with memory it is not a black or white issue. It is not an all or nothing failure. It sometimes happens and sometimes it does not. I have never really seen a failure that I would say without question, that is memory!
You can get it here (Linux GPL, and windows version);   http://www.memtest86.com/

(There is also a non GPL, but still free version for windows available here http://hcidesign.com/ I am not to familiar with how it works, but the web page gives you a lot on information)

One thing to note, this can run for a very long time, several hours in some cases.

GENERAL FEATURES
Memtest gives a user the ability to access the memory in an effort to pinpoint a problem in the memory itself.  It uses a set of algorithms to check for consistency and errors in the placing of memory.  The algorithms that are used by memtest to test the memory are the following:

  1. Address test, walking ones, no cache
         a. Fills in the address space with ones in a sequential order
  2. Address test, own address
         a. Puts the address of the test address in itself
         b. Test for addressing errors
  3. Moving inversions, ones and zeros
         a. Checks the addresses using a series of ones and zeros
  4. Moving Inversions, 8 bit pattern
         a. Uses an 8 bit wide pattern to test for errors on “wide” memory
  5. Moving inversions, random pattern
         a. Creates a set of random numbers and its compliment, writes to address.
  6. Block Move, 64 moves
         a. Memory is initialized with 8 byte inverting patterns.
         b. Moved every 4 MB
  7. Moving inversion, 32 bit patterns
         a. Shifts data patterns one bit for each successive address
  8. Random number sequence
         a. Writes a set of random numbers into memory
         b. Checks the memory for consistency on the next pass
  9. Modulo 20, ones and zeros
         a. Uses the Modulo-X algorithm to check for errors not detected by inversions because of buffering
  10. Bit fade test, 90 minute, 2 patterns
         a. Initializes memory and then sleeps for 90 minutes
         b. Checks memory after the 90 minutes is up
 The point: applications still need error-free memory to execute correctly, especially today with application complexity increasing all the time. How do you replicate problems in your lab environment with such diverse environments across your network, or even more importantly,  separate hardware from software failure?As always, comments/suggestions etc appreciated. 

Hank Janssen

Comments RSS
  1. czarcats said:

    Memtest86+ is also one of the boot options on the Fedora Linux install media and rescue CD's (type "memtest86" at the boot prompt).

    posted at 06:36PM 07/11/2006
  2. fluke said:

    I just wanted to point out that while the memtest86 website provides packages in formats that are convenient for either Linux or Windows, it does not actually run on either.  It acts as it's own OS kernel independent of what is installed to the hard drive.  When booting from floppy or cd-rom, a Windows user gets the same exact amount of functionality as a Linux user.

    Btw, is it possible to get memtest86 to launch using the NTLDR boot.ini?

    posted at 01:05PM 07/12/2006
  3. einhverfr said:

    Another possibility that I am looking at is using pxelinux to offer memtest as an option for a networked boot.  I don't see why this would not be possible-- it is just a real-mode application after all.  I will hae to write back and tell you how it went.

    Best Wishes,

    CHris Travers

    Metatron Technology Consulting

    posted at 10:07AM 07/14/2006
  4. hjanssen said:

    Fluke, as you might know my knowledge of Windows is limited. (_very_ limited :)) so I was asking around here. and the response I got was:

    Provided memtest86 is setup as an OS installed on a dedicated partition within a box, it can be started by creating an entry into NTLDR boot.ini just like you can start linux or Windows or other OS installed on a dedicated partition within a box.

    http://support.microsoft.com/default.aspx?scid=kb;en-us;289022

    I have not tested this approach, but hopefully this gives you an idea on how to do it.

    Hank.

    posted at 03:04PM 07/14/2006
Post a Comment
*
*