Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

SSD slower connected via SATA 6Gbps than UASP USB3

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
adr3nal1n
Posts: 4
Joined: 2018-09-17 11:49

SSD slower connected via SATA 6Gbps than UASP USB3

#1 Post by adr3nal1n »

Hi,


Am running Debian Stretch with the default kernel (currently 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u4)


CPU is a Intel(R) Pentium(R) CPU G3240 @ 3.10GHz with 8GB RAM

Motherboard is an ASUS H97M-PLUS https://www.asus.com/us/Motherboards/H9 ... fications/


The board has 6 x Sata 6Gbps ports on it and I have a Samsung SSD 840 Series Basic 120GB SSD connected to the first port and various other HDDs connected to the other ports.


My query is, why do you think I am seeing such wildly different results (SATA 6Gbps being much slower!) when testing the throughput of the SSD when connected via SATA 6Gbps vs when connected via one of the USB3 ports with the SSD drive mounted within a USB3 UASP compatible SATA to USB3 external enclosure?



Hdparm results when connected via internal SATA 6Gbps port - smartctl status shows SATA Version is: SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s):

/dev/sda:

Timing cached reads: 16630 MB in 2.00 seconds = 8333.10 MB/sec

Timing buffered disk reads: 440 MB in 3.01 seconds = 146.09 MB/sec


Hdparm results when connected via UASP USB3 enclosure:

/dev/sdg:

Timing cached reads: 16716 MB in 2.00 seconds = 8376.73 MB/sec

Timing buffered disk reads: 1154 MB in 3.01 seconds = 382.76 MB/sec


Thanks very much for any ideas/guidance.

CwF
Global Moderator
Global Moderator
Posts: 2679
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 196 times

Re: SSD slower connected via SATA 6Gbps than UASP USB3

#2 Post by CwF »

Something goofy!

I'm not sure I'd trust the results. In regular operation I see weirdness like that as seen from the desktop indications. I'll move a block of data to usb that had been being used by programs, inferring it may be in memory cache of some kind. Tthe transfer appears to be instant by all indication on the desktop, while a little blinky on the usb is still blinking.

I've also noticed that my desktop 'transfer in progress' indicator in XFCE disappears before the usb/sata adapter stops blinking when I write to a sata disk on a usb2 adapter on the usb3 bus.

Other times I see the rate as reported from the desktops copy/move dialog peak unrealistically high, pause, then maybe post a ~80-120MB/s, then done...while the bllinking usb light never varied...

So I think it's lying. I think my usb2 also varies in an unrealistic way but not as varied as usb3. There must be some caching / buffering not seen somehow.

adr3nal1n
Posts: 4
Joined: 2018-09-17 11:49

Re: SSD slower connected via SATA 6Gbps than UASP USB3

#3 Post by adr3nal1n »

Yeah, I think you are right, maybe it's just a quirk with what hdparm is showing in terms of results.

I have tried the same tests again using kernel 4.18 via a live CD boot and the hdparm results are the same.

Also tried the same tests in debian stretch after changing the BIOS setting for the SATA controller from AHCI to IDE but no difference in results.

Must be just one of those things.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: SSD slower connected via SATA 6Gbps than UASP USB3

#4 Post by p.H »

CwF wrote:There must be some caching / buffering not seen somehow.
What you are describing is filesystem operation, using buffers, pagecache and so on.
hdparm uses direct block device operation and flushes the buffers before the test.
adr3nal1n wrote:Also tried the same tests in debian stretch after changing the BIOS setting for the SATA controller from AHCI to IDE but no difference in results.
IDE mode adds an extra emulation layer for compatibility, it cannot be faster than AHCI.

146 MB/s looks very close to the SATA 1.5Gbit/s limit (150 MB/s). Can you check in the kernel logs if the negotiated speed is actually 6 Gbit/s ?

adr3nal1n
Posts: 4
Joined: 2018-09-17 11:49

Re: SSD slower connected via SATA 6Gbps than UASP USB3

#5 Post by adr3nal1n »

Hi,

dmesg shows "ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)" for the SSD connect to port 1 (ata1)

Thanks very much for any advice.

adr3nal1n
Posts: 4
Joined: 2018-09-17 11:49

Re: SSD slower connected via SATA 6Gbps than UASP USB3

#6 Post by adr3nal1n »

Maybe this is a non-issue, as I have just ran 1 hdparm test after another in quick succession and below is the output recieved:


sudo hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 436 MB in 3.00 seconds = 145.16 MB/sec

$ sudo hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 738 MB in 3.00 seconds = 245.69 MB/sec

$ sudo hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 784 MB in 3.02 seconds = 259.33 MB/sec

$ sudo hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 810 MB in 3.00 seconds = 269.64 MB/sec

$ sudo hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 842 MB in 3.00 seconds = 280.64 MB/sec

$ sudo hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 798 MB in 3.00 seconds = 265.86 MB/sec

$ sudo hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 828 MB in 3.02 seconds = 274.24 MB/sec

sudo hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 856 MB in 3.00 seconds = 284.99 MB/sec

$ sudo hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 902 MB in 3.00 seconds = 300.32 MB/sec

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: SSD slower connected via SATA 6Gbps than UASP USB3

#7 Post by p.H »

This is still much slower than when the SSD is connected on USB.

Post Reply