0

I'm having a weird problem. I'm measuring a performance on a similar dataset with a similar indexes (in fact i just mognodumped/mongorestored it).

One instance is running locally in vagrant (1 core, 4 gigs etc...) Another is running on a server.

The version of of MongoDB is 3.0.6.

So I ran that import in vagrant server and got noticeably different results in performance. In fact vagrant instance executes same query 3 to 5 times faster than a real server.

So I checked db.stats() output. And here are the differences:

Reallife server:

> db.stats()
{
    "db" : "komparu_product_acc",
    "collections" : 1,
    "objects" : 30235,
    "avgObjSize" : 147517.09485695386,
    "dataSize" : 4460179363,
    "storageSize" : 1610596352,
    "numExtents" : 0,
    "indexes" : 16,
    "indexSize" : 2682880,
    "ok" : 1
}

And here's vagrant instance:

> db.stats()
{
    "db" : "komparu_product_dev",
    "collections" : 4,
    "objects" : 30273,
    "avgObjSize" : 261799.2074786113,
    "dataSize" : 7925447408,
    "storageSize" : 9727320048,
    "numExtents" : 27,
    "indexes" : 17,
    "indexSize" : 11233824,
    "fileSize" : 36423335936,
    "nsSizeMB" : 16,
    "extentFreeList" : {
        "num" : 52,
        "totalSize" : 24781381472
    },
    "dataFileVersion" : {
        "major" : 4,
        "minor" : 22
    },
    "ok" : 1
}

Here are stats for live server collection: http://pastebin.com/9vipBmQm

Same for vagrant one: http://pastebin.com/HbbSi0Pu

As you can see. Live server runs wiredTiger data storage. And I can notice that it compresses data really tight (compared to MMAPv1).

For more concern here's an explain output for the same query on both environments:

How can I boost the performance of wiredTiger? Or should I switch back to MMAPv1?

Any hints are helpful!

Thank you!

Konstantin Bodnia
  • 1,372
  • 3
  • 20
  • 43
  • Your index size is much higher in Vagrant server, Which may cause performance hit in reallife server – Rohit Jain Oct 09 '15 at 12:06
  • I can see that, thanks. Do you think that removing setting `storage.wiredTiger.indexConfig.prefixCompression` to `false` will help things out? – Konstantin Bodnia Oct 09 '15 at 12:23
  • How did you start up ? Did you specify storage engine to be wiredTiger ? – Rohit Jain Oct 09 '15 at 12:44
  • Yes. wiredTiger is specified in the config file. – Konstantin Bodnia Oct 09 '15 at 14:23
  • I just forwarded your question to MongoDB team @asya999, hope it will help – Rohit Jain Oct 10 '15 at 18:53
  • An open-ended question like this would be better discussed on the [mongodb-user discussion group](https://groups.google.com/forum/#!forum/mongodb-user) as more information is needed. A more useful starting point than DB stats would be the output of the queries with `.explain(true)` in both environments. It would also be helpful to know more about the configuration and load for each environment. If your local Vagrant environment is just used for development it is likely that it will have a working set in memory, while your production environment has a more realistic (and larger) working set. – Stennie Oct 11 '15 at 12:46

0 Answers0