Tuesday, August 7, 2012

create ramdisk on Ubuntu


很簡單,只要兩步驟而已


mkdir -p /tmp/ram
sudo mount -t tmpfs -o size=512M tmpfs /tmp/ram/

當然,也可以直接把他寫進去 /etc/fstab


要把 google-chrome 的 cache 放進去 ramdisk 的話,可以用 soft link

rm -r ~/.cache/google-chrome
ln -s /tmp/ram/ ~/.cache/google-chrome



拿來掛 megnet link 做實驗,速度可以衝到每秒 7M... 超爽




Reference:

http://ubuntublog.org/how-to-create-ramdisk-linux.htm
http://www.linuxscrew.com/2010/03/24/fastest-way-to-create-ramdisk-in-ubuntulinux/
http://ubuntuforums.org/showthread.php?t=1772492

No comments:

Post a Comment