| 10 | * 設定預設 SWAP 掛載路徑 |
| 11 | {{{ |
| 12 | #!sh |
| 13 | # /etc/dphys-swapfile - user settings for dphys-swapfile package |
| 14 | # author Neil Franklin, last modification 2006.09.15 |
| 15 | # copyright ETH Zuerich Physics Departement |
| 16 | # use under either modified/non-advertising BSD or GPL license |
| 17 | # this file is sourced with . so full normal sh syntax applies |
| 18 | |
| 19 | # where we want the swapfile to be, this is the default |
| 20 | CONF_SWAPFILE=/var/lib/hadoop/swap |
| 21 | |
| 22 | # size we want to force it to be, default (empty) gives 2*RAM |
| 23 | # CONF_SWAPSIZE=2048 |
| 24 | |
| 25 | ## |
| 26 | # Give yourself three times the memory size of swap? |
| 27 | # |
| 28 | # mem=$(grep MemTotal /proc/meminfo |awk '{print $2}') |
| 29 | # CONF_SWAPSIZE=$(expr $mem \* 3) |
| 30 | # |
| 31 | }}} |
| 32 | * 將 dphys-swapfile 加入預設起始程序。[注意] 由於 drbl-hadoop-mount-disk 必須在 dphys-swapfile 之前執行,預設 update-rc.d script defaults 都會加到 S20,會造成 dphy-swapfile 比 drbl-hadoop-mount-disk 早執行,將造成開機後找不到 swapfile 的問題。 |