linux性能调整
vsftpd关闭DNS解析 加快登录验证
reverse_lookup_enable=NO
1,用户及进程打开文件数调整
ulimit -n #查看当前用户文件打开文件数限制
A,修改vim /etc/security/limits.conf
* soft nproc 16384* hard nproc 65535* soft nofile 8192* hard nofile 65535
B,将其加入系统启动自动加载
vim /etc/pam.d/login
session requried /lib64/security/pam_limits.so
加入后用户将无法从本地登录,对于redhat5.8
2,修改系统内核参数;
vim /etc/sysctl.conf
fs.file-max = 6815744fs.aio-max-nr = 1048576net.ip_local_port_range = 9000 65535net.ipv4.ip_local_port_range = 1024 65000net.core.rmem_max = 16777216net.core.wmem_max = 16777216net.ipv4.tcp_rmem = 4096 87380 16777216net.ipv4.tcp_wmem = 4096 65536 16777216net.ipv4.tcp_fin_timeout = 30net.core.netdev_max_backlog = 30000net.ipv4.tcp_no_metrics_save=1net.core.somaxconn = 262144net.ipv4.tcp_syncookies = 1net.ipv4.tcp_max_orphans = 262144net.ipv4.tcp_max_syn_backlog = 262144net.ipv4.tcp_synack_retries = 2net.ipv4.tcp_syn_retries = 2
3,修改linux文件时间戳功能(如果不是必须需要可将其关闭)
vim /etc/fstab
UUID=7e81fa0c-1946-43fc-a112-eb3575e59de8 / ext4 defaults,noatime,nodiratime 1 1UUID=e0f5c129-097a-4761-b70f-b0900d839135 /boot ext4 defaults,noatime,nodiratime 1 2
4,关闭IPV6
vim /etc/sysconfig/network
NETWORK_IPV6=no
vim /etc/modprobe.d/ipv6off.conf
alias net-pf-10 offalias ipv6 offoptions ipv6 disable=1
export JAVA_HOME=/usr/jdk64/jdk1.7.0_45export JRE_HOME=$JAVA_HOME/jreexport PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
export JAVA_HOME=/usr/local/jdk1.16export JRE_HOME=$JAVA_HOME/jreexport CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/libexport PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$HOME/bin:$PATH