Pre-Split Data - Would partially filled chunks use/occupy whole 64MB in memory, disk-space

22 views
Skip to first unread message

Sandy

unread,
May 28, 2012, 4:11:27 AM5/28/12
to mongodb-user
Hi

MongoDB 2.0.5

I am planning for pre-split of data. Shard Key is Random UUID.

I wanted to know even if some chunk hold only few records , would
MongoDB use whole 64MB(chunkSize) in memory or disk space.

Is there any side effects if some of chunks doesn't hold exactly 64 MB
of data or are partially filled chunks ?

Regards
Sandy

Adam C

unread,
May 28, 2012, 12:50:34 PM5/28/12
to mongod...@googlegroups.com
Chunks are just meta data, based on the chosen shard key that logically divide the sharded data up into ranges, they do not dictate anything in terms of the storage engine of MongoDB (see here for more information there: http://www.10gen.com/presentations/mongosv-2011/mongodb-storage-engine-bit-by-bit).  

The maximum chunk size is used by the mongos to judge when to request splits, how many split points come back and then how much data is migrated when a chunk moves.  There are no side-effects about non-full chunks, besides the moves and such going more quickly because there is less data.  In fact one of the ways we try to make the max key chunk migration happen more quickly is to essentially make it a zero data chunk.

Adam
Reply all
Reply to author
Forward
0 new messages