Help needed about CPU vs SATA and USB 3.0 speed

Status
Not open for further replies.

foxclab01

Beta member
Messages
4
Hello to everybody in the forum.

Here is a question I have and I cannot answer it. It is a theoritical and not a practical question, but it still bothers me :

Why is it possible for ( any ) SATA and for USB 3.0 to function? I think that these protocols …should just not be able to work!

Let me explain myself :

Let's take a really fast CPU, one that is clocked in 3,6GHz. The CPU needs from 1 up to 4 clock cycles to form a command in machine language, right? So, in the worst case scenario, this CPU can execute 3,6 / 4 = 0,85 billion commands per second or, if you prefer, 850 millions commands per second.

So far, so good. But let's see now the USB 3.0 protocol. This new protocol can transfer 5Gbits per second. Since one CPU command is needed for every bit transfer, we need 5 billion commands per second to be handled by the CPU, in order to make USB 3.0 to work. This is just not possible. In fact, nothing that needs more than 850 million commands per second should work.

I understand that PCI express protocol is another story, because there the bus is handled by hundreds of small processors inside the graphics card and these processors work in parallel, handling the PCI express lines all together.

But what about SATA and USB 3.0? Why on earth are they able to work?? …..I must have a mistake in my calculations, but I do not know where…. 

Can anybody help?
 
Not sure about USB, but SATA works in serial, a CPU only works with parallel data. So, lets take a CPU, lets say it has 8 lanes of traffic it can process at one time, the SATA bus works in serial, single lane of traffic. That single lane will fill that 8 lines of traffic really fast, the processor handles the 8 bits then moves onto the next 8. Also, the CPU doesn't handle ALL the data, a lot of the work, the controller, or chipset will handle and pass in/out of ram.

Lets take USB for example, you want to move data from the USB drive, to your hard drive. Your processor will tell the controller to send it straight to the HDD, very little CPU processing is needed in this case, the same is true when loading into RAM.

It's kind of hard to explain, but not all data is truely handled by the processor, a LOT of it is on the controller card, or chipset. This is why your north/south bridge chipsets get so hot today, they usually have a USB controller, PCIe controller and SATA controller built in, passing huge amounts of data along, while it never really comes into contact with the CPU.

BUT, the CPU still works with those devices, so if you have a slower CPU, you will bog the CPU down, due to the other devices. If I am not mistaken USB is also, serial, and not parallel, which helps with speed. PCIe is also serial data.
 
Thank you for your very helpful answer. I think I get the picture now.

Searching in the web, I found that real-life tranfer rate for the USB 3.0 is about 100 megabytes / sec, or 800 megabits / sec if you prefer ( far lower than the theoritical maximum of 4,8 gigabits of course ). But these real life tests had to do with data transfer that included hard disk, and of course there were the limitations of the disks rpm etc.

So, does anybody know or have tested how fast is the real transfer rate of USB 3.0 when hard disks are not involved? ( for example, accessing the USB port for serial data transfer through a software program ). I do not expect 4,8 gbits / sec of course, but not as slow as 800 mbits / sec neither. Is my assumption correct, or in the case of the software program, because now the CPU DOES interfere, there is the limitation of the CPU clock?

Thank you all again.
 
Well, I am unsure how to answer that, but, if you can find a demo of someone with USB 3.0 where the device it self can max out the bus, and the person has a set of solid state drives, then we could easily see how fast it truely is. Again, there are all sorts of things that can limit it, as your going from controller to ram, back to another controller, then to the hard disk. Or, if your really lucky, the data will just go from the device straight to the SSD. I think what would limit USB 3.0 the most is the actual device that is connected to it, as very few jump drives have such high transfer rates.
 
Status
Not open for further replies.
Back
Top Bottom