compressed size greater than uncompressed size

91 views
Skip to first unread message

Randhir Singh

unread,
Jan 20, 2016, 6:42:07 AM1/20/16
to mongodb-user
I have a db where compressed collection size is greater than uncompressed size. Is this by design?

> show collections
system.indexes 3.10KB (uncompressed), 32.00KB (compressed)
system.users NaNundefined (uncompressed), NaNundefined (compressed)
categories 18.10KB (uncompressed), 32.00KB (compressed)
aggregation_rule 43.27KB (uncompressed), 64.00KB (compressed)
alert 21.25GB (uncompressed), 23.93GB (compressed)
incident 59.12MB (uncompressed), 9.88MB (compressed)
remediation_task 0.00B (uncompressed), 48.50KB (compressed)
tracking_id_sequence 87.00B (uncompressed), 32.00KB (compressed)

Wan Bachtiar

unread,
Feb 10, 2016, 10:31:29 PM2/10/16
to mongodb-user

Hi Randhir,

The default show collections command should only list the collection names in the current selected database without the extra information. It is likely that your Mongo Shell is sourcing a [.mongorc.js] (https://docs.mongodb.org/manual/mongo/#mongorc-js-file) which could modify the output of your show collections.

You should check your .mongorc.js file and find out how the values were derived. You can also disable sourcing the mongorc.js by running mongo —norc.

A few things that you may find useful:

Also, currently WiredTiger is the only officially supported storage engine that supports compression for all collections and indexes. WiredTiger compression settings are also configurable on per-collection and per-index basis during collection and index creation.

If you still have any questions, it would be helpful to know:

  • MongoDB server version.
  • Configured storage engine (for MongoDB 3.0+).

Regards,

Wan.

Reply all
Reply to author
Forward
0 new messages