4 ms·
> WARNING: PLEASE DO NOT RUN THIS CODE ON A HARD DRIVE, I'M NOT SURE HOW LONG IT WOULD TAKE. I USED A RAM DISK How much disk IO does this program generate? Why
by Retr0spectrum 9y ago
> WARNING: PLEASE DO NOT RUN THIS CODE ON A HARD DRIVE, I'M NOT SURE HOW LONG IT WOULD TAKE. I USED A RAM DISK
How much disk IO does this program generate? Why?
In any case, the OS should cache stuff and give similar performance to using a ramdisk, provided you have enough spare ram.
- juanpotato 9y agoFontforge doesn't have a function for loading svgs as glyphs from strings. Only files paths.
- 13of40 9y ago> the OS should cache stuff When I worked at Microsoft back in the 90's I inquired around building 26 as to why I couldn't create a ram disk on what was to become Windows 2000, and this was basically the answer. So yes, if caching doesn't solve this then caching hasn't been implemented correctly.
- MichaelGG 9y agoWhat if you're using a program that fsyncs? And the filesystem isn't just keeping writes cached and flushing only when full. So if I'm writing GB of temp files, I'm causing tons of disk load which may impact other programs. Can't seek to read while writing all my temp data...
- 13of40 9y agoThat's actually a good point.
- Dylan16807 9y ago> What if you're using a program that fsyncs? Remove the fsync or use libeatmydata. > So if I'm writing GB of temp files The kind that won't fit on a ramdisk in the first place? And this particular use case shouldn't need that.
- MichaelGG 9y agoThe scenario is I'm running a DB on the same system as temp program. Also, machines with many GB of ram are popular these days.
- Dylan16807 9y agoIf fsync on one file forces all other files to disk, then it is 100% an OS performance problem. If your temp files fit in ram along with running programs, then they should stay cached. A ramdisk should only be needed in edge cases where you want to manually force other things out of memory, or because you particularly want to avoid extra writes to disk. In general performance is supposed to be boosted just as much by caching.
- MichaelGG 9y agoIf your disk head is writing the temp file, then it can't be sitting idle waiting to fsync. And it'll eventually write as part of checkpointing.