User Tools

Site Tools


mongodb

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
mongodb [2025/12/13 17:21] – created reddymongodb [2026/11/05 15:14] (current) – reddy
Line 11: Line 11:
  
 python3 -m pip install mtools psutil pymongo  # Thomas Rucksteiss' mtools python3 -m pip install mtools psutil pymongo  # Thomas Rucksteiss' mtools
- 
 # mlaunch --init --replicaset --nodes 1 --sharded 2 --port 28000 # mlaunch --init --replicaset --nodes 1 --sharded 2 --port 28000
 # mongosh --port 28000 # mongosh --port 28000
 </code> </code>
 +
 +====== Key-file login ======
 +
 +<code bash>
 +mongo -u __system -p "$(tr -d '\011-\015\040' < path-to-keyfile)" --authenticationDatabase local
 +</code>
 +
 +====== MongoSH JSON ======
 +
 +To increase the levels of JSON nesting to display (from the default of 6), run the following:
 +
 +<code javascript>
 +config.set("inspectDepth", Infinity)
 +</code>
 +
 +====== Tuning for writes ======
 +
 +<code>
 +db.adminCommand({
 +  setParameter: 1,
 +  wiredTigerEngineRuntimeConfig: "eviction_dirty_target=2,eviction_dirty_trigger=30,eviction_updates_target=2,eviction_updates_trigger=30,eviction=(threads_min=8,threads_max=8)"
 +})
 +</code>
 +
 +Also consider increasing:
 +https://www.mongodb.com/docs/manual/reference/configuration-options/#mongodb-setting-storage.journal.commitIntervalMs
mongodb.1765642887.txt.gz · Last modified: (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki