While caching does cause some of this, it is not the only factor. If caching were the only factor, then we would expect the write speed to quickly drop from several hundred MB/s to the drive's actual write speed very rapidly, and stay there for the rest of the write. However, this is not what I have observed when performing large transfers to and from the disk (e.g. burning boot images). Instead, what I observe is that the speed gradually decreases over the course of the entire operation.
This slowdown is caused by data remanence on the flash chip(s) used to store the data necessitating that some of the blocks be written to more than once.
Inside a flash chip, there are block of data that can be written to. When writing, there are only two things that the computer can do: it can erase an entire block, or change some (or all) of the bits in a block from 0 to 1.
However, some of those block are better than others, especially so in lower-quality flash drives, and as a result when writing new data to it, some of the bits can sometimes switch back to 0 by themselves right after being written, and don't change. Thus, when writing to a block, the OS needs to check to make sure that all of the data was written correctly, and if it wasn't it has to redo the block by writing the same data to the same block two or three times until the data sticks.
So, when your computer is writing a bunch of data to the flash drive, here is a (not completely accurate, but good enough) explanation for how it does that:
- Take the first set of blocks to be written, and write them all.
- Read back all of the blocks we just wrote, and make a list of the ones that don't match
- Write the next set of blocks, along with the ones that weren't written correctly last time.
- Repeat 2-3 until all of the blocks have been written correctly.
When the computer is writing to the drive, it is reporting the rate at which it is writing blocks to the drive for the first time. Since it will also have to rewrite earlier blocks at the same time, the total throughput that can be used for virgin blocks goes down as the number of rewrites that also need to happen increases. Thus, the apparent write speed decreases over time.