linux:/etc/sysctl.conf

来源:互联网 发布:北京精雕编程系统 编辑:程序博客网 时间:2024/05/03 19:46

vim /etc/sysctl.conf


# Kernel sysctl configuration file for Red Hat Linux
#
红帽linux系统内核控制配置文件
# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and

对于二进制值,0禁用,1启用,更多信息,查看 sysctl(8) 和 sycctl(5) 
# sysctl.conf(5) for more details.


# Controls IP packet forwarding

控制ip转发,0表示禁用,1表示启用
net.ipv4.ip_forward = 0


# Controls source route verification

 控制源路由校验,0表示禁用,1表示启用
net.ipv4.conf.default.rp_filter = 1


# Do not accept source routing

不接受源路由,0表示禁用,1表示启用
net.ipv4.conf.default.accept_source_route = 0


# Controls the System Request debugging functionality of the kernel

控制内核系统请求调试功能,0表示禁用,1表示启用
kernel.sysrq = 0


# Controls whether core dumps will append the PID to the core filename.

是否控制根据PID转存内核文件
# Useful for debugging multi-threaded applications.

对于多线程程序有用,0表示禁用,1表示启用
kernel.core_uses_pid = 1


# Controls the use of TCP syncookies

TPC同步cookies的控制,0表示禁用,1表示启用
net.ipv4.tcp_syncookies = 1


# Disable netfilter on bridges.

桥接的网络过滤禁用,0表示禁用,1表示启用
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0


# Controls the default maxmimum size of a mesage queue

控制默认的消息队列的最大值
kernel.msgmnb = 65536


# Controls the maximum size of a message, in bytes

以字节为单位控制消息的大小
kernel.msgmax = 65536


# Controls the maximum shared segment size, in bytes

以字节为单位控制共享段的最大值

对于oracle来说,该缺省值太低了,通常将其设置为2G。
kernel.shmmax = 4294967295


# Controls the maximum number of shared memory segments, in pages

在页面控制共享内存段的最大值
kernel.shmall = 268435456 

########以上是系统安装完毕后的默认值

#shmmni:这个内核参数用于设置系统范围内共享内存段的最大数量。该参数的默认值是 4096 。通常不需要更改。

kernel.shmmni= 4096

#shmall:该参数表示系统一次可以使用的共享内存总量(以页为单位)。缺省值就是2097152,通常不需要修改。

kernel.shmall=2097152

#sem:该参数表示设置的信号量。

kernel.sem=25032000100128

#file-max:该参数表示文件句柄的最大数量。文件句柄设置表示在linux系统中可以打开的文件数量。

kernel.file-max=65536

     配置 Linux 内核参数修改后不用重启动更新: /sbin/sysctl -p

0 0
原创粉丝点击