为什么80%的码农都做不了架构师?>>>
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 = 6815744
fs.aio-max-nr = 1048576
net.ip_local_port_range = 9000 65535
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
net.ipv4.tcp_fin_timeout = 30
net.core.netdev_max_backlog = 30000
net.ipv4.tcp_no_metrics_save=1
net.core.somaxconn = 262144
net.ipv4.tcp_synCOOKIEs = 1
net.ipv4.tcp_max_orphans = 262144
net.ipv4.tcp_max_syn_backlog = 262144
net.ipv4.tcp_synack_retries = 2
net.ipv4.tcp_syn_retries = 2
3,修改linux文件时间戳功能(如果不是必须需要可将其关闭)
vim /etc/fstab
UUID=7e81fa0c-1946-43fc-a112-eb3575e59de8 / ext4 defaults,noatime,nodiratime 1 1
UUID=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 off
alias ipv6 off
options ipv6 disable=1
export JAVA_HOME=/usr/jdk64/jdk1.7.0_45
export JRE_HOME=$JAVA_HOME/jre
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
export JAVA_HOME=/usr/local/jdk1.16
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$HOME/bin:$PATH