We have two MongoDB data nodes (replica set) - Primary & Secondary. I noticed that the non-mapped virtual memory
is relatively high and wondering if they are hurting our MongoDB performance (The server usually peaked at around 6-7K queries per sec).
In MMS, it was stated: "The most common case of usage of a high amount of memory for non-mapped is that there are very many connections to the database."
So we checked the memory usage with db.serverStatus().mem
in our Secondary:
{
"bits" : 64,
"resident" : 6846,
"virtual" : 416797,
"supported" : true,
"mapped" : 205549,
"mappedWithJournal" : 411098,
"note" : "virtual minus mapped is large. could indicate a memory leak"
}
Note: We are using 2.0.4 and now the default stack size should be 1MB per connection.
The current number of connections is around 1.1K, but the non-mapped virtual memory (virtual-mappedWithJournal) is around 5699 MB. The trend is quite stable so I can't say there is a leak here, but where is the memory gone?
Any idea?