[FreeBSD] 分享/etc/sysctl.conf和/boot/loader.conf优化

weixin_38062190 2009-02-26 06:40:06

参考多方资料 总结出来的 ,目前我用着很好 !有高手当然也希望指教!

/boot/loader.conf


kern.maxdsiz="536870912"
kern.ipc.maxsockets="16424"
kern.ipc.nmbclusters="32768"
kern.ipc.nmbufs="65535"
kern.ipc.nsfbufs="2496"
net.inet.tcp.tcbhashsize="2048"
kern.maxusers="256"
复制代码

/etc/sysctl.conf


net.inet.ip.sourceroute=0
net.inet.ip.accept_sourceroute=0
net.inet.tcp.drop_synfin=1
kern.maxvnodes=100000
kern.maxprocperuid=867
kern.maxfiles=65536
kern.argmax=262144
kern.securelevel=-1
kern.maxfilesperproc=1735
kern.ipc.maxsockbuf=262144
kern.ipc.somaxconn=8192
kern.ipc.shmmax=33554432
kern.ipc.shmall=8192
kern.ipc.shm_use_phys=0
kern.ipc.shm_allow_removed=0
kern.coredump=1
kern.corefile=%N.core
vm.swap_idle_enabled=0
vm.swap_idle_threshold1=2
vm.swap_idle_threshold2=10
vfs.ufs.dirhash_maxmem=2097152
vfs.vmiodirenable=1
vfs.hirunningspace=1048576
vfs.write_behind=1
net.local.stream.sendspace=65536
net.inet.ip.portrange.lowfirst=1023
net.inet.ip.portrange.lowlast=600
net.inet.ip.portrange.first=49152
net.inet.ip.portrange.last=65535
net.inet.ip.portrange.hifirst=49152
net.inet.ip.portrange.hilast=65535
net.inet.ip.redirect=1
net.inet.ip.rtexpire=3600
net.inet.ip.rtminexpire=10
net.inet.ip.intr_queue_maxlen=50
net.inet.ip.intr_queue_drops=0
net.inet.ip.random_id=0
net.inet.icmp.icmplim=200
net.inet.icmp.icmplim_output=1
net.inet.icmp.drop_redirect=0
net.inet.icmp.log_redirect=0
net.inet.tcp.mssdflt=512
net.inet.tcp.minmss=216
net.inet.tcp.keepidle=7200000
net.inet.tcp.sendspace=32768
net.inet.tcp.recvspace=65536
net.inet.udp.maxdgram=9216
net.inet.udp.recvspace=42080
net.inet.tcp.log_in_vain=0
net.inet.tcp.blackhole=2
net.inet.tcp.delayed_ack=1
net.inet.tcp.inflight.debug=0
net.inet.tcp.inflight.rttthresh=10
net.inet.tcp.inflight.min=6144
net.inet.tcp.inflight.max=1073725440
net.inet.tcp.inflight.stab=20
net.inet.tcp.msl=30000
net.inet.tcp.always_keepalive=1
net.inet.udp.log_in_vain=0
net.inet.udp.blackhole=1
net.inet.raw.maxdgram=8192
net.inet.raw.recvspace=8192
net.link.ether.inet.max_age=1200
net.inet6.ip6.redirect=1
net.isr.direct=0
hw.ata.wc=1
security.bsd.see_other_uids=1
security.bsd.see_other_gids=1
复制代码
...全文
39 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复

477

社区成员

发帖
与我相关
我的任务
社区描述
其他技术讨论专区
其他 技术论坛(原bbs)
社区管理员
  • 其他技术讨论专区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧