mongodb eat root filesystem space? how to solve it ?

132 views
Skip to first unread message

likuku

unread,
Jan 7, 2014, 10:26:59 PM1/7/14
to mongod...@googlegroups.com
mongodb running 3-4 days, root fs of free space is gradually reduced until 100% full (df -h show me that info) ..

/ etc / mongodb.conf Lane dbpath = / export / storage / mongodb (/ export mounted another filesystem)

when i use du -shc /* , root filesystem was only using 30% of the total.

After that, I restart/stop mongodb, the root filesystem df and du displays the results on the same.

How to solve this situation?

Thanks~

# Operating Environment Information:
debian linux 6.0 x86_64 xen domU
Linux monitor-test 3.2.0-4-amd64 #1 SMP Debian 3.2.35-2 x86_64 GNU/Linux
filesystem type : EXT4

debian linux 6.0 x86_64 xen dom0

Dell R620

likuku

unread,
Jan 9, 2014, 10:18:59 PM1/9/14
to mongod...@googlegroups.com
add info of mongodb version:

mongodb-10gen  2.4.8 (apt-get from 10gen offical source)

在 2014年1月8日星期三UTC+8上午11时26分59秒,likuku写道:

Sam Millman

unread,
Jan 10, 2014, 4:24:10 AM1/10/14
to mongod...@googlegroups.com
What kind of queries are you throwing at MongoDB? It sounds like you are suffering from excessive document movement if you are expecting there to still be free space.


--
--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com
To unsubscribe from this group, send email to
mongodb-user...@googlegroups.com
See also the IRC channel -- freenode.net#mongodb
 
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Eoin Brazil

unread,
Jan 10, 2014, 8:24:28 AM1/10/14
to mongod...@googlegroups.com
Hi,

It is difficult to determine what exactly is the root cause of this behaviour without some additional details. However it might be helpful to explain the MongoDB storage layer which preallocates data file in advance to prevent file system fragmentation. It will aggressive preallocate the next file to be filled for each database (initially 64MB, the next file will be 128MB and so on up until 2GB where all subsequent file allocations will be done at 2GB). This is covered in the documentation (http://docs.mongodb.org/manual/faq/storage/#why-are-the-files-in-my-data-directory-larger-than-the-data-in-my-database) and in a recent presentation (http://www.mongodb.com/presentations/understanding-mongodb-storage-performance-and-data-safety).

What operations are you performing on the database ? Can you provide some details and examples ?

The growth over 3 days of operation may be completely normal behaviour due to the preallocation approach used by MongoDB. If you can provide more details then we can better understand what is occurring and provide better answers.

Best regards,
Eoin

Asya Kamsky

unread,
Jan 11, 2014, 2:36:03 AM1/11/14
to mongodb-user
I'm afraid you will need to show output of your df commands, etc. because it sounds to me like you are saying:

MongoDB data directories are in /export/storage/mongodb and that your / root partition which is a separate device from /export/storage got filled up by MongoDB?

That sounds somewhat unusual - in fact, MongoDB does not write data anywhere except inside of its dbpath so it sounds somewhat implausible!   

Are you sure this had something to do with MongoDB?   When you ran du on your root partition, what did you see taking up space?   What about the /export/storage partition - did it show growth while MongoDB was running?

Is it possible that you started mongod without using the mongodb.conf and there was a directory in /data/db that it put its files in?

Asya



--

Asya Kamsky

unread,
Jan 11, 2014, 2:37:19 AM1/11/14
to mongodb-user
I just want to point out that while what Eoin says is 100% correct, all of the files he is referring to would be in the same directory and that is the "dbpath" of mongod process which you says in the first post is a separate device from the one that became full.

Asya

Reply all
Reply to author
Forward
0 new messages