Instead, what I observe is that the speed gradually decreases over the course of the entire operation. However, this is not what I have observed when performing large transfers to and from the disk (e.g. 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. While caching does cause some of this, it is not the only factor. As the disk gets fuller and fuller less contiguous free space is available and the file system has to work harder to find places to put your files. If you put the flash drive back in and inspect the file you'll see it's not all there.ĭisclaimer: These examples won't work if you don't have write caching enabled in your operating system/on the disk.įurther, if it's not disk caching at work then it's likely that what you're seeing is an effect of fragmentation. At this point in time your file is split between the disk and the cache - so the copy is "finished" as far as the operating system is concerned but the disk controller still needs to write what's left in the cache to the disk. Once this cache is full it must be flushed to disk - and now you're being bottlenecked by the slower disk.Įxample 1: The effect is really pronounced when you have a controller with a large cache (like good RAID5 controller) where ~500mb of data can be cached quickly before it must be flushed to the disk.Įxample 2: You can see the cache at play if you pull the flash drive out at the same time the file copy "finished". The 20mb/s you see is the data being written to the disk cache (usually quick but small memory). It has to do with the caching mechanism most operating systems and disks employ to speed up small writes. This behaviour is not specific to your flash drive, you can see this with hard drives as well.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |