Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

mongo 2.4.6 x64
RAM 24 GB

With normal work memory consume around 10GB.
After that we started read data from db (create archive raw data) memory consuming up to 90% of all memory trough 5day. And go forfard by 0.1% by day. Is it normal situation and what happening when oom-killer come ?

mongotop
insert  query update delete getmore command flushes mapped  vsize res faults  locked db idx miss %     qr|qw   ar|aw  netIn netOut conn     set repl       time
    *0     *0     *0     *0       0     2|0       0 21513g 43028g 1.49g      0     .:0.1%          0       0|0     0|0   190b 3k    31 replica  PRI   02:25:08
    *0     *0     *0     *0       0     1|0       0 21513g 43028g 1.49g      0     .:0.1%          0       0|0     0|0    62b 3k    31 replica  PRI   02:25:09
    *0     *0     *0     *0       0     2|0       0 21513g 43028g 1.49g      0     .:0.1%          0       0|0     0|0   190b 3k    31 replica  PRI   02:25:10
    *0     *0     *0     *0       0     1|0       0 21513g 43028g 1.49g      0     .:0.1%          0       0|0     0|0    62b 3k    31 replica  PRI   02:25:11


free -m
             total       used       free     shared    buffers cached
Mem:         24031      23835        195          0         33 1542
-/+ buffers/cache:      22259       1771
Swap:          511          4        507

Collection = 20TB

share|improve this question

1 Answer 1

This has been asked and answered many times, so there is even a couple of FAQ sections on it. First you will need to understand the difference between resident memory usage and the cache being full (very different things), then you need to look at how memory mapped files behave in general. Here are a couple of starting points from the MongoDB Docs:

http://docs.mongodb.org/manual/faq/fundamentals/#does-mongodb-require-a-lot-of-ram http://docs.mongodb.org/manual/faq/diagnostics/#memory-diagnostics

Short version, no it is not a memory leak, and yes it is expected behavior over time when the data set exceeds available physical memory.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.