??????治????????????Linux?????????????
???????????? ???????[ 2013/6/21 13:41:24 ] ????????
????????????????治?????????????????????е?????????????????????????е??????á???Щ????????????????Щ??????????????????????Щ??????????????浽Swap????У??????Щ???????????????Swap?л????????????????С?????????????????????治??????????Swap???????????SWAP ?????????????á?
???????н??????????С???????????????????????????????????????????????????????????????????????SWAP??????????????沢??????????????t???????????????????????swap???????????????????????
# cat /proc/sys/vm/swappiness
60
???????????swappiness????60?????????????swap???????60%???????????????????е?cache/buffers??swappiness=0 ?????????????????????棬??????swap???swappiness??100 ????????????????swap?????????????????????????????swap??????檔
?????????????????涯?????????G?????????????????????????????Щ???ò?????????????????????棬????????swap?????????????????????????
# echo 10 > /proc/sys/vm/swappiness
????????
# sysctl vm.swappiness=10
vm.swappiness = 10
# cat /proc/sys/vm/swappiness
10
?????????????????Ч??????????????????????????????60????????????????????Ч????????????????/etc/sysctl.conf??
# echo 'vm.swappiness=10' >>/etc/sysctl.conf
????????????????Ч??????У?
# sysctl -p
?????????????????????
??????Red Hat????????????????????????С????????????????С??????????????????????С??2GB???????????У???????????С????????????С???????????????С????2GB????????????С?????????????С????2GB???????????????е??????????? ??????????????????????????????????С?????????GB??????????????????
??????????Gentoo?б???webkit-gtk-1.10.2-r300?????????????????С???????????
collect2: ld termiinated with signal 9 [Killed]
???????Google?????????????????????????л??????????????????????????????????????檔?????????????????????????????Linux?е????????????????????????????????????????????? ????????????????????????????????????飺Linux???????????????С??????????1-2??????????????????????????Щ???????????Linux??????????д??????????????????????????????????????Ρ???δ???????????????仹???п?????л????????????????????÷??????????????????????????????????????????п??????????????????????????—??y?????????????????????????????????y???????????????????
?????????????????????????????????????????????е??????????1G?????н?????????С??500M????????????????????????????????????????????С?1G?????????????????
$ sudo dd if=/dev/zero of=/var/tmp/swap bs=1k count=1024000
?????????1024000+0 ?????
?????????1024000+0 ??д??
????1048576000???(1.0 GB)??????5.07655 ??207 MB/??
??????????/var/tmp·????????????swap????С?1G???????????÷?????????1024000????????block)???????????С?1K???????????????????????????????????????
$ sudo mkswap /var/tmp/swap
???????????????????????
$ sudo swapon /var/tmp/swap
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11