/_cat/indices size not matching actual size on disk?

Hi there,

I was trying to use /_cat/indices to estimate total index disk usage:

GET /_cat/indices?format=json
[
  {
    "health": "yellow",
    "status": "open",
    "index": "size218",
    "uuid": "vHM0hvdWQbmk2ZOhRwpLkg",
    "pri": "5",
    "rep": "1",
    "docs.count": "10000",
    "docs.deleted": "0",
    "store.size": "66.8mb",
    "pri.store.size": "66.8mb"
  }
]

Now when I go to the file system and measure I get:

du -h /opt/elasticsearch-6.2.2/data/nodes/0/indices
21M     /opt/elasticsearch-6.2.2/data/nodes/0/indices/vHM0hvdWQbmk2ZOhRwpLkg/2/translog
8.0K    /opt/elasticsearch-6.2.2/data/nodes/0/indices/vHM0hvdWQbmk2ZOhRwpLkg/2/_state
14M     /opt/elasticsearch-6.2.2/data/nodes/0/indices/vHM0hvdWQbmk2ZOhRwpLkg/2/index
35M     /opt/elasticsearch-6.2.2/data/nodes/0/indices/vHM0hvdWQbmk2ZOhRwpLkg/2
21M     /opt/elasticsearch-6.2.2/data/nodes/0/indices/vHM0hvdWQbmk2ZOhRwpLkg/0/translog
8.0K    /opt/elasticsearch-6.2.2/data/nodes/0/indices/vHM0hvdWQbmk2ZOhRwpLkg/0/_state
14M     /opt/elasticsearch-6.2.2/data/nodes/0/indices/vHM0hvdWQbmk2ZOhRwpLkg/0/index
35M     /opt/elasticsearch-6.2.2/data/nodes/0/indices/vHM0hvdWQbmk2ZOhRwpLkg/0
8.0K    /opt/elasticsearch-6.2.2/data/nodes/0/indices/vHM0hvdWQbmk2ZOhRwpLkg/_state
20M     /opt/elasticsearch-6.2.2/data/nodes/0/indices/vHM0hvdWQbmk2ZOhRwpLkg/3/translog
8.0K    /opt/elasticsearch-6.2.2/data/nodes/0/indices/vHM0hvdWQbmk2ZOhRwpLkg/3/_state
13M     /opt/elasticsearch-6.2.2/data/nodes/0/indices/vHM0hvdWQbmk2ZOhRwpLkg/3/index
33M     /opt/elasticsearch-6.2.2/data/nodes/0/indices/vHM0hvdWQbmk2ZOhRwpLkg/3
21M     /opt/elasticsearch-6.2.2/data/nodes/0/indices/vHM0hvdWQbmk2ZOhRwpLkg/4/translog
8.0K    /opt/elasticsearch-6.2.2/data/nodes/0/indices/vHM0hvdWQbmk2ZOhRwpLkg/4/_state
14M     /opt/elasticsearch-6.2.2/data/nodes/0/indices/vHM0hvdWQbmk2ZOhRwpLkg/4/index
34M     /opt/elasticsearch-6.2.2/data/nodes/0/indices/vHM0hvdWQbmk2ZOhRwpLkg/4
21M     /opt/elasticsearch-6.2.2/data/nodes/0/indices/vHM0hvdWQbmk2ZOhRwpLkg/1/translog
8.0K    /opt/elasticsearch-6.2.2/data/nodes/0/indices/vHM0hvdWQbmk2ZOhRwpLkg/1/_state
14M     /opt/elasticsearch-6.2.2/data/nodes/0/indices/vHM0hvdWQbmk2ZOhRwpLkg/1/index
34M     /opt/elasticsearch-6.2.2/data/nodes/0/indices/vHM0hvdWQbmk2ZOhRwpLkg/1
169M    /opt/elasticsearch-6.2.2/data/nodes/0/indices/vHM0hvdWQbmk2ZOhRwpLkg
169M    /opt/elasticsearch-6.2.2/data/nodes/0/indices

So there is a huge mismatch. /_cat/indices is reporting 66.8mb and file system is reporting 169mb. Does anybody know what is going here? What exactly is /_cat/indices reporting as size and why the mismatch?
Does it count only 'index' ? And if so, why such a huge 'translog'? Any way I can reduce that size?

Thanks,

Francisco.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.