[[PageOutline]] = Performance Tuning = == System Performance Tuning : Memory == * Share Memory {{{ echo "kernel.shmall = 796917578" >> /etc/sysctl.conf echo "kernel.shmmax = 796917578" >> /etc/sysctl.conf echo "kernel.shmmni = 4096" >> /etc/sysctl.conf }}} == System Performance Tuning : File System == * /etc/security/limits.conf - 每個程序(process)可以開啟檔案的個數(number limits of open files per process) {{{ #!diff --- /etc/security/limits.conf 2010-02-22 11:29:11.000000000 +0800 +++ /etc/security/limits.conf.new 2010-02-22 11:28:33.000000000 +0800 @@ -49,4 +49,6 @@ #ftp - chroot /ftp #@student - maxlogins 4 +* soft nofile 8192 + # End of file }}} == I/O Performance Tuning : NFS == * NFS Tuning - /etc/fstab {{{ 192.168.0.111:/home /home nfs rw,bg,soft,intr,rsize=262144,wsize=262144 0 4 192.168.0.111:/opt /opt nfs ro,bg,soft,intr,rsize=262144,wsize=262144 0 4 192.168.0.111:/usr /usr nfs ro,bg,soft,intr,rsize=262144,wsize=262144 0 4 }}} == Network Performance Tuning == * TCP Tuning {{{ echo 262144 > /proc/sys/net/core/rmem_default echo 8388608 > /proc/sys/net/core/wmem_max echo 8388608 > /proc/sys/net/core/rmem_max echo "4096 87380 4194304" > /proc/sys/net/ipv4/tcp_rmem echo "4096 65536 4194304" > /proc/sys/net/ipv4/tcp_wmem }}} == Power Management == * 啟動 SATA ALPM 電源管理功能 - [http://packages.debian.org/powertop powertop] 提供之建議 {{{ echo min_power > /sys/class/scsi_host/host0/link_power_management_policy }}}