Quantcast
Channel: Creating a ram disk on Linux - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 9

Answer by J.K. Alooud for Creating a ram disk on Linux

0
0

"Linux is very efficient in using RAM. There is little surprise that you see little if any speedup with tmpfs. The largest pieces to read into memory (and thus able to slow the process down) "

I'm not sure that the OP asked for a debate on why or why not to use a ramdisk in the first place. The Lazy Mans' Tech-Support Groups' stock answer: "...you don't need to be doing that in the first place".

Maybe a slightly-different perspective will help here, where someone a) competently answers the question b) doesn't judge the issue.

https://www.linuxbabe.com/command-line/create-ramdisk-linux

I found that to be very direct & to the point, with some actual benchmark data. But it's always nice to check with SE as it is like watching the View after the morning news broadcast. I'm sure to get a broad perspective on the issues of the day. The efficiency of the memory management of Linux is not the issue. The issue is to avoid having "valuable" data flushed to drive by the sheer fact that the system touches a high percentage of disk data. When you want to lock that data in RAM for maximum performance a ramdisk is the way to go. When you need faster random disk i/o, the answer is to increase disk bandwidth or disk parallelization, where a larger cache and faster disk hardware make more sense than a ramdisk. The question is at what size of a ramdisk, and what rate of accessing what files, does it make more sense to just let the OS allocate the memory to a disk cache. Assuming of course that the OS doesn't let efficiency take precedence over performance. Always, sometimes, never, these all depend on how much and how often? Can the thoughtful user or administrator beat a generic auto-tuning disk cache? Food for thought!


Viewing all articles
Browse latest Browse all 9

Latest Images

Trending Articles





Latest Images