Wetts's blog

Stay Hungry, Stay Foolish.

0%

MongoDB-How can MongoDB dataSize be larger than storageSize?

转自:http://stackoverflow.com/questions/34054780/how-can-mongodb-datasize-be-larger-than-storagesize

The storageSize metric is equal to the size (in bytes) of all the data extents in the database. Without compression, this number is larger than dataSize because it includes yet-unused space (in data extents) and space vacated by deleted or moved documents within extents. However, as you are using the WiredTiger storage engine, data is compressed on the disk and is therefore smaller than the dataSize.