How to debug hard drive performance problem?

I have an SSD that's rated for around 400MB/s read, but delivers more like 140MB/s. I realized this could just be saturating a 1.5Gb/s SATA 1 link. The SATA controller is a PCIE (hopefully) v2.x, x2. I'd like to check to see that the controller-drive interface is SATA III, and that the PCIE-controller interface is v2.x x2, and that neither autonegotiated down to a slower speed, possibly because of old cables. How can I do this?

The command I'm testing read throughput with is dd if=/dev/adaX bs=16M | pipebench > /dev/null.
 
Look in dmesg for the drive information.

I was hoping their would be something in camcontrol(8), however after a brief look at the man page I didn't see anything that stood out as helpful.

Also smartctl -a /dev/<drive> from sysutils/smartmontools may be helpful. Among other things, it would show this:
Code:
SATA Version is:  SATA 2.6, 3.0 Gb/s
 
I wonder if the version smartctl reports is the version supported or the version in use. I'll look into dmesg output.
 
Ah! I got this from smartctl (I'm guessing "current" is what it sounds like):

Code:
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)

On to PCIE?
 
For raw read speed, diskinfo -tv ada0 is functionally equivalent to reading with dd. That number is the fastest the SSD can go, but not very important for real-world use. The essentially zero access time of an SSD is usually the important feature.
 
Back
Top