2 ms·
Yes, usually it still most be copied, because on-disk data structures are generally historical relics optimized for HDDs and therefore don't map directly to in-
by tristor 5y ago
Yes, usually it still most be copied, because on-disk data structures are generally historical relics optimized for HDDs and therefore don't map directly to in-memory data structures. Loading from disk to RAM generally isn't just a copy operation, but requires some sort of processing for most applications.
Intel was doing some interesting work with Optane in this area, using performant SSDs with large RAM caches as DIMMs, seen by the system as memory, but able to be controlled via drivers to act as disks. There's obviously a place at a certain point to blur the lines. The biggest challenge is RAM is not persistent, disk is persistent, and that implies many things both for data structures as well as for how we interact with it and what sort of constraints we can assume.
The nice thing about good RAM disk software is that it's a bit-for-bit representation in memory persisted to disk, which means at least once it's loaded into RAM any processing becomes your only real limiting factor for the copying required to load a file.
- knome 5y ago>Yes, usually it still most be copied I don't think this would be true for linux. since linux's page cache is unified across all mounted file systems, and with linux's tmpfs using the page cache directly for storing files, it doesn't make much sense that it would need to copy files for use. if you formatted and mounted some other filesystem into the ram, sure. but tmpfs should avoid any such issue.