ㄚ琪对于工作达人的效能可说是不遗余力的,为的就是让读者可以在有限的频宽中,还能享有舒适的浏览环境,不过这牵扯到很多地方的调校,像是读者浏览的环境、工作达人本身的Wordpress、PHP、MySQL、Apache,以及工作达人本身所使用的Ubuntu 12.04 Server版等等效能的调校,当然经过调校的工作达人ㄚ琪在工作时也会比较顺畅。
[adsense][/adsense]
这中间可说是错综复杂,有些并不是ㄚ琪短期间可以做到的,有些可以透过网路的搜寻查到一些资讯。
像今天ㄚ琪要介绍的Ubuntu效能调校,主要来自OverInfinity研究日志的Ubuntu效能调校(8.04),但因为这篇的调校其实有点偏旧,不符ㄚ琪现行的12.04 Sever版的设定,所以ㄚ琪特别另外标示出来,让各位可以清楚一下差异:
一、执行init.d(开机)时让多核心或hyper-threading(超执行绪)的CPU发挥同步处理功能
原先8.04建议这样设定:
$sudo gedit /etc/init.d/rc
CONCURRENCY=none 改成 CONCURRENCY=shell
但是12.04版有这样一段叙述:
# Specify method used to enable concurrent init.d scripts.
# Valid options are ‘none’ and ‘makefile’. Obsolete options
# used earlier are ‘shell’ and ‘startpar’. The obsolete options
# are aliases for ‘makefile’ since 2010-05-14. The default since
# the same date is ‘makefile’, as the init.d scripts in Debian now
# include dependency information and are ordered using this
# information. See insserv for information on dependency based
# boot sequencing.
CONCURRENCY=makefile
也就是说shell的设定已经废了,makefile或none是正确的设定。
二、RAM够大(比方说2GB)直接利用RAM不使用swap
这里建议不使用swap,但是ㄚ琪怕记忆体还是不够用,所以遵从别人的建议,设成20看看:
即时性设定:
$sudo sysctl -w vm.swappiness=20 (预设值60)
永久性设定:
$sudo gedit /etc/sysctl.conf
vm.swappiness=20
三、安装preload套件
ㄚ琪是安装server版的,其实满不想再想firefox或openoffice.org的,但是可能偶而也会用到吧,从善如流啰。
$sudo apt-get install preload
四、关闭ipv6以增加网路反应速度:
确实ㄚ琪也觉得到现在从没用过,改之改之:
$sudo gedit /etc/modprobe.d/blacklist
# disable ipv6
blacklist ipv6
这样的设定不知12.04版是否也是如此,ㄚ琪另外查到的设定是这样:
$sudo gedit /etc/sysctl.conf
新增
# IPv6 net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1
然后
$sudo sysctl -p
五、增加火狐浏览器顺畅度的小方法
目前ㄚ琪还没用到,所以不改。
六、降低kernel的最大执行绪(thread)上限(不一定有帮助)
既然有人说也帮助,ㄚ琪也猜没有帮助,那就算啰。
以上的调校先到此,如有先的进展或情况再来回报