Size of an index on the file system in elasticsearch -
i have simple setup consisting of 1 elasticsearch 0.90.2 running in ubuntu 13.04 64-bit system.
using _status
, information of 1 of indexes:
"edge":{ "index":{ "primary_size":"63.6kb", "primary_size_in_bytes":65127, "size":"63.6kb", "size_in_bytes":65127 }, "translog":{ "operations":0 }, "docs":{ "num_docs":43, "max_doc":63, "deleted_docs":20 }, "merges":{ "current":0, "current_docs":0, "current_size":"0b", "current_size_in_bytes":0, "total":0, "total_time":"0s", "total_time_in_millis":0, "total_docs":0, "total_size":"0b", "total_size_in_bytes":0 }, "refresh":{ "total":20, "total_time":"241ms", "total_time_in_millis":241 }, "flush":{ "total":20, "total_time":"47ms", "total_time_in_millis":47 }, "shards":{ "0":[ { "routing":{ "state":"started", "primary":true, "node":"bn6ndqxtqkgvdg5ewjo78q", "relocating_node":null, "shard":0, "index":"edge" }, "state":"started", "index":{ "size":"9.6kb", "size_in_bytes":9887 }, "translog":{ "id":1375245630892, "operations":0 }, "docs":{ "num_docs":8, "max_doc":12, "deleted_docs":4 }, "merges":{ "current":0, "current_docs":0, "current_size":"0b", "current_size_in_bytes":0, "total":0, "total_time":"0s", "total_time_in_millis":0, "total_docs":0, "total_size":"0b", "total_size_in_bytes":0 }, "refresh":{ "total":3, "total_time":"65ms", "total_time_in_millis":65 }, "flush":{ "total":4, "total_time":"11ms", "total_time_in_millis":11 } } ], "1":[ { "routing":{ "state":"started", "primary":true, "node":"bn6ndqxtqkgvdg5ewjo78q", "relocating_node":null, "shard":1, "index":"edge" }, "state":"started", "index":{ "size":"9kb", "size_in_bytes":9284 }, "translog":{ "id":1375245630912, "operations":0 }, "docs":{ "num_docs":6, "max_doc":9, "deleted_docs":3 }, "merges":{ "current":0, "current_docs":0, "current_size":"0b", "current_size_in_bytes":0, "total":0, "total_time":"0s", "total_time_in_millis":0, "total_docs":0, "total_size":"0b", "total_size_in_bytes":0 }, "refresh":{ "total":3, "total_time":"32ms", "total_time_in_millis":32 }, "flush":{ "total":4, "total_time":"7ms", "total_time_in_millis":7 } } ], "2":[ { "routing":{ "state":"started", "primary":true, "node":"bn6ndqxtqkgvdg5ewjo78q", "relocating_node":null, "shard":2, "index":"edge" }, "state":"started", "index":{ "size":"19kb", "size_in_bytes":19539 }, "translog":{ "id":1375245630990, "operations":0 }, "docs":{ "num_docs":11, "max_doc":16, "deleted_docs":5 }, "merges":{ "current":0, "current_docs":0, "current_size":"0b", "current_size_in_bytes":0, "total":0, "total_time":"0s", "total_time_in_millis":0, "total_docs":0, "total_size":"0b", "total_size_in_bytes":0 }, "refresh":{ "total":6, "total_time":"74ms", "total_time_in_millis":74 }, "flush":{ "total":4, "total_time":"12ms", "total_time_in_millis":12 } } ], "3":[ { "routing":{ "state":"started", "primary":true, "node":"bn6ndqxtqkgvdg5ewjo78q", "relocating_node":null, "shard":3, "index":"edge" }, "state":"started", "index":{ "size":"15.6kb", "size_in_bytes":16049 }, "translog":{ "id":1375245631046, "operations":0 }, "docs":{ "num_docs":9, "max_doc":13, "deleted_docs":4 }, "merges":{ "current":0, "current_docs":0, "current_size":"0b", "current_size_in_bytes":0, "total":0, "total_time":"0s", "total_time_in_millis":0, "total_docs":0, "total_size":"0b", "total_size_in_bytes":0 }, "refresh":{ "total":5, "total_time":"43ms", "total_time_in_millis":43 }, "flush":{ "total":4, "total_time":"10ms", "total_time_in_millis":10 } } ], "4":[ { "routing":{ "state":"started", "primary":true, "node":"bn6ndqxtqkgvdg5ewjo78q", "relocating_node":null, "shard":4, "index":"edge" }, "state":"started", "index":{ "size":"10.1kb", "size_in_bytes":10368 }, "translog":{ "id":1375245631130, "operations":0 }, "docs":{ "num_docs":9, "max_doc":13, "deleted_docs":4 }, "merges":{ "current":0, "current_docs":0, "current_size":"0b", "current_size_in_bytes":0, "total":0, "total_time":"0s", "total_time_in_millis":0, "total_docs":0, "total_size":"0b", "total_size_in_bytes":0 }, "refresh":{ "total":3, "total_time":"27ms", "total_time_in_millis":27 }, "flush":{ "total":4, "total_time":"7ms", "total_time_in_millis":7 } } ] } }
the total size of index should 63.6kb
response.
however, if check /var/lib/elasticsearch/elasticsearch/nodes/0/indices/edge
using nautilus, size reported 153.1kb
.
why there such big difference? how elasticsearch calculate size?
there couple of files not index files in ${data}/nodes/0/indices/edge
, such cluster state , transaction log. should able same number reported elasticsearch running wc -c /var/lib/elasticsearch/elasticsearch/nodes/0/indices/edge/*/index/*
.
Comments
Post a Comment