Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 2465  / 1 Year ago, mon, april 3, 2023, 8:53:18

I followed this post to create a ramdisk. After that, when I copy a file to the directory, the file was copied, but memory usage as shown in gnome-system-monitor does not increase. Also, I tried reading the copied file from that directory but the speed is still as slow as reading a disk file. What did I do wrong?



EDIT:



I was wrong and the ramdisk (with either tmpfs or ramfs) had the files in memory. The free -m command does show this, while the gnome-system-monitor will not show it. Also ramfs popup as a mounted drive in nautilus but tmpfs does not.



However, in my case I need to do chmod on the ramdisk folder before I can copy files in, even if the ramdisk mount folder is in my home directory.


More From » ram

 Answers
1

The post in question uses tmpfs, which means it uses a combination of ram and swap. You may want to look into ramfs instead as it only uses ram space. I would imagine the command is similar. You could also use ramdisk which creates a virtual device that you can apply a filesystem to and everything.



Sources:




"tmpfs will use swap space when neccessary"




source = https://stackoverflow.com/questions/7242484/can-i-over-run-the-tmpfs-size




"If you compare it to ramfs (which was the template to create tmpfs)
you gain swapping and limit checking."




source = www.kernel.org/doc/Documentation/filesystems/tmpfs.txt




"The memory used by tmpfs grows and shrinks to accommodate the files it contains and can be swapped out to swap space"




source = http://en.wikipedia.org/wiki/Tmpfs




"Tmpfs uses swap, where as Ramfs doesn't."




source = What is the difference between tmpfs and ramfs


[#26390] Tuesday, April 4, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
learty

Total Points: 432
Total Questions: 115
Total Answers: 109

Location: Wallis and Futuna
Member since Tue, Mar 30, 2021
3 Years ago
learty questions
Sat, May 21, 22, 15:30, 2 Years ago
Sun, Jan 9, 22, 22:31, 2 Years ago
Mon, Jul 4, 22, 11:31, 2 Years ago
Tue, Mar 22, 22, 16:28, 2 Years ago
;