1

I thought I've read somewhere that you can take a slice of RAM and turn it into a partition with a FS on it and everything. What is the relevant terminology and the tools to accomplish this?

I need this to seemlessly (from the POV of an application) optimize the access to some files.

1 Answer 1

2

That is true. There are several options for that, depending on your needs.

The two filesystems types to do that are ramfs and tmpfs. See this page for information on their differences and how to use them.

Beware though (if that is not obvious) that data are such partitions cannot be persistent. On reboot, all data is lost.

3
  • "if that is not obvious" good one. I used "volatile" in the title, dammit! :D +1 and accepted. Thanks :-)
    – Flavius A
    May 27, 2011 at 7:21
  • 2
    @Flavius A - also note that most systems already have a tmpfs mounted at /dev/shm (in the linked article too), and set to a size of 50% of the system RAM.
    – JimB
    May 27, 2011 at 14:39
  • Great point @JimB. /dev/shm is indeed very practical for volatile data to be stored in RAM.
    – raphink
    May 27, 2011 at 14:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .