MongoDB调优简记
来源:互联网 发布:requirejs 加载json 编辑:程序博客网 时间:2024/05/17 04:24
禁止文件系统更新读取次数统计(修改/etc/fstab文件)
- mount -o remount,noatime /data
如果存储的数据中有大的文件,建议使用ext4/xfs这样的文件系统,并隔离IO。
设置最大打开文件描述符(ulimit)
- cat /etc/security/limits.conf
- * soft nofile 102400
- * hard nofile 102400
centos 5与centos 6不同的是,只要在/etc/security/limits.conf 设置了root soft nofile 102400 和root hard nofile102400,对应的uilmit -u 后的结果就会是102400,这里需要注意区别! 因此cetos 6还必须这样设置: sed -i 's/1024.*/102400/' /etc/security/limits.d/90-nproc.conf
TCP连接内存优化
- cat /etc/sysctl.conf
- net.ipv4.tcp_syncookies = 1
- net.ipv4.tcp_tw_reuse = 1
- net.ipv4.tcp_tw_recycle = 1
- net.ipv4.tcp_timestsmps = 0
- net.ipv4.tcp_synack_retries = 2
- net.ipv4.tcp_syn_retries = 2
- net.ipv4.tcp_wmem = 8192 436600 873200
- net.ipv4.tcp_rmem = 32768 436600 873200
- net.ipv4.tcp_mem = 94500000 91500000 92700000
- net.ipv4.tcp_max_orphans = 3276800
- net.ipv4.tcp_fin_timeout = 30
- #直接生效
- /sbin/sysctl -p
多核问题可以在启动时加入启动参数: numactl --interleave=all
- #Advanced
- numactl --interleave=all /opt/mongodb/bin/mongod -shardsvr -replSet shard1 -port 27021 -dbpath /data0/mongodb/db/shard13 -oplogSize 1000 -logpath /data1/mongodb/logs/shard13.log -logappend --maxConns 10000 --quiet -fork --directoryperdb
0 0
- MongoDB调优简记
- 简记
- 简记
- 简记
- 简记
- 简记
- mongodb 3.2 知识简记-基础知识和基本操作
- Mongodb性能调优
- mongodb性能调优
- mongodb磁盘性能调优
- XML简记
- 书籍简记
- WSP简记
- 《程序员》简记
- 编码简记
- dojo 简记
- xml简记
- CSharp简记
- sql 百万级数据库优化方案
- 【win7】如何给win7自带的截图工具设置快捷键?
- Socket(TCP和UDP)详解
- 快排---谁是中间那个
- Mysql BLOB类型介绍
- MongoDB调优简记
- 静态变量初始化
- Could not load java.net.BindException异常的解决办法
- Java的内存结构(Memory Structure)和垃圾收集(Garbage Collection)图解 (转载)
- 用Linux的iptables和Python模拟广域网
- eclipse package,source folder,folder区别及相互转换
- Illegal access: this web application instance has been stopped already
- sql server2008
- Android开源框架ImageLoader||异步加载图片