SSD writing/reading speeds to and from other media

AlexMaxP

Commendable
Aug 28, 2016
15
0
1,510
Hello,

I started this thread because I want a better understanding of SSD ( and other media ) writing and reading processes.

Are the writing speeds being limited by reading speeds ?

For example, I heard this example : let's say you have a hard drive/SSD with the writing speed of 300 MB/s and reading speed of 400 MB/s, and you have an USB stick with the writing speed of 100 MB/s and reading speed of 50 MB/s ( don't mind the sequence/random speed, it's just a basic example ). If you copy a file from the USB stick to the hard drive/SSD, the writing speed of the hard drive/SSD will be limited by the reading speed of the USB. Meaning the transfer will be made with 50 MB/s. ( the example can be used vice-versa, when coping from SSD/HDD to USB, and using the reading speed for the SSD/HDD in this case ).

1. Is this true ? Does the process of transfer the data implies using both writing speed of the hard drive/SSD and the reading speed of the USB, culminating into limiting the transfer to 50MB/s ?

Then, if this is true 2. does this also apply when transferring files from a HDD to a SSD ? meaning the transfer will be limited to the reading speed of the HDD ?


Other questions I have are related to operations that imply using the writing speed on a SSD, like saving a file on SSD ( from the same SSD ), or duplicating a file on SSD. 3. These 2 operations imply using only the writing speed of the SSD ? or also the reading speed is involved , thus limiting the operation to the reading speed of the SSD ?

4. Also, can you please give me some examples of reading and writing speed process on a SSD/HDD and how this works ( what speeds are used, how and when ) .

Please try to answer as best and specifically as you can to questions stated above : 1, 2 ,3 and 4.
Thank you very much.

Alex.




 
Solution

USAFRet

Titan
Moderator
All speeds depend on the speed of the slowest.
Whether it be network, or just drive to drive.

An SSD may be able to read at 550Megabytes/sec. If the target HDD can only write at 150Megabytes/sec....that is it.
And the other way around.

Think of a 4 year old (HDD), reading a book to a MIT professor (SSD).
The data transfer can only go as fast as the 4 year old can read the book.
 

AlexMaxP

Commendable
Aug 28, 2016
15
0
1,510
Yeah. but when you do a writing on a SSD/HDD, like a saving a file, you use both reading speed and writing speed , and the process goes with the slowest of the speeds ? Can you state some example where you only use the writing speed/reading speed ? Or these go together all the time ? For example, when i boot up the computer , the SSD uses only the reading speed ?
 

USAFRet

Titan
Moderator


Booting up, that is mostly read speed.

An example might be copying a 4.5GB movie from the SSD to the HDD (or the other way).
Total time depends on the performance of the slowest device in the chain.
Copying between 2 SSD's would be faster.
 

AlexMaxP

Commendable
Aug 28, 2016
15
0
1,510
You still havent' answered my question : eah. but when you do a writing on a SSD/HDD, like a saving a file, you use both reading speed and writing speed , and the process goes with the slowest of the speeds ?
 

USAFRet

Titan
Moderator


Not sure what you're asking here.

Writing a file is writing a file
Reading is reading.

There is a little bit of both in each operation, but the 'read speed' has little to do with a write operation.
Not zero, but little.
 

Yes that's correct. If the fastest the USB stick can deliver data to the computer (and the SSD) is 50 MB/s, then the SSD can only write the data at 50 MB/s (the speed at which it is receiving it). It is not psychic - it cannot guess what data the USB stick will deliver to it in the future and write that at 300 MB/s.

Then, if this is true 2. does this also apply when transferring files from a HDD to a SSD ? meaning the transfer will be limited to the reading speed of the HDD ?
Yes.

Other questions I have are related to operations that imply using the writing speed on a SSD, like saving a file on SSD ( from the same SSD ), or duplicating a file on SSD. 3. These 2 operations imply using only the writing speed of the SSD ? or also the reading speed is involved , thus limiting the operation to the reading speed of the SSD ?
If you're writing a new file to the SSD (i.e. creating something out of memory or taking something in memory, and writing it to the SSD), then it will proceed at the SSD's write speed.

If you're copying an existing file on the SSD to a different location on the same SSD, then the SSD needs to first read the file (putting it in memory) at the SSD's read speed, then write the copy (from memory) at the SSD's write speed.

4. Also, can you please give me some examples of reading and writing speed process on a SSD/HDD and how this works ( what speeds are used, how and when ) .
Reading a file means first looking up its location in the file allocation table (FAT), or master file table (NTFS). This is like an index for the drive that lists each file name, and where on the drive the data for the file is stored (sector addresses). Once the drive knows where the data is, it goes ahead and reads it (moving the read/write heads on a HDD), then sends the data back to the computer.

Writing a file is similar. The FAT or MFT is queried to find a location on the drive with enough free space to contain the file data. A new entry is made in the FAT/MFT with the filename and the sector addresses which will be used. The data in the file is then written to those sectors. (Not necessarily in this order - different filesystems do this in a different order.)

There's usually also some file system overhead. The program sends a read or write request to the OS. The OS forwards that to the file system driver. The file system then converts that request into instructions for the HDD or SSD. Drives by themselves do not know about file systems, or a FAT/MFT. All they know is that they were told to read or write data to a certain location. Only the file system knows if that data was part of the FAT/MFT or data for a file. This overhead to look up info in the FAT/MFT is why 4k read/write speeds are so much slower than sequential read write speeds - a greater percentage of the read/write operation's time is taken up by this filesystem lookup overhead.

SSDs are a bit more complicated. Due to their memory cells wearing out with multiple writes, they implement something called wear leveling. They move around old data behind the scenes, so that those unused memory cells which had been holding old data become available for new writes. To do this, the sector numbers they present to the computer are fake. That is, on a HDD each sector number refers to a specific physical location on the drive. On a SSD, the sector number refers to a line in a table, which contains the specific physical location of the memory cell. When the SSD does wear leveling and moves data around, it updates the table so the sector entry in this table now points to the new physical memory cells containing the data.

SSDs also do a two-stage write operation. A HDD can overwrite a 1 with a 0, or vice versa. A SSD cannot. Simplifying a bit, a SSD's memory cell has three possible states - 0, 1, and erased. To overwrite a 1 with a 0 or vice versa, it must actually go 1 -> erased -> 0, or 0 -> erased -> 1. The erase step is very slow, nearly as slow as a HDD, so the SSD does it while it's idle. It directs new writes to memory cells which have already been pre-erased in this manner. This is why recovering deleted data from a SSD can be a lot tougher (if not impossible) on a SSD. This is why you're supposed to keep about 10%-20% of the SSD empty - so there is always a buffer of pre-erased memory cells ready for blazing-fast writes.
 
Solution

AlexMaxP

Commendable
Aug 28, 2016
15
0
1,510
If you're writing a new file to the SSD (i.e. creating something out of memory or taking something in memory, and writing it to the SSD), then it will proceed at the SSD's write speed.

Thank you for you detailed explanation. Can you please give me some example of writing on SSD by " creating something out of memory or taking something in memory, " ? thanks