[SERVER-10812] Huge virtual memory Created: 18/Sep/13  Updated: 10/Dec/14  Resolved: 07/Nov/13

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 2.4.6
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Daniel Rubio Assignee: Alexander Komyagin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 12.04 LTS


Participants:

 Description   

I have a database of 3.04GB but the memory chart always show me that I have aprox. 40GB of virtual memory, that seems to be bad.

https://mms.mongodb.com/chart/bookmark/510446077fe227e9f1832ec9/5239b6c3e4b0df4507f04a38

What could I have bad configurated???

Thanks



 Comments   
Comment by Alexander Komyagin [ 03/Oct/13 ]

Hi Daniel,

We have not heard from you for some time. Do you have any further questions or comments? Otherwise I will go ahead and close this ticket.

-Alex

Comment by Alexander Komyagin [ 19/Sep/13 ]

Daniel,

If you want to dig further into the issue, the next step would be to check what particular type of queries causes your non-mapped memory to grow:
1) stop all the queries
2) stepDown the current primary to free up memory
3) gradually enable queries type by type watching when the non-mapped memory starts growing.

As an alternative, you can just upgrade one of your servers to the most recent 2.4 nightly build (http://downloads.mongodb.org/linux/mongodb-linux-x86_64-v2.4-latest.tgz) with these fixes included, force that member to become a primary and see if it fixes your issue.

Also note that the fix for SERVER-10596 does not completely eliminate the 512MB virtual address space reservations used in V8, but moves the Javascript engine pools from per-thread scope to a global scope. So the amount of 512MB blocks of allocated virtual address space should be bounded by max(10, number of concurrent server-side JS queries).

-Alex

Comment by Daniel Rubio [ 19/Sep/13 ]

Hi again Alex,

Yes, it seems both issues could suit to my environment, specially
SERVER-10554. I have a lot of nested documents.

I am the software developer so I can turn on/off the queries, the problem
is that I need $where queries to get some data. Do you want to test
something?

Regards

2013/9/19 Alex Komyagin (JIRA) <jira@mongodb.org>

Comment by Alexander Komyagin [ 19/Sep/13 ]

Hi Daniel,

The high virtual memory you are seeing is probably caused by SERVER-10596. You can see that it drops off with connections. As per the SERVER-10596, the memory occupied by the V8 engine is just a virtual address space, so it doesn't do any real harm unless it reaches the maximum of the address space (64TB for x64 system).

I'm more concerned with the resident memory size being bigger than your mapped memory. The difference between RSS and mapped memory looks to be fairly small, but correlated with connection count, so I think it might be a case for SERVER-10554.

Both mentioned SERVER tickets are fixed and will be included in the 2.4.7 build.

Do you have the ability to turn on/off different types of queries/commands in your system?

-Alex

Comment by Daniel Rubio [ 19/Sep/13 ]

Hi Alex,

I am using in another server nodejs with mongoose to connect to mongodb.

About queries I have two or three queries with $where

Kind regards

Comment by Alexander Komyagin [ 19/Sep/13 ]

Hi Daniel,

Are you using aggregation framework and/or server side JavaScript ($where, Map-Reduce, distinct) ?

-Alex

Generated at Thu Feb 08 03:24:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.