bonnie++ comes to mind:
So, depending on your box's hardware configuration:
bonnie++ -d /path/to/mounted/ssd -r your-system-ram-size-in-MB
Example:
# For a 32GB system with the SSD formatted and mounted at /mnt/mounted-ssd-001
bonnie++ -d /mnt/mounted-ssd-001 -r 32000
It should give your device a good stress test. You can customize it as well.
Note, with an SSD, when a bad block happens, it may get remap'd automatically by the drive hardware, depending on the drive you are working with. Also, a torture test eats away at your SSD's write lifespan. So, use at your own discretion.
EDIT:
Adding a note about SSD failures, since it's been pointed out that Bonnie++ stress tests, but doesn't track errors. The way SSD(s) "remap bad blocks" is different from the way hard drives do remapping. How it goes about it depends entirely on which brand/make/model of SSD you have:
- Cheap SSD(s) just fail, because they have no spare capacity to remap, or because they have no means of segregating the failed flash blocks. They will just hang or go offline and won't come back online.
- Midrange SSD(s) with no spare capacity may generate Smartd alerts or perhaps even generate OS level block device errors when a failed block is detected. However, when the fail happens, the SSD's registered size will change. This can result in an error and the device being taken offline by the OS or it can result in the device itself hanging and needing to be pulled out and re-inserted for it to be recognized again. On re-registering, the device's available block size will be diminished.
- High end SSD(s) with spare capacity will remap the bad blocks behind the scenes and may generate OS level alerts/warnings. When the spare capacity runs out, the device will probably fail along the lines of the Midrange SSD(s).
When the SSD resizes itself due to bad blocks being isolated, you might need to do the following to revive the drive, if the drive's firmware doesn't automatically do the proper updates automatically:
https://web.archive.org/web/20130728024542/http://communities.intel.com/message/145676
Unless the stress test and error logging tool is specifically designed with SSD(s), in mind, you are just using up the lifespan of the device.
EDIT:
Based on info from answers above, suggest either replacing the cable with a better one or replacing the drive(RMA/Warrantee replacement), as that kind of OS filesystem level error is not normal.
Also, if your drive supports it, you can increase the amount of space reserved for handling errors:
http://www.thomas-krenn.com/en/wiki/SSD_Over-provisioning_using_hdparm
I would imagine the same is likely in other OS/Hardware combos, if the drive is forced to sleep via a hard drive power down issued to an SSD. I would check the configuration of your system before burning up your SSD with drive test.
– Wing Tang Wong Apr 16 '13 at 15:49