You are not logged in.
Pages: 1
i have 2g ram and only use <0.5g.
i remember some other distro ( like ubuntu ) have /dev/ram, but arch dose not.
how can i mount it on /tmp?
thanks a lot
Last edited by aaaaarch (2008-06-30 03:47:01)
Offline
Mr Green
Offline
i got this way, but the problem is no /dev/ram? file on my system!
so i wanna know how to enable /dev/ram? files.
Offline
use tmpfs, which I believe is better than ramfs
mount none ~/.thumbnails -t tmpfs -o size=20M
This is what I use for my .thumbnails directory
Offline
could any one help me?
Offline
Put this in /etc/fstab:
none /tmp tmpfs nodev,nosuid,noexec,nodiratime,size=1024M 0 0
Offline
This is what I use in /etc/fstab:
ramfs /mnt/ramdisk ramfs defaults 0 0
Offline
thanks, i've solved it
Offline
thanks, i've solved it
which is the solution...please share.
Offline
MrG's solution doesn't fit me, because no /dev/ram? on my system.
the solution for me is just like carlocci, lucke and Barrucadu said: mount "none" as tmpfs or ramfs.
you can choose anyone which can works on your system.
Offline
Put this in /etc/fstab:
none /tmp tmpfs nodev,nosuid,noexec,nodiratime,size=1024M 0 0
This is pretty cool, thanks for sharing it. Can one do this without an /etc/fstab entry via a bash script for example? What would the syntax be for using the mount command from the shell?
Last edited by graysky (2009-05-01 00:01:31)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
lucke wrote:Put this in /etc/fstab:
none /tmp tmpfs nodev,nosuid,noexec,nodiratime,size=1024M 0 0
This is pretty cool, thanks for sharing it. Can one do this without an /etc/fstab entry via a bash script for example? What would the syntax be for using the mount command from the shell?
# mount -t tmpfs -o nodev,nosuid,noexec,nodiratime,size=1024M none /tmp
You could also use size=50% (or any other value) to get a percentage of your RAM in a tmpfs.
Last edited by bangoskank (2009-05-01 09:40:24)
Offline
But does it really limit the maximum amount of ram it uses?
I like the idea of having a ramdisk, so far I haven't looked to much into it but this thread made me finally try it.
I've tried "mount -t ramfs -o size=256M none ramdisk" and I can write files bigger than 256M to ram .... am I missing something here? Ramfs should be the one that doesn't grow right?
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
I think that it will also use whatever /dev/shm has available too, Rookie. Maybe run a df -h after doing your test & see what it turns up?
Offline
I've been looking more into this and it seems that is the expected behavior of ramfs. tmpfs will use ram and swap if there isn't enough ram available but will limit the usage to the size specified in the mount options. tmpfs is also newer than ramfs so I guess it should be preferred over ramfs.
As I have 4G of ram and I don't use swap if I define a reasonable size for the ramdisk all should be ok. I intend to use a ramdisk to recompile stuff that takes longer to compile like the kernel or other big stuff, so 1G or 2G should be enough for that while still having more than enough ram for the system.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
Pages: 1