一些Linux内核参数

tech2022-07-16  180

kernel.shmmax = 343257572966     ------单个共享内存的最大值(bytes) kernel.shmall = 83803118             ------可用共享内存的总数量(页) kernel.shmmni = 4096                    ------系统共享内存段的数量

kernel.msgmni = 2878                     ------消息队列标识的最大数目 kernel.msgmax = 8192                     ------从一个进程发送到另一个进程的消息的最大长度(bytes) kernel.msgmnb = 65536                 ------一个消息队列的最大长度(bytes)

kernel.randomize_va_space = 0 ------ASLR (Address Space Layout Randomization) kernel.sysrq = 1                             ------System Request Key kernel.panic = 60                             ------panic error后自动重启等待时间 kernel.softlockup_panic = 1        ------检测到soft lockup时是否自动panic kernel.numa_balancing = 0            ------禁用NUMA Balancing kernel.unknown_nmi_panic = 1  ------系统行住时可以由硬件nmi触发panic kernel.nmi_watchdog = 0                ------检测内核中关中断死锁(也称硬死锁)的情况 kernel.core_uses_pid = 1            ------生成core文件,后缀带pid kernel.watchdog_thresh = 30        ------检测到soft lockup后系统自动panic的时间 kernel.printk = 4 4 1 7                ------控制printk的打印级别和优先级

vm.max_map_count = 100000000    ------一个进程可以拥有的VMA(虚拟内存区域)的数量 vm.nr_overcommit_hugepages=13 ------hugepage颗超额使用的page数

fs.file-max = 13631488                ------系统中可以同时打开的文件数目 fs.aio-max-nr = 3145728                ------并发未完成的异步请求数目 net.core.rmem_default = 4194304    ----接收套接字缓冲区大小的默认值 net.core.wmem_default = 262144        ----发送套接字缓冲区大小的默认值 net.core.rmem_max = 4194304                ----接收套接字缓冲区大小的最大值 net.core.wmem_max = 2097152                ----发送套接字缓冲区大小的最大值 kernel.pid_max = 400000                        ----系统可创建的进程数的数量 kernel.sem = 1024 60000 1024 256    ----信号集容纳最大信号数量、系统调用信号的最大数量、调用单个信号集中最大信号数量、信号集的最大值 vm.min_free_kbytes = 6291456            ----Linux VM最低保留空闲内存 vm.nr_hugepages=66560                            ----HugePage数量 vm.swappiness=10                                    ----开始使用swap的比例 net.core.somaxconn = 1024                    ----每一个端口最大的监听队列长度 net.ipv4.ip_local_port_range = 9000 65500  ------允许系统打开的端口范围 net.ipv4.ip_forward = 0 net.ipv4.conf.all.accept_redirects = 0 net.ipv4.conf.default.accept_redirects = 0 net.ipv4.conf.all.send_redirects = 0 net.ipv4.conf.default.send_redirects = 0 net.ipv4.conf.default.secure_redirects = 0 net.ipv4.conf.all.secure_redirects = 0 net.ipv4.tcp_max_syn_backlog = 1280 net.ipv4.conf.default.accept_source_route = 0 net.ipv4.conf.all.accept_source_route = 0 net.ipv4.conf.all.log_martians = 1 net.ipv4.conf.default.log_martians = 1 net.ipv4.icmp_echo_ignore_broadcasts = 1 net.ipv4.icmp_ignore_bogus_error_responses = 1 net.ipv4.tcp_syncookies = 1 net.ipv4.tcp_timestamps = 0 net.ipv6.conf.default.autoconf = 0 net.ipv6.conf.all.forwarding = 0 net.ipv6.conf.default.forwarding = 0 net.ipv6.conf.default.accept_redirects = 0 net.ipv6.conf.all.accept_redirects = 0 net.ipv6.conf.default.accept_source_route = 0 net.ipv6.conf.all.accept_source_route = 0 net.ipv6.conf.default.router_solicitations = 3 net.ipv6.conf.default.accept_ra = 0 net.ipv6.conf.all.accept_ra = 0 net.ipv6.conf.em1.accept_ra = 0 net.ipv6.conf.em2.accept_ra = 0 net.ipv6.conf.em3.accept_ra = 0 net.ipv6.conf.em4.accept_ra = 0

net.ipv6.conf.default.dad_transmits = 1 net.ipv6.conf.default.accept_dad = 2 net.ipv6.conf.default.max_addresses = 1 net.ipv6.conf.default.disable_ipv6 = 1

net.ipv4.conf.all.rp_filter = 0 net.ipv4.conf.default.rp_filter = 0 net.ipv4.conf.all.accept_local = 1 net.ipv4.conf.em1.rp_filter = 1 net.ipv4.conf.em2.rp_filter = 1 net.ipv4.conf.em3.rp_filter = 1 net.ipv4.conf.em4.rp_filter = 1

net.ipv4.conf.all.rp_filter = 0 net.ipv4.conf.ib0.rp_filter = 0 net.ipv4.conf.ib1.rp_filter = 0

net.ipv4.neigh.ib0.locktime = 0 net.ipv4.conf.ib0.arp_ignore = 1 net.ipv4.conf.ib0.arp_accept = 1 net.ipv4.neigh.ib0.base_reachable_time_ms = 10000 net.ipv4.neigh.ib0.delay_first_probe_time = 1

net.ipv4.neigh.ib1.locktime = 0 net.ipv4.conf.ib1.arp_ignore = 1 net.ipv4.conf.ib1.arp_accept = 1 net.ipv4.neigh.ib1.base_reachable_time_ms = 10000 net.ipv4.neigh.ib1.delay_first_probe_time = 1 net.ipv4.conf.ib0.accept_local = 1 net.ipv4.conf.ib1.accept_local = 1  

最新回复(0)