some questions to /dev/shm (ramdisk)

Ralf Mardorf kde.lists at yahoo.com
Sat Nov 27 20:49:12 UTC 2021


>Lentes, Bernd <bernd.lentes at helmholtz-muenchen.de> ezt írta (időpont:
>2021. nov. 22., H, 14:53):
>> we'd like to use /dev/shm (ramdisk) to copy there some big raw data
>> files (several GB) which are accessible afterwards much faster than
>> from disk. Some questions to ramdisk:
>>
>> Is the size of the ramdisk listet in fstab reserved ? E.g. i have a
>> ramdisk of 10GB in fstab, these 10GB are lost for all other types of
>> memory, despite the fact how much of the ramdisk is really used ?

Hi,

for some obscure reason Ubuntu seems to exclude the man page.

Arch Linux:
[rocketmouse at archlinux ~]$ man tmpfs | grep "only as much physical memory and swap space as is required"
       *  The filesystem consumes only as much physical memory and swap space as is required to store the current contents of the filesystem.

https://man7.org/linux/man-pages/man5/tmpfs.5.html :
"*  The filesystem consumes only as much physical memory and swap
          space as is required to store the current contents of the
          filesystem."

In my experiences using sawp, if tmpfs runs out of memory, doesn't work.
In my experiences tmpfs doesn't necessarily speed up processes. While
file access by tmpfs might be even faster than SSD file access, the time
required to compile bloatware is the more or less the same when using a
HDD, a SSD or tmpfs on my machine.
However, I'm using tmpfs a lot, but not to increase speed.

Regards,
Ralf




More information about the ubuntu-users mailing list