WiredTiger storage structure

950 views
Skip to first unread message

megha garg

unread,
Mar 10, 2015, 5:17:21 AM3/10/15
to mongod...@googlegroups.com
Hi,

I was trying new wiredTiger storage in 3.0.0 with some of my production data. But I am not able to understand its storage structure. I restored one collection from 2.6.7 to 3.0. the data directory created below files/directories. I am not able to find any description for this:-

collection-0--7880187485072602249.wt
collection-2--7880187485072602249.wt
index-1--7880187485072602249.wt
index-3--7880187485072602249.wt
index-4--7880187485072602249.wt
index-5--7880187485072602249.wt
index-6--7880187485072602249.wt
index-7--7880187485072602249.wt
index-8--7880187485072602249.wt
journal
_mdb_catalog.wt
mongod.lock
mongo.log
sizeStorer.wt
storage.bson
_tmp
WiredTiger
WiredTiger.basecfg
WiredTiger.lock
WiredTiger.turtle
WiredTiger.wt


Can somebody help me with this?

Tim Callaghan

unread,
Mar 10, 2015, 10:02:14 AM3/10/15
to mongod...@googlegroups.com
This is the current state of not just WiredTiger but also TokuMXse, and it's unfortunate. There is no way that I can see to map files to indexes/collections.

-Tim

Asya Kamsky

unread,
Mar 10, 2015, 1:58:39 PM3/10/15
to mongodb-user
The metadata mapping the collection and index names to files is in the
_mdb_catalog.wt for WiredTiger.

What's the primary reason for wanting to match up files to objects in
the DB? You can probably get the mapping by comparing
db.collection.stats().storageSize and matching it with sizes of
collection-xxx files and same for index sizes...

We can also decode the contents of _mdb_catalog.wt but I guess I'd
like to understand why that's important to have available...

Asya
> --
> You received this message because you are subscribed to the Google Groups
> "mongodb-user"
> group.
>
> For other MongoDB technical support options, see:
> http://www.mongodb.org/about/support/.
> ---
> 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.
> To post to this group, send email to mongod...@googlegroups.com.
> Visit this group at http://groups.google.com/group/mongodb-user.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mongodb-user/687cdddd-3fde-40aa-b996-18ba8a4daf13%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

megha garg

unread,
Mar 11, 2015, 12:13:56 AM3/11/15
to mongod...@googlegroups.com
I just wanted to understand the basic storage structure of wiredtiger as it has compressed the data. 

How can we get the mapping for indexes?

megha garg

unread,
Mar 11, 2015, 12:23:44 AM3/11/15
to mongod...@googlegroups.com
And how can we read this _mdb_catalog.wt file

Asya Kamsky

unread,
Mar 11, 2015, 12:38:36 AM3/11/15
to mongod...@googlegroups.com
The same way - each file has one index, its size on disk and in RAM is the same as it's prefix-compressed in both.

Asya

Deepjyoti Saha

unread,
Aug 20, 2015, 3:40:13 AM8/20/15
to mongodb-user
Hi Megha

Use directoryperdb=1 option in config file while running mongod process.
It will create all the database folders and map all the database collection and index files with that particular database folder.
Reply all
Reply to author
Forward
0 new messages