You are not logged in.
As the title states I am thinking of mounting the maps directory of Warcraft 3 to ram. My hope is that this will make my load times almost instant. Just wondering if there is something I overlooked, or if this will not work.
Offline
Note: I've never done this, so everything below is just speculation.
Assuming War3 expects to find the maps at /path/to/maps/ I'd move the contents of that folder somewhere else (for permanent storage), then I'd create a ramdisk (no idea how, exactly) and mount it to /path/to/maps/
Then I'd have to copy the maps to /path/to/maps/
War3 should now get the maps straight from ram.
All this should be automated somehow with a script, possibly launching War3 when it's done copying.
Offline
Note: I've never done this, so everything below is just speculation.
Assuming War3 expects to find the maps at /path/to/maps/ I'd move the contents of that folder somewhere else (for permanent storage), then I'd create a ramdisk (no idea how, exactly) and mount it to /path/to/maps/
Then I'd have to copy the maps to /path/to/maps/
War3 should now get the maps straight from ram.All this should be automated somehow with a script, possibly launching War3 when it's done copying.
Ya, I was gonna follow the mount firefox's temp files to ram guide.
Offline
Ok I came up with this but it doesn't seem to be working (no loading speed difference). I also upgraded the size to 400mb and copied 2 tv shows there and my ram usage didn't budge. Here is what I have:
rm -R '/home/phil/.wine/drive_c/Program Files/Warcraft III/Maps/FrozenThrone/'*
sudo mount -t tmpfs -o size=40M,nr_inodes=10k,mode=0777 tmpfs '/home/phil/.wine/drive_c/Program Files/Warcraft III/Maps/FrozenThrone/'
cp '/home/phil/.wine/drive_c/Program Files/Warcraft III/FrozenThroneMaps/'* '/home/phil/.wine/drive_c/Program Files/Warcraft III/Maps/FrozenThrone/'
wine '/home/phil/.wine/drive_c/Program Files/Warcraft III/Frozen Throne.exe' -opengl
rm -R '/home/phil/.wine/drive_c/Program Files/Warcraft III/Maps/FrozenThrone/'*
sudo umount '/home/phil/.wine/drive_c/Program Files/Warcraft III/Maps/FrozenThrone/'
cp '/home/phil/.wine/drive_c/Program Files/Warcraft III/FrozenThroneMaps/'* '/home/phil/.wine/drive_c/Program Files/Warcraft III/Maps/FrozenThrone/'
Offline
Alright, here is what I tried:
[phil@fml ~]$ sudo mount -t ramfs -o size=850M,nr_inodes=10k,mode=0777 ramfs '/home/phil/test/'
[phil@fml ~]$ cp ~/videos/american.pie.book.of.love.avi ~/test/
[phil@fml ~]$ df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda2 ext4 12G 8.5G 2.5G 78% /
none tmpfs 1013M 244K 1013M 1% /dev
none tmpfs 1013M 0 1013M 0% /dev/shm
/dev/sda3 ext4 564G 193G 343G 37% /home
/dev/sda1 ext4 99M 26M 68M 28% /boot
tmpfs tmpfs 1013M 20K 1013M 1% /tmp
hrmmm....
[phil@fml ~]$ sudo mount -t tmpfs -o size=850M,nr_inodes=10k,mode=0777 tmpfs '/home/phil/test/'
[phil@fml ~]$ df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda2 ext4 12G 8.5G 2.5G 78% /
none tmpfs 1013M 244K 1013M 1% /dev
none tmpfs 1013M 0 1013M 0% /dev/shm
/dev/sda3 ext4 564G 194G 342G 37% /home
/dev/sda1 ext4 99M 26M 68M 28% /boot
tmpfs tmpfs 1013M 20K 1013M 1% /tmp
tmpfs tmpfs 850M 0 850M 0% /home/phil/test
[phil@fml ~]$ cp LYTS09.part* ~/test
[phil@fml ~]$ df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda2 ext4 12G 8.5G 2.5G 78% /
none tmpfs 1013M 244K 1013M 1% /dev
none tmpfs 1013M 0 1013M 0% /dev/shm
/dev/sda3 ext4 564G 194G 342G 37% /home
/dev/sda1 ext4 99M 26M 68M 28% /boot
tmpfs tmpfs 1013M 20K 1013M 1% /tmp
tmpfs tmpfs 850M 720M 131M 85% /home/phil/test
[phil@fml ~]$
still the ram usage didn't go up so it must be using my swap
Offline
Sorry for the triple post, but it is important info ( i think)
Ok, it actually does look like it is going to ram (my conky script just must not measure tmpfs mounts):
[phil@fml ~]$ sudo mount -t tmpfs -o size=850M,nr_inodes=10k,mode=0777 tmpfs '/home/phil/test/
[phil@fml ~]$ cp -R ~/music/Red\ Hot\ Chili\ Peppers/ ~/test/
[phil@fml ~]$ cp -R ~/music/Red\ Hot\ Chili\ Peppers/ ~/test/test
[phil@fml ~]$ cp -R ~/music/Red\ Hot\ Chili\ Peppers/ ~/test/test2
[phil@fml ~]$ df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/sdb2 ext4 12G 8.5G 2.5G 78% /
none tmpfs 1013M 244K 1013M 1% /dev
none tmpfs 1013M 0 1013M 0% /dev/shm
/dev/sdb3 ext4 564G 196G 340G 37% /home
/dev/sdb1 ext4 99M 26M 68M 28% /boot
tmpfs tmpfs 1013M 16K 1013M 1% /tmp
tmpfs tmpfs 850M 824M 27M 97% /home/phil/test
[phil@fml ~]$ free -om
total used free shared buffers cached
Mem: 2024 1974 50 0 12 1727
Swap: 6000 0 6000
[phil@fml ~]$ rm -R ~/test/*
[phil@fml ~]$ sudo umount /home/phil/test/
[phil@fml ~]$ free -om
total used free shared buffers cached
Mem: 2024 1379 645 0 14 1132
Swap: 6000 0 6000
So my conky script must just not update the ram usage on tmpfs mounts. Also it doesn't look like I got all my ram back. I was just hoping for more of a performance increase, but ohh well.
after a semi fresh boot here is my ram usage:
[phil@fml ~]$ free -om
total used free shared buffers cached
Mem: 2024 818 1206 0 57 495
Swap: 6000 0 6000
Last edited by Dethredic (2010-01-31 15:28:53)
Offline
I think tmpfs will only really use what it needs out of what you assign to the mount.
http://www.funtoo.org/en/articles/linux/ffg/3/
As for your posts: just edit your old post and adapt the information. The way you're doing it now a) unnecessarily bumps your topic and b) makes it a mess for people who want to help you. Also, conky is not what you should use to check your system's vitals. Not for stuff like this, at least.
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline