Tools to extensively test CPU/Disk on Linux?

Damo

Member
Sep 7, 2022
41
4
8
I am planning on running MemTest86 to fully test memory and run a long iperf to test the network but how do you run a long 12 hour+ test on CPU? Also I would want something to fully test a NVMe disk too possibly fully fill it.

If you suggest any other tools for network/RAM too let me know. I just don't want any quick tests.
 

Stephan

Well-Known Member
Apr 21, 2017
558
354
63
Germany
For disks just use shred -vzn1 /dev/... to write random garbage then zeros to the card, then do a blkdiscard, then use nvme tool under Linux to read out smart log to see if any errors happened. For HDD a smartctl offline long test (many tens of minutes to many hours depending how large it is) would be appropriate.

For CPU board and RAM I always recommend Passmark's Memtest, because it will also show ECC RAM errors from the controller, not just plain RAM errors.

For stability, establish 50% of RAM as swap and then use "nice stress-ng --vm $(nproc) --vm-bytes 86% --vm-keep --vm-populate --vm-madvise willneed --verify -v -t 4h --tz --perf" (see my post https://forums.servethehome.com/index.php?threads/ram-error.36932/#post-341921) to torture the system. If you have ECC RAM, start rasdaemon to get reports of errors into system log.

Finally I have observed that compiling the Linux kernel on all cores+HT cores (24C/48T -> -j48) will produce 10-50 watts more load than stress-ng alone. So you can do that as a final step to see if your power stages on the board hold up or blow up.
 

acquacow

Well-Known Member
Feb 15, 2017
698
376
63
41
stress your storage with fio, and stress CPU with something like linpack...
 

Glock24

Active Member
May 13, 2019
118
67
28
If you want to check for drive errors you can use the badblocks command:

#badblocks -svw

Note: this will destroy the drive's content.