Skip to main content
40 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 ...
Alireza's user avatar
  • 1,011
15 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 ...
joeytwiddle's user avatar
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 ...
loicmathieu's user avatar
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 ...
kevinadi's user avatar
  • 548
5 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 ...
Mahendra Patel's user avatar
5 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 /...
Yi Xiang Chong's user avatar
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. ...
JJussi's user avatar
  • 5,723
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 ...
nvbach91's user avatar
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 ...
kevinadi's user avatar
  • 548
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 ...
Md Haidar Ali Khan's user avatar
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 ...
Stennie's user avatar
  • 10.3k
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 ...
Stennie's user avatar
  • 10.3k
3 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 ...
KalenGi's user avatar
  • 131
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 ...
Stennie's user avatar
  • 10.3k
3 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 ...
Joe's user avatar
  • 503
2 votes
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 ...
JJussi's user avatar
  • 5,723
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 ...
Tzach's user avatar
  • 297
2 votes
Accepted

WiredTiger Page Size

The parameter I was looking for is referred to as the allocation_size It's WiredTiger parameter. From the documentation A component of WiredTiger called the Block Manager divides the on-disk pages ...
Pavel Sapezhko's user avatar
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 ...
kevinadi's user avatar
  • 548
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 ...
Md Haidar Ali Khan's user avatar
1 vote

MongoDB UserNotFound when starting mongod

Ended up working by using a configuration file when running mongod. Don't know why.
Tomer Something's user avatar
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 ...
Iľja's user avatar
  • 390
1 vote
Accepted

How many files are created by default using WiredTiger storage engine?

Yes, WiredTiger Engine creates one file per collection and per index. Files are the part of storage layer that is being maintained by the Storage Engine part. you can locate the created files in the ...
Kapil Bhagchandani's user avatar
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 ...
Md Haidar Ali Khan's user avatar
1 vote

Mongodb 3.6.3 disappears after 2 weeks on centos 7 ec2 instance

Your latter problem (start with sudo) is because some of the files or directories are NOT owned by user mongod. When you state sudo service mongod start mongod process is started with user mongod:...
JJussi's user avatar
  • 5,723
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-...
David Resnick's user avatar
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....
Md Haidar Ali Khan's user avatar
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.
JJussi's user avatar
  • 5,723
1 vote

MongoDB Maxing CPU Usage

I have the same problem, MongoDB use all CPU resources (12 vCPU, 1.119 % CPU). After create a INDEX for the most asked field, the usage rises down to 12%
zabera's user avatar
  • 11

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