想不到第一次開啟的速度不需要 2 秒,比已往快太多了,ram的速度比 hard drive快太多了...

有興趣的朋友也可以來玩玩看喔,目前都是在 /dev/shm下面compile軟體...

BTW...tmpfs 預設是掛載 ram的一半大小,您可以自行加大,但不要超過太多,以免系統用到 SWAP,這樣反而會變慢喔...

tmpfs /tmp tmpfs size=100m,mode=1777 0 0
阿信 寫:昨天將 /dev/shm 掛載的 tmpfs 加大到 768M(更改/etc/default/tmpfs),然後抓 firefly 的 Openoffice 裝在這個地方。
# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
# use almost no memory if not populated with files)
# Adding the following line to /etc/fstab should take care of this:
none /dev/shm tmp fsdefaults 0 0
moto 寫:關於 tmpfs 底下有完整的介紹:
[英文]Using the virtual memory (VM) filesystem and bind mounts
[簡體中文]使用虛擬內存(virtual memory,VM)文件系統和綁定安裝
antonyshen 寫:moto 寫:關於 tmpfs 底下有完整的介紹:
[英文]Using the virtual memory (VM) filesystem and bind mounts
[簡體中文]使用虛擬內存(virtual memory,VM)文件系統和綁定安裝
請問一下,光於上述聯結當中提到可以用如下指令
# mkdir /dev/shm/tmp
# chmod 1777 /dev/shm/tmp
# mount --bind /dev/shm/tmp /tmp
將 /tmp 掛在 /dev/shm/tmp 下面。這個做法看起來很酷,但在 Debian 當中,我該把這三行寫在哪裡好呢?總不會每次開機都得手動下這三個指令吧!?
阿信 寫:rc.local is obsoleted in recent debian version and won't support the BSD type.
moto 寫:阿信跟 yungyuc 講的是對的,請多利用 rcS 取代原來 rc.local
正在瀏覽這個版面的使用者:沒有註冊會員 和 1 位訪客