我有一个非常简单的设置,包括一个在 Ubuntu 13.04 64 位系统中运行的 elasticsearch 0.90.2。
使用_status
,这是我的索引之一的信息:
"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
}
}
]
}
}
索引的总大小应该63.6kb
来自响应。
但是,如果我/var/lib/elasticsearch/elasticsearch/nodes/0/indices/edge
使用 nautilus 检查,大小会报告为153.1kb
.
为什么会有这么大的差异?elasticsearch如何计算大小?