Skip to content

Instantly share code, notes, and snippets.

@kgorman
Created March 23, 2015 22:41
Show Gist options
  • Save kgorman/7d48f37ec5b23efb1475 to your computer and use it in GitHub Desktop.
Save kgorman/7d48f37ec5b23efb1475 to your computer and use it in GitHub Desktop.
compression, ocean data 2.6 vs 3.0
Consider:
> db.ocean_data.findOne()
{
"_id" : ObjectId("53e4fcc42239c23dce3cb7bc"),
"station_id" : 8461490,
"loc" : {
"type" : "Point",
"coordinates" : [
-72.09,
41.3614
]
},
"name" : "New London",
"products" : [
{
"v" : 69.4,
"t" : ISODate("2014-08-08T16:24:00Z"),
"name" : "water_temperature",
"f" : "0,0,0"
},
{
"v" : 77,
"t" : ISODate("2014-08-08T16:24:00Z"),
"name" : "air_temperature",
"f" : "0,0,0"
},
{
"d" : "360.00",
"g" : "8.75",
"f" : "0,0",
"s" : "4.08",
"t" : ISODate("2014-08-08T16:24:00Z"),
"dr" : "N",
"name" : "wind"
},
{
"v" : 1015.8,
"t" : ISODate("2014-08-08T16:24:00Z"),
"name" : "air_pressure",
"f" : "0,0,0"
}
],
"fetch_date" : ISODate("2014-08-08T16:37:22.640Z"),
"id" : 8461490
}
> db.ocean_data.stats()
{
"ns" : "admin.ocean_data",
"count" : 4227631,
"size" : 2269568784,
"avgObjSize" : 536,
"storageSize" : 2653351904,
"numExtents" : 21,
"nindexes" : 5,
"lastExtentSize" : 536600560,
"paddingFactor" : 1,
"systemFlags" : 1,
"userFlags" : 1,
"totalIndexSize" : 1712397792,
"indexSizes" : {
"_id_" : 244388816,
"station_id_hashed" : 265417488,
"loc_2dsphere" : 283004064,
"products.t_-1" : 167885984,
"products.name_-1" : 751701440
},
"ok" : 1
}
> db.ocean_data.stats()
{
"ns" : "admin.ocean_data",
"count" : 4227631,
"size" : 1772605820,
"avgObjSize" : 419,
"storageSize" : 684040192,
"capped" : false,
"wiredTiger" : {
"metadata" : {
"formatVersion" : 1
},
"creationString" : "allocation_size=4KB,app_metadata=(formatVersion=1),block_allocation=best,block_compressor=snappy,cache_resident=0,checkpoint=(WiredTigerCheckpoint.2=(addr=\"01e3026c1681e47b5d2885e3026c1781e44d1019d8e3026c1881e4be07f0e6808080e428c57fc0e428c48fc0\",order=2,time=1427150035,size=683978752,write_gen=55965)),checkpoint_lsn=(22,68783744),checksum=uncompressed,collator=,columns=,dictionary=0,format=btree,huffman_key=,huffman_value=,id=14,internal_item_max=0,internal_key_max=0,internal_key_truncate=,internal_page_max=4KB,key_format=q,key_gap=10,leaf_item_max=0,leaf_key_max=0,leaf_page_max=32KB,leaf_value_max=1MB,memory_page_max=10m,os_cache_dirty_max=0,os_cache_max=0,prefix_compression=0,prefix_compression_min=4,split_deepen_min_child=0,split_deepen_per_child=0,split_pct=90,value_format=u,version=(major=1,minor=1)",
"type" : "file",
"uri" : "statistics:table:collection-11-7990094587935123507",
"LSM" : {
"bloom filters in the LSM tree" : 0,
"bloom filter false positives" : 0,
"bloom filter hits" : 0,
"bloom filter misses" : 0,
"bloom filter pages evicted from cache" : 0,
"bloom filter pages read into cache" : 0,
"total size of bloom filters" : 0,
"sleep for LSM checkpoint throttle" : 0,
"chunks in the LSM tree" : 0,
"highest merge generation in the LSM tree" : 0,
"queries that could have benefited from a Bloom filter that did not exist" : 0,
"sleep for LSM merge throttle" : 0
},
"block-manager" : {
"file allocation unit size" : 4096,
"blocks allocated" : 0,
"checkpoint size" : 683978752,
"allocations requiring file extension" : 0,
"blocks freed" : 0,
"file magic number" : 120897,
"file major version number" : 1,
"minor version number" : 0,
"file bytes available for reuse" : 53248,
"file size in bytes" : 684040192
},
"btree" : {
"column-store variable-size deleted values" : 0,
"column-store fixed-size leaf pages" : 0,
"column-store internal pages" : 0,
"column-store variable-size leaf pages" : 0,
"pages rewritten by compaction" : 0,
"number of key/value pairs" : 0,
"fixed-record size" : 0,
"maximum tree depth" : 3,
"maximum internal page key size" : 368,
"maximum internal page size" : 4096,
"maximum leaf page key size" : 3276,
"maximum leaf page size" : 32768,
"maximum leaf page value size" : 1048576,
"overflow pages" : 0,
"row-store internal pages" : 0,
"row-store leaf pages" : 0
},
"cache" : {
"bytes read into cache" : 71,
"bytes written from cache" : 0,
"checkpoint blocked page eviction" : 0,
"unmodified pages evicted" : 0,
"page split during eviction deepened the tree" : 0,
"modified pages evicted" : 0,
"data source pages selected for eviction unable to be evicted" : 0,
"hazard pointer blocked page eviction" : 0,
"internal pages evicted" : 0,
"pages split during eviction" : 0,
"in-memory page splits" : 0,
"overflow values cached in memory" : 0,
"pages read into cache" : 1,
"overflow pages read into cache" : 0,
"pages written from cache" : 0
},
"compression" : {
"raw compression call failed, no additional data available" : 0,
"raw compression call failed, additional data available" : 0,
"raw compression call succeeded" : 0,
"compressed pages read" : 0,
"compressed pages written" : 0,
"page written failed to compress" : 0,
"page written was too small to compress" : 0
},
"cursor" : {
"create calls" : 0,
"insert calls" : 0,
"bulk-loaded cursor-insert calls" : 0,
"cursor-insert key and value bytes inserted" : 0,
"next calls" : 0,
"prev calls" : 0,
"remove calls" : 0,
"cursor-remove key bytes removed" : 0,
"reset calls" : 0,
"search calls" : 0,
"search near calls" : 0,
"update calls" : 0,
"cursor-update value bytes updated" : 0
},
"reconciliation" : {
"dictionary matches" : 0,
"internal page multi-block writes" : 0,
"leaf page multi-block writes" : 0,
"maximum blocks required for a page" : 0,
"internal-page overflow keys" : 0,
"leaf-page overflow keys" : 0,
"overflow values written" : 0,
"pages deleted" : 0,
"page checksum matches" : 0,
"page reconciliation calls" : 0,
"page reconciliation calls for eviction" : 0,
"leaf page key bytes discarded using prefix compression" : 0,
"internal page key bytes discarded using suffix compression" : 0
},
"session" : {
"object compaction" : 0,
"open cursor count" : 0
},
"transaction" : {
"update conflicts" : 0
}
},
"nindexes" : 5,
"totalIndexSize" : 179036160,
"indexSizes" : {
"_id_" : 55345152,
"station_id_hashed" : 37826560,
"loc_2dsphere" : 28094464,
"products.t_-1" : 14024704,
"products.name_-1" : 43745280
},
"ok" : 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment