32 votes
Accepted

MongoDB using too much memory

Okay, so after following the clues given by loicmathieu and jstell, and digging it up a little, these are the things I found out about MongoDB using WiredTiger storage engine. I'm putting it here if ...
  • 871
11 votes

MongoDB using too much memory

Docs You may like to read basic memory concerns for MongoDB and also this brief discussion about checking memory usage. Memory usage overview The command db.serverStatus() (docs) can provide an ...
7 votes

MongoDB using too much memory

I don't think you have a problem here with MongoDB, as jstell told you MongoDB with WiredTiger will use 50% of available memory so if you increase the RAM of your server it will takes more memory. As ...
6 votes

MongoDB / WiredTiger: reduce storage size after deleting properties from documents

Just to clarify, please be careful about using repairDatabase on a replica set node. repairDatabase is meant to be used to salvage readable data i.e. after a disk corruption, so it can remove ...
  • 538
4 votes

MongoDB / WiredTiger: reduce storage size after deleting properties from documents

If you inspect the database using db.stats(), you will find dataSize and storageSize. storageSize may be bigger after you delete documents from the database. The use of db.repairDatabase() or compact ...
4 votes

MongoDB Maxing CPU Usage

Strange indeed. That local.oplog.rs is journaling what is enable (default) at 64 bit systems (32bit default value is false). So, running time for that thread should be same than your mongod uptime. ...
  • 5,323
4 votes
Accepted

Meaning of "update conflicts" in CollStats result

The number records how many times two or more threads are trying to update the same document inside the WiredTiger storage engine. It is not persisted between server restarts. This statistic is ...
  • 538
4 votes

How to restore .wt backup file to local MongoDB?

You can restore your .wt WiredTiger files downloaded from your Atlas Backup (which unzips or untar as a restore folder) to your local MongoDB. First, make a backup of your /data/db path. Call it /...
3 votes
Accepted

'mongod wiredTiger' on Ubuntu?

I wasn't able to use wiredTiger upgrading MongoDB. However, at May 17 I uninstalled MongoDB 2.6 then installed MongoDB 3.0.3 . Immediate after the installation, I added storageEngine=wiredTiger on top ...
  • 211
3 votes
Accepted

WiredTiger prefix compression for index on MongoDB

By default collection stats only include information on the collection data (which uses block-level compression rather than prefix compression). To see index details you need to provide an additional ...
  • 9,865
3 votes
Accepted

WiredTiger internal cache

Do we need to keep extra memory for some kind of memory mapped files for MongoDB data files The mem.mapped and mem.mappedWithJournal metrics in serverStatus output are only applicable to the MMAPv1 ...
  • 9,865
3 votes

How to copy wt files from another mongo instance?

The WiredTiger.wt file is a crucial metadata file that keeps track of the state of the whole database and all the *.wt files. Hence, the content of this file is deployment specific, and not ...
3 votes

How to restore .wt backup file to local MongoDB?

There is a much simpler way, But here are few things that need to consider, you can not create a backup from a single .wt file, you have to use the entire folder. The easiest way is to start mongod ...
3 votes
Accepted

Is MongoDB secondary index size affected by primary key size?

I understand correctly, secondary index leaf nodes in MySQL InnoDB engine hold the table primary key value (at least for a unique index). InnoDB tables have a clustered index which determines where ...
  • 9,865
2 votes

Mongodb Not Restarting with Collections, WiredTiger.wt may be corrupt

There's now an official repair option that worked for me after a sudden computer shutdown https://docs.mongodb.com/manual/tutorial/recover-data-following-unexpected-shutdown/ Create a backup copy of ...
  • 121
2 votes
Accepted

Disable Journaling in MongoDB + WiredTiger

When running a journal disabled cluster, we observed frequent disk checkouts - once about every 3 seconds. This was confusing, as the docs specifically mention that checkpoints are created every 60 ...
  • 287
2 votes
Accepted

Understanding why MongoDB uses more RAM than the allowed wiredTigerCacheSizeGB

The maximum cache size is just that - a limit on the size of the cache used by the underlying storage engine. If you run queries, sort things, make connections, etc, those all require memory outside ...
  • 403
1 vote

How to influence files (pre)allocation steps (max growing value) in MongoDB 3.4 with WiredTiger

WiredTiger does not preallocate data files. Only journal files are pre-allocated (at 100MB per pre-allocation), see journaling process. The disk exhaustion you're seeing is likely due to these ...
  • 538
1 vote

First query is really slow with WiredTiger, not with mmapv1

First query is really slow with WiredTiger, not with mmapv1 As per MongoDB blog documentation How to Tell if Your MongoDB Server Is Correctly Sized For Your Working Set For MongoDB users, knowledge ...
1 vote

MongoDB UserNotFound when starting mongod

Ended up working by using a configuration file when running mongod. Don't know why.
1 vote

MongoDB Migrating away from RocksDB to WiredTiger

If replication doesn't keep up with primary and it's not possible to extend the oplog, I'd try to shard the deployment and... let smaller shards replicate faster or drain the original shard and then ...
  • 390
1 vote
Accepted

MongoDB Write Concern when Journaling is off

Since you're using MongoDB 3.4.7 with WiredTiger, there are certain defaults in place if you run MongoDB with the default values (journal is enabled): If newly created, the replica set would use ...
  • 538
1 vote

MongoDB Write Concern when Journaling is off

The answer to your question: Writing data change to disk. When journaling is on, the first change is written to the journal, then it is written to data blocks.
  • 5,323
1 vote
Accepted

Recover MongoDB data without WiredTiger.wt file

If you perform the recovery by overwriting some collection-*.wt files inside your dbpath, then your database is in an unsupported state. Data loss is quite likely in this case. If you want to restore ...
  • 538
1 vote

Mongodb how to cancel a --fork without mongod service 'option'

The --fork is a flag to tell mongod to run as a background process, rather than as an active process which blocks the shell. Mongod is the main daemon process for MongoDB. It's the core unit of the ...
1 vote
Accepted

Mongodb how to cancel a --fork without mongod service 'option'

You just kill the process. killall mongod To check that you don't have any mongod process running anymore, you can use ps -ef|grep mongod|grep -v grep or just pgrep mongod. With that latter, if you ...
  • 5,323
1 vote
Accepted

Slow MongoDB start time when data is replicated to a new machine

It looks like the initial slowness is because the EBS volume (which is restored from snapshot) is being initialized during the service startup. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-...
1 vote

mongodb v3.4 - wiredtiger - compact does not work

@mils, The compact administration commands Rewrites and defragments all data and indexes in a collection. On WiredTiger databases, this command will release unneeded disk space to the operating system....
1 vote
Accepted

WiredTiger panic when attempting to rename .turtle leads to loss of all data

What version you are using? This is known bug, what has been fixed at versions 3.2.13, 3.4.4, 3.5.6 forward.
  • 5,323

Only top scored, non community-wiki answers of a minimum length are eligible