学海网 文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > IT/计算机 > 一篇微调linux内核设置的好文

一篇微调linux内核设置的好文

请勿在未经授权的情况下上传任何涉及著作权侵权的文档,除非文档完全由您个人创作 "版权提示"页面可帮助您确定您的文档是否侵犯了他人的版权 点击上传文档即表示您确认该文档不违反文档分享的使用条款,并且您拥有该文档的所有版权或者上传文档的授权

# Linux kernel tweaking for performance and security on a busy Linux
# server with a decent amount of memory.
#
# This file should be saved as /etc/sysctl.conf
# You can source it manually if your system has booted by using:
# sysctl -e -p /etc/sysctl.conf
#
# Paul Day, paul (at) bur.st
#
# Last updated 02/03/05 and tested on 2.6.9
#

# Increase RPC slots
sunrpc.tcp_slot_table_entries = 32
sunrpc.udp_slot_table_entries = 32
# Increase size of RPC datagram queue length
net.unix.max_dgram_qlen = 50
# Log spoofed, source routed and redirects
net.ipv4.conf.default.log_martians = 1
# Don't accept source routes
net.ipv4.conf.default.accept_source_route = 0
# Don't send redirects
net.ipv4.conf.default.send_redirects = 0
# Source route verification on - incoming packets must match outgoing routing
net.ipv4.conf.default.rp_filter = 1
# Don't accept redirects
net.ipv4.conf.default.accept_redirects = 0
# Don't forward source routes
net.ipv4.conf.default.mc_forwarding = 0
# Disable forwarding
net.ipv4.conf.default.forwarding = 0
# Log spoofed, source routed and redirects
net.ipv4.conf.all.log_martians = 1
# Don't relay bootp
net.ipv4.conf.all.bootp_relay = 0
# Don't proxy arp for anyone
net.ipv4.conf.all.proxy_arp = 0
# Don't accept source route packets
net.ipv4.conf.all.accept_source_route = 0
# Don't send redirects
net.ipv4.conf.all.send_redirects = 0
# Source route verification on - incoming packets must match outgoing routing
net.ipv4.conf.all.rp_filter = 1
# Don't accept redirects
net.ipv4.conf.all.accept_redirects = 0
# Don't forward source routes
net.ipv4.conf.all.mc_forwarding = 0
# Don't enable forwarding
net.ipv4.conf.all.forwarding = 0
# Don't allow the arp table to become bigger than this
net.ipv4.neigh.default.gc_thresh3 = 2048
# Tell the gc when to become aggressive with arp table cleaning.
# Adjust this based on size of the LAN. 256 is suitable for most
net.ipv4.neigh.default.gc_thresh2 = 1024
# Adjust where the gc will leave arp table alone - set to 32.
net.ipv4.neigh.default.gc_thresh1 = 32
# Adjust to arp table gc to clean-up more often
net.ipv4.neigh.default.gc_interval = 30
# Increase TCP
net.ipv4.neigh.default.proxy_qlen = 96
net.ipv4.neigh.default.unres_qlen = 6
# Increase size of socket buffers
net.ipv4.tcp_rmem = 4096 98304 349520
net.ipv4.tcp_wmem = 4096 65535 262142
net.ipv4.tcp_mem = 98304 262142 393216
# Turn off sack
net.ipv4.tcp_dsack = 0
# Don't use ECN because too many sites have wacky routers that can't handle it`
net.ipv4.tcp_ecn = 0
net.ipv4.tcp_reordering = 3
# Turn off sack/fack
net.ipv4.tcp_fack = 0
# Enable bad error message Protection
net.ipv4.icmp_ignore_bogus_error_responses = 1
# Ignore broadcasts pings, could become part of a Smurf
net.ipv4.icmp_echo_ignore_


broadcasts = 1
# But don't ignore directed pings
net.ipv4.icmp_echo_ignore_all = 0
# Widen local port range
net.ipv4.ip_local_port_range = 3

第1页

我要评论

相关文档

  • 关于Linux内核参数调整

    Linux 内核参数调整一、前言 1) Linux Proc 文件系统,通过对 Proc 文件系统...缺省设置:2097152 7) /proc/sys/kernel/shmmax 该文件表示内核所允许的最大...

  • linux的内核调度

    Linux 的进程调度机制: 的进程调度机制:概述: 概述:在多进程的操作系统中,进程...(schedule) jmp ret_from_sys_call # test need_resched 成员是内核设置的,...

  • windows下调试Linux内核0.11

    windows下调试Linux内核0.11_IT/计算机_专业资料。介绍本人在Windows环境下调试...比如init/main.o中的osmain函数正常连接时地址被设置为0x00007634,但实际当head...

  • 04 Linux内核与根文件系统映像文件的编译及调试

    实验目的 1、 了解 Linux 内核的启动加载过程,根文件系统结构,内核与文件 系统数据交换的原理; 2、 掌握 Linux 内核和文件系统的配置编译以及运行调试的基本方 ...

  • 【论文】Linux之父发布新版内核 多项技术调整

    Linux之父发布新版内核 多项技术调整_专业资料。近日,Linux之父、芬兰人李纳斯·托沃兹发布了Linux开源操作系统的最新版内核。据国外媒体报道,托沃兹在Linux内核邮件...

  • 《嵌入式Linux系统开发标准教程》9 内核调试技术

    《嵌入式Linux系统开发标准教程》9 内核调试技术_IT/计算机_专业资料。作者:...n 内核源码调试。 在调试内核之前,通常需要配置内核的调试选项。图 9.1 给出...

  • 内核调试文档

    Linux内核调试 11页 免费 Linux+系统内核的调试 15页 免费 《嵌入式Linux系统...在这之后,你 希望以这个 workspace 的设置启动 WinDbg: windbg -W kernel1394Win...

  • LINUX好文章bootloader

    LINUX好文章bootloader_信息与通信_工程科技_专业资料。linux和bootloader的知识,...对硬件进行初始化;最后设置 内核参数的标记列表,复制镜像文件,进入内核的入口函数...

  • 调谐linux网络性能之网络配置文件详解

    /etc/modules.conf 文件 该配置文件定义了各种需要在启动时加载的模块的参数信息,这里主要着重讨论关于网卡的配 置。为了减少启动时可能出现的问题,Linux 内核不会...

站点地图 | 文档上传 | 侵权投诉 | 手机版
新浪认证  诚信网站  绿色网站  可信网站   非经营性网站备案
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.xuehai.net All Rights Reserved.  email
返回顶部