How to use stressapptest to stress test a USB port?

965 views
Skip to first unread message

jo

unread,
Jul 2, 2015, 1:46:02 PM7/2/15
to stressappt...@googlegroups.com
I want to stress test a USB stick in a linux environment (preferably with a shell script).  I'm considering just dd-ing reasonably large files in blocks around what might be the underlying page size of the usb stick (127 128 129, 255 256 257, 511 512 513, 1023 1024 1025).

But I'd like to use stressapptest and all the additional goodness it might have.

Does this work as I intend?

# Mount the flash drive
mount
/dev/sda1 /mnt


# -f = filename
# -s = number of seconds to execute for
# -M = MiBs of memory to allocate
# -m = number of memory copy threads
# -W = use more CPU-stressful memory copy
stressapptest
-f /mnt/file1 -f /mnt/file2 -s "$DURATION_SECS" -M 100 -m 2 -W


# Unmount the flash drive
umount
/dev/sda1


Nick Sanders

unread,
Jul 2, 2015, 1:53:51 PM7/2/15
to stressappt...@googlegroups.com
Yes, it will work. You can specify "-m 0" and leave out -W if you want to test storage only. 

Note that USB sticks and SDCards typically have a limited number of write cycles (maybe as low as 100x capacity), so high speed devices like USB3 sticks and fast SDCards may wear out if tested for too long. stressapptest will report how much data was written during the test.

--

---
You received this message because you are subscribed to the Google Groups "stressapptest-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stressapptest-di...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages