why is read and write so slow for 4k files?

BFG10K

Lifer
Aug 14, 2000
22,709
3,000
126
Virtually every storage medium (including RAM and CPU caches) handles sequential access better than random access.

The main reason is that prefetching/caching is extremely effective for sequential operations (spatial locality), while virtually useless for random access.

On top of this, the read/write arm has to physically move in mechanical HDDs.
 

BonzaiDuck

Lifer
Jun 30, 2004
16,110
1,723
126
When you see benchmarks for read and write speeds for drives the 4k is alwasy VERY slow speeds. Why?

Just off the top of my head, I'd always assumed that this was the difference between sequential file access -- with expected throughput usually presented in manufacturer and reseller spec sheets -- and random file access. Especially the random-write 4K tests are slowest.

Everybody looks at the 4K tests because they are the slowest scores in the benchtests. You'd even expect an SATA SSD to score below 100 MB/s, if that.
 

SelenaGomez

Member
May 30, 2016
92
3
11
So when choosing a drive for speed what is the most important to look at for benchmarks? Like some drives have very high sequential read and write but horrible 4k read and write vs a drive that is much lower sequential but has double the 4k speeds.
 
Feb 25, 2011
16,980
1,616
126
So when choosing a drive for speed what is the most important to look at for benchmarks? Like some drives have very high sequential read and write but horrible 4k read and write vs a drive that is much lower sequential but has double the 4k speeds.

It's not so much about the "4k" as it is about the "random."

Normal-person office use is generally like 70/30 sequential/random use. But the random is what you'll find yourself waiting for the most. (The computer has very little idea what you're going to want/need to read off the drive next, and random I/O is harder.)

Certain applications (multimedia editing/authoring, some gaming uses, etc.) are primarily sequential workloads.

So you just have to kind of buy the SSD that's best suited to your workload. In general, I'll go for random over sequential.
 

BonzaiDuck

Lifer
Jun 30, 2004
16,110
1,723
126
I always try to pick decent SSDs and HDDs, but for now -- this explains why I don't fret much over 4K test results. this is an HDD cached to a small SSD and then cached to 2GB of RAM under PrimoCache:

Anvil%20HDD-to-SSD-to-RAM.jpg


Here's my boot SSD cached to 3GB of RAM:

Anvil%20boot-SSD-to-RAM.jpg


Caching strategies get poo-poohed a lot here, and of course -- if something isn't already in the cache, the system has to go get it the first time at the transfer rate that prevails with the standalone device.

Works for me, though.
 

pitz

Senior member
Feb 11, 2010
461
0
0
Basically you can think of a SSD as being a filesystem which abstracts itself to the outside world as a block device.

When doing many small I/O operations, there is considerable filesystem overhead involved with allocation, lock operations, etc. These scale up with random I/O to an extent dramatically larger than with sequential I/O (where the drive can just put files on already empty blocks).

When SSDs are used for very, very long sequential writes, they end up slowing down dramatically as well.
 

TheELF

Diamond Member
Dec 22, 2012
4,027
753
126
Normal-person office use is generally like 70/30 sequential/random use. But the random is what you'll find yourself waiting for the most. (The computer has very little idea what you're going to want/need to read off the drive next, and random I/O is harder.)
Doesn't ssd wear leveling practically guarantee that ~100% of the workload will be random?
 

SelenaGomez

Member
May 30, 2016
92
3
11
I was looking to the m.2 2280 nvME stuff and it looks so insanely fast. But i hear that its useless with those speeds and that it actually makes booting up windows MUCH slower. Should i steer clear of that tech for now and get a Samsung 850 EVO or Pro instead?
 

coercitiv

Diamond Member
Jan 24, 2014
7,110
16,439
136
I was looking to the m.2 2280 nvME stuff and it looks so insanely fast. But i hear that its useless with those speeds and that it actually makes booting up windows MUCH slower. Should i steer clear of that tech for now and get a Samsung 850 EVO or Pro instead?
Go back to the thread you created on the subject, read it's entire contents, and find out the people who claimed NVMe drives are slow to boot could not substantiate those claims in the face of actual owners who told them otherwise.

My lowly TLC based NVMe drive cold boots Win 10 in 8.2 seconds. Is that fast enough for you?
 

coercitiv

Diamond Member
Jan 24, 2014
7,110
16,439
136
Doesn't ssd wear leveling practically guarantee that ~100% of the workload will be random?
Random refers to data location within the file system, not location of flash cells within the chips themselves.
 
Feb 25, 2011
16,980
1,616
126
I was looking to the m.2 2280 nvME stuff and it looks so insanely fast. But i hear that its useless with those speeds and that it actually makes booting up windows MUCH slower. Should i steer clear of that tech for now and get a Samsung 850 EVO or Pro instead?

Some of them do take a while to initialize when the BIOS is doing its pre-boot stuff. On the other hand, it makes everything else faster.

How often do you reboot your computer?
 

SelenaGomez

Member
May 30, 2016
92
3
11
Go back to the thread you created on the subject, read it's entire contents, and find out the people who claimed NVMe drives are slow to boot could not substantiate those claims in the face of actual owners who told them otherwise.

My lowly TLC based NVMe drive cold boots Win 10 in 8.2 seconds. Is that fast enough for you?

You seem angry. You should go for walk outside. It'll help.
 

SelenaGomez

Member
May 30, 2016
92
3
11
Some of them do take a while to initialize when the BIOS is doing its pre-boot stuff. On the other hand, it makes everything else faster.

How often do you reboot your computer?

The point is those speeds dont seem to make any difference in real world use from a regular fast SSD. Only in benchmarks. If it does I would like to buy one.
 

coercitiv

Diamond Member
Jan 24, 2014
7,110
16,439
136
You seem angry. You should go for walk outside. It'll help.
Whether I seem angry or not is not the point: read your own thread, people explain in it how their NVMe drives have no problem booting Windows at fast speeds.
 
Feb 25, 2011
16,980
1,616
126
The point is those speeds dont seem to make any difference in real world use from a regular fast SSD. Only in benchmarks. If it does I would like to buy one.
Yeah, I don't notice a difference either. (My laptop has one of those fancy PCI-E SSDs. My desktop... doesn't.)

It's up to you to know your workload well enough to know if the additional speed would actually matter.

If you have a laptop or a SFF PC with a dedicated "SSD Slot" (m.2 or whatever) then there's something to be said for using that slot, but if that's not an issue, yeah, I'd just buy whatever's cheaper.
 

BonzaiDuck

Lifer
Jun 30, 2004
16,110
1,723
126
Yeah, I don't notice a difference either. (My laptop has one of those fancy PCI-E SSDs. My desktop... doesn't.)

It's up to you to know your workload well enough to know if the additional speed would actually matter.

If you have a laptop or a SFF PC with a dedicated "SSD Slot" (m.2 or whatever) then there's something to be said for using that slot, but if that's not an issue, yeah, I'd just buy whatever's cheaper.

And that again gives me a base to press my own point. You have a pyramid of hardware storage. At the top, expensive, fastest and lowest capacity -- L1, L2, L3. A level down -- the RAM. Then, throwing in bus-speed, lanes available and used, persistent storage. If, after boot-up and your modicum of use, you have sacrificed boot-to-desktop delay with a double-digit hit-rate in RAM for file requests against disk, it's definitely an improvement in performance. Add the established use of a small SSD to cache one HDD (Intel ISRT) or several (Primocache), and you have a three-tiered caching of data from the cheapest, largest capacity, and slowest storage in the system -- at the bottom with HDDs.

And if you'd want to notice a the relative differences of nano-seconds between 1,000 MB/s from the more expensive device and your standard SSD, and up to 500 MB/s with a standard SSD and some point between that and the benchmark scores I posted, it's still and ever more so a measure of time that is imperceptible for many usages and applications. Of course, if I were correct that the SSD-caching of slug HDDs gave 80% of a good SATA SSDs performance, it all helps.

I guess the only way I'd buy one of the more expensive devices now that uses the largest number of PCIe lanes would be an overpowering of my need for them by my curiosity. And curiosity in $/GB costs too much.

Or I would have invested in a Z170, X99, Broadwell-E or its successor. I'll do that soon. I'll take longer looking for faster storage.
 
Last edited: