linux参数配置 发表于 2019-02-20 | 更新于 2019-03-04 | 分类于 linux linux参数配置 linux配置1234567891011121314151617181920[root@xxx ~]# vi /etc/security/limits.conf* soft nproc 2065651* hard nproc 2065651* soft nofile 65535* hard nofile 65535[root@xxx ~]# vi /etc/sysctl.confnet.ipv4.tcp_fin_timeout = 30net.ipv4.tcp_keepalive_time = 1200net.ipv4.tcp_syncookies = 1net.ipv4.tcp_tw_reuse = 1net.ipv4.tcp_tw_recycle = 1net.ipv4.ip_local_port_range = 1024 65000net.ipv4.tcp_max_syn_backlog = 8192net.ipv4.tcp_max_tw_buckets = 500vm.overcommit_memory = 2vm.overcommit_ratio= 85vm.zone_reclaim_mode=0fs.file-max=6553560[root@xxx ~]# sysctl -p oracle 64G服务器例子123456789101112131415161718192021222324252627282930[root@xxx ~]# echo "fs.aio-max-nr = 1048576fs.file-max = 6815744kernel.shmall = 7864320kernel.shmmax = 132212254720kernel.shmmni = 4096#semaphores: semmsl, semmns, semopm, semmnikernel.sem = 250 32000 100 128net.core.rmem_default=262144net.core.rmem_max=16777216net.core.wmem_default=262144net.core.wmem_max=16777216net.core.somaxconn=4096net.core.netdev_max_backlog=262144net.ipv4.tcp_max_syn_backlog=262144net.ipv4.tcp_max_tw_buckets=10000net.ipv4.ip_local_port_range = 9000 65500net.ipv4.tcp_tw_recycle = 1net.ipv4.tcp_syncookies = 1net.ipv4.tcp_tw_reuse = 1net.ipv4.tcp_synack_retries = 1net.ipv4.tcp_syn_retries = 1net.ipv4.tcp_fin_timeout = 30net.ipv4.tcp_keepalive_time = 3600net.ipv4.tcp_keepalive_intvl = 30net.ipv4.tcp_keepalive_probes = 3net.ipv4.tcp_mem = 786432 1048576 1572864vm.swappiness = 0vm.panic_on_oom = 1kernel.randomize_va_space=0" >>/etc/sysctl.conf mysql例子1234567891011121314vm.swappiness=1net.core.somaxconn = 65535net.ipv4.tcp_fin_timeout = 30net.ipv4.tcp_keepalive_time = 1200net.ipv4.tcp_syncookies = 1net.ipv4.tcp_tw_reuse = 1net.ipv4.tcp_tw_recycle = 1net.ipv4.ip_local_port_range = 1024 65000net.ipv4.tcp_max_syn_backlog = 8192net.ipv4.tcp_max_tw_buckets = 500vm.overcommit_memory = 2vm.overcommit_ratio= 85vm.zone_reclaim_mode=0fs.file-max=6553560 其他12345readahead设置(谨慎)[root@xxx ~]#blockdev --setra 16 /dev/sdb1noatime set[root@xxx ~]# vi /etc/fstab/dev/mapper/vg_data-lv_data /opt ext4 rw,noatime 1 2