Hi all,
I can't disable the write concern while i mongorestore with .bson file. It totally damages the insertion rate (insert/sec).
This is my sharding status.
mongos> sh.status()
--- Sharding Status ---
sharding version: {
"_id" : 1,
"version" : 4,
"minCompatibleVersion" : 4,
"currentVersion" : 5,
"clusterId" : ObjectId("546bd498f0531e27d40544b2")
}
shards:
{ "_id" : "shard2", "host" : "shard2/hadoop5.xx.com:27018" }
databases:
{ "_id" : "admin", "partitioned" : false, "primary" : "config" }
{ "_id" : "deneme6", "partitioned" : false, "primary" : "shard2" }
{ "_id" : "seref", "partitioned" : true, "primary" : "shard2" }
This is my shard.
shard2:PRIMARY> show tables;
me
oplog.rs
startup_log
system.indexes
system.replset
shard2:PRIMARY> db.me.find()
{ "_id" : ObjectId("546bd2869e14c01f13708886"), "host" : "hadoop5.xx.com" }
shard2:PRIMARY> db.system.replset.find()
{ "_id" : "shard2", "version" : 2, "members" : [ { "_id" : 0, "host" : "hadoop5.xx.com:27018" } ], "settings" : { "getLastErrorDefaults" : { "w" : 0 } } }
shard2:PRIMARY>
This is my mongorestore command.
mongorestore --db seref --collection can11 --noobjcheck --w 0 --noIndexRestore --host 10.0.0.9 --port 27017 /tmp/inventory_kwd.bson
Take attention to log below and notice the `writeConcern: { w: 1 }`.
2014-11-18T18:36:19.560-0500 [conn1] ReplicaSetMonitor::get shard2
2014-11-18T18:36:19.560-0500 [conn1] sending write batch to hadoop5.xx.com:27018: { insert: "can11", documents: [ { _id: ObjectId('54142eacf6365307dcba5f5b'), country: "PL", keyword: "żyje richard kiel", type: 3, depth: 5, avg_daily_views: 1374, avg_unique_users: 311 } ], writeConcern: { w: 1 }, ordered: true, metadata: { shardName: "shard2", shardVersion: [ Timestamp 0|0, ObjectId('000000000000000000000000') ], session: 0 } }
2014-11-18T18:36:19.560-0500 [conn1] write results received from hadoop5.xx.com:27018: { ok: 1, n: 1, lastOp: Timestamp 1416353779000|132, electionId: ObjectId('546bd2879e14c01f13708888') }
how can i disable it ?