geekhack

geekhack Community => Off Topic => Topic started by: tp4tissue on Sun, 01 January 2023, 21:12:04

Title: why is sata faster than usb3
Post by: tp4tissue on Sun, 01 January 2023, 21:12:04
Have yall noticed spin HDDs run ~ 270MB/s on sata, but only ~210MB/s on usb3.0  external ?

Even though both ports should have more then enough bandwidth to cover the drive's peak


(https://i.imgur.com/SIzjGPt.gif)
Title: Re: why is sata faster than usb3
Post by: Coreda on Mon, 02 January 2023, 08:27:31
What kind of drives are you running to get 270MBps sequential speeds consistently?

I have some NAS-grade CMR 7200RPM drives that as per their specifications top out at 238MBps (which checks out with what I've seen over both SATA and USB depending on how I've had them connected). Though I feel like I've seen them creep a little above at times.
Title: Re: why is sata faster than usb3
Post by: tp4tissue on Mon, 02 January 2023, 09:08:19
wd 7200 redpro 18tb

it's not 270 across the whole disk, only the first 4-5TB. but it doesn't hit 270 at all on usb3
Title: Re: why is sata faster than usb3
Post by: Coreda on Mon, 02 January 2023, 09:42:38
wd 7200 redpro 18tb

it's not 270 across the whole disk, only the first 4-5TB. but it doesn't hit 270 at all on usb3

Maybe it's the USB controller being used. Quality can vary. I use AsMedia controllers for USB and haven't had issues with speed but then my Red Pros aren't the same capacity so haven't seen those much higher speeds to begin with.
Title: Re: why is sata faster than usb3
Post by: tp4tissue on Mon, 02 January 2023, 11:31:27
hrrrm, possible, would've thought 2020 controllers wouldn't have a limit on ubiquitous usb3.
Title: Re: why is sata faster than usb3
Post by: Leslieann on Mon, 02 January 2023, 12:13:00
Depending on USB version, chipset overhead can be as high as 20% (3-20%*) and if it's really old it can be single direction only (half duplex)**.

You have to go from usb to sata (3-20%), find the data, then convert back to usb (another 3-20%) and all of this depends on the sata implementation on that chipset. The SATA protocol itself is pretty well regulated, but how you get to that point is entirely open and USB is wiiiiide open (and manufacturers Lie). Don't forget drivers and cables also have an influence as does data size and platter location.

If you only lost 10% running sata over USB  versus direct, I'd be impressed.

* USB 3.0 is 20% overhead, 3.1 can be as low as  3%.
** USB 2.0 is only half duplex, USB 3.0 is full duplex but only if the drivers (for the USB device, not the chipset) are working properly.

Title: Re: why is sata faster than usb3
Post by: tp4tissue on Mon, 02 January 2023, 13:57:18
but the usb3 should be 500mb/s no ? even half should be higher.
Title: Re: why is sata faster than usb3
Post by: Leslieann on Tue, 03 January 2023, 10:56:40
Per wikipedia....
"When flow control, packet framing and protocol overhead are considered, it is realistic for 400 MB/s (3.2 Gbit/s) or more to transmit to an application."

500 is peak, without bit verification and such.
Title: Re: why is sata faster than usb3
Post by: PlayBox on Tue, 03 January 2023, 15:53:16
i think i had the actual usb speeds somewhere in my handbook but i can't check at 11pm
Title: Re: why is sata faster than usb3
Post by: PlayBox on Tue, 03 January 2023, 15:57:38
well i did check an usb 2 is theoretically 60MB/s but is 30MB/s write and 42MB/s read usb 3 is 600MB/s theoretically and indeed 400MB/s in reality