Tag: nosql

CentOS 7.2 redis-3.0.5 WARNING solved

启动redis,显示告警如下: 8589:M 05 Dec 14:28:58.509 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. 8589:M 05 Dec 14:28:58.509 # Server started, Redis version 3.0.5 8589:M 05 Dec 14:28:58.509 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add ‘vm.overcommit_memory = 1’ to /etc/sysctl.conf and then reboot or run the command ‘sysctl vm.overcommit_memory=1’ for this to take effect. 8589:M…

Read More »

Tuning Linux for MongoDB — 转

Tuning Linux for MongoDB Tim Vaillancourt  | August 12, 2016 |  Posted In: MongoDB In this post, we’ll discuss tuning Linux for MongoDB deployments. By far the most common operating system you’ll see MongoDB running on is Linux 2.6 and 3.x. Linux flavors such as CentOS and Debian do a fantastic job of being a stable, general-purpose operating system. Linux runs software on hardware ranging from tiny computers like the Raspberry Pi up to massive data center servers. To make this flexibility work,…

Read More »

mongodb 3.2.11 副本集 安装日志 主从仲裁

==================================================== 系统环境: CentOS release 6.2+ 安装软件: mongodb-linux-x86_64-rhel62-3.2.11.tgz 一、mongodb3 副本集规划 副本集名称: testrs (项目中根据实际情况修改) 以 192.168.100.x 为例 1.1 集群规划 192.168.100.1:27017 主 192.168.100.2:27017 从 192.168.100.3:27017 仲裁 – 不保存业务数据,节约硬盘空间 1.2 服务器目录规划 /home/mongodb3 mongodb-home目录 |_ bin 命令目录 |_ conf 配置目录 |_ data 数据目录 – 可建立符号链接 指向nas/其他目录 |_ master 主 |_ slaver 从 |_ arbiter 仲裁 |_ log mongodb运行日志目录 – 可建立符号链接 指向其他目录 1.3 用户 以 mongodb3 用户名为例(项目中根据实际情况定): # useradd mongodb3 二、操作系统配置 使用 root 用户登录 2.1 如果启用了iptables,将27001端口加入防火墙 # vi /etc/sysconfig/iptables 下面一行内容加在COMMIT之前 ——————————————- -A INPUT -p tcp –dport…

Read More »

mongodb 磁盘空间重用测试对比 (2.6.12 v.s. 3.2.11)

从测试日志可以看出: mongodb3默认的WiredTiger存储引擎,与mongodb2的MMAP相比,在空间利用率上有着质的飞越; mongodb3在删除集合后,对应的磁盘空间会立即回收,这极大的减轻了运维工作量。 以下是测试日志: mongodb_reuse_diskspace_test_log.txt $ mongo –version MongoDB shell version: 2.6.12 ===================================================== 测试集合名称:person2 准备 db.person2.drop(); db.repairDatabase(); $ du -h -d 1 data/master 80M data/master/admin 0B data/master/journal 10G data/master/local 80M data/master/logevents 10G data/master 写入727.2万 727.2万 person2.dataSize=1.6254186630249023G 每条数据 240bytes $ du -h -d 1 data/master 0B data/master/_tmp 80M data/master/admin 289M data/master/journal 10G data/master/local 4.0G data/master/logevents 14G data/master 再写入500万 [2016-12-15 14:08:33.460 CST] main INFO mongodb.MongoDbReuseDiskspaceTest: 1000000条记录已就绪 [2016-12-15 14:09:39.644 CST] main INFO mongodb.MongoDbReuseDiskspaceTest: 写入1000000条记录至Person2成功 [2016-12-15 14:09:40.471 CST] main INFO mongodb.MongoDbReuseDiskspaceTest: 1000000条记录已就绪 [2016-12-15 14:10:48.308…

Read More »