If you’ve set up a new Ubuntu environment or Virtual Private Server (VPS), it’s crucial to understand your system’s memory characteristics. Tools like memtest help you quickly assess your computer’s memory, including how much RAM is installed and its usage. In this guide, we’ll explore how to run memtest on Ubuntu, ensuring your system’s memory is up to the task.

Understanding Memtest

Memtest is a memory testing tool designed to identify faults in your computer’s RAM. Ubuntu and most Linux variants come with memtest preinstalled, but you can create a portable test drive if it’s not available on your distribution. Memtest works by reading, comparing, and writing test patterns to memory addresses.

Running Memtest on Ubuntu 20.04

Let’s walk through the steps to run memtest on your Ubuntu 20.04 machine:

Prerequisites

Ensure you have Ubuntu 20.04 installed, and the GRUB menu should have the memtest86+ option available.

Step 1: Open the GRUB Menu

Memtest86+ operates independently of the operating system. To access the GRUB menu, hold down the “Shift” key while powering on or restarting your computer.

Step 2: Select Memtest86+

In the GRUB menu, locate the “Memtest86+” option and select it using the arrow keys. Press “Enter” to start the memtest.

Step 3: Perform the Test

The memtest will automatically begin and run until you use the “Esc” key to end the test. Ideally, the test should complete without any errors. The test details will be displayed in the output pane.

It’s advisable to run the memtest multiple times, especially if your system has a large amount of memory. Some errors may only appear during subsequent passes. Depending on your system’s memory size, each run can take several hours or even days to complete. Running the test overnight or over the weekend is a good practice for comprehensive testing. If your memory uses Error Correcting Code (ECC), it will automatically fix any errors detected during the test.

Testing with Memtester

In addition to Memtest86+, you can use the command-line tool called Memtester to check your RAM for issues. Follow these steps to set up and use Memtester:

Step 1: Install Memtester

By default, Memtester is not installed on Ubuntu, so you’ll need to install it with the following command:

sudo apt install memtester

Step 2: Run Memtester

Execute the Memtester command to check your system for RAM issues. Use the following syntax:

sudo memtester size iteration

Replace “size” with the memory capacity you want to allocate, and “iteration” with the number of passes or iterations you want to run for testing.

For example, to test 200MB of memory for 1 iteration, use this command:

sudo memtester 200M 1

Comparison Table: Memtest vs. Memtester

Let’s compare two memory testing tools, Memtest86+ and Memtester, to help you choose the right one for your needs.

FeatureMemtest86+Memtester
PurposeDiagnose and identify hardware-related memory issuesCheck for RAM problems in Linux systems
Test ModesOffers various test patterns and iterationsSimple and quick tests
InterfaceRuns outside of the operating system, often from a bootable USB driveCommand-line interface
User-FriendlyMay be less user-friendly for beginners due to its bootable natureRequires some familiarity with the command line
InstallationRequires creating a bootable USB drive or CDCan be installed with a simple command
Real-Time TestingRuns independently of the operating systemConducts tests within the OS environment
ExtensivenessThoroughly checks memory for hardware issuesFocuses on detecting issues in the Linux memory management
VersatilitySuitable for both desktop and server systemsPrimarily designed for Linux-based systems
Time EfficiencyMay take several hours to complete a full testQuick tests that can be performed in a short time
ECC SupportSupports ECC (Error-Correcting Code) memoryCompatible with non-ECC and ECC memory

Memtest vs. Memtester: Which One to Choose?

Now that we’ve compared Memtest86+ and Memtester, let’s discuss when to use each tool.

  • Memtest86+: Use this tool if you suspect hardware-related memory issues, especially on desktop or server systems. It provides comprehensive testing but requires creating a bootable USB drive or CD.
  • Memtester: Choose Memtester if you primarily use Linux-based systems and want a quick way to check for RAM problems within the OS environment. Memtester is more accessible for users familiar with the command line.

Tips for Effective Memory Testing

Regardless of the tool you choose, here are some tips for effective memory testing:

  1. Test Multiple Times: Run memory tests multiple times, especially if your system has a lot of memory. Some issues may only appear during the second or subsequent passes;
  2. Overnight Testing: For extensive memory testing, consider running the test overnight or during periods of inactivity;
  3. Error Reporting: Pay attention to any error messages or issues detected during testing. These can help diagnose and resolve memory problems;
  4. Regular Maintenance: Include memory testing as part of your regular system maintenance routine, especially if you rely heavily on your computer’s performance.

Remember that both Memtest86+ and Memtester serve essential roles in identifying and addressing memory-related issues, and the choice between them depends on your specific requirements and familiarity with system tools.

A person works at a tablet

Conclusion 

In conclusion, understanding and diagnosing memory issues are crucial for maintaining a stable and reliable computer system. In this article, we explored two valuable tools, Memtest86+ and Memtester, each offering its unique advantages.

Memtest86+ is a robust choice when you suspect hardware-related memory problems on your desktop or server systems. Its comprehensive testing capabilities can help identify and resolve issues, but it requires creating a bootable USB drive or CD, which may be less user-friendly for beginners.

On the other hand, Memtester provides a quick and efficient way to check for RAM problems within the Linux environment. It’s a command-line tool that’s easier to use if you are familiar with terminal commands.

When deciding between Memtest86+ and Memtester, consider your specific needs and system configuration. If you value thorough hardware testing and have the time to create a bootable drive, Memtest86+ is the go-to choice. In contrast, Memtester is a convenient option for Linux users who want a quick memory check within their operating system.

Remember to perform memory tests regularly, especially if you rely on your computer’s performance or run memory-intensive applications. Identifying and addressing memory issues proactively can prevent unexpected crashes and data loss, ensuring a smoother computing experience.

FAQ

1. What is Memtest86+ used for?

Memtest86+ is a memory diagnostic tool used to check for faults in the RAM of your computer. It’s essential for identifying and resolving memory-related issues that can lead to system crashes or data corruption.

2. Is Memtest86+ included in Ubuntu by default?

Yes, Memtest86+ is preinstalled in the majority of Linux distributions, including Ubuntu 20.04. You can access it through the GRUB menu during system startup.

3. How long does a Memtest86+ run take?

The duration of a Memtest86+ run depends on the amount of memory installed in your system. Each pass can take several hours or even days for systems with a significant amount of RAM. It’s advisable to run the test overnight or over the weekend for comprehensive results.

4. Why use Memtester on Ubuntu?

Memtester is a command-line tool that allows you to check your system’s RAM for issues without the need for a bootable drive. It’s a quick and convenient option for Linux users to perform memory tests within their operating system.