elasticsearch使用的磁盘空间比它在索引信息中显示的要多得多

wlp8pajw  于 2021-07-15  发布在  ElasticSearch
关注(0)|答案(0)|浏览(323)

elasticsearch(在docker中)使用的磁盘空间比索引统计信息中显示的要多得多。
它只显示7.8gb

curl 'localhost:9201/_cat/indices?v'
health status index         uuid                   pri rep docs.count docs.deleted store.size pri.store.size
yellow open   my_index LL319QgqSJ6FNDEh2ZQw8g   1   1   24896180            0      7.8gb          7.8gb
yellow open   test          u0IJ7cocSXSlRST_qCPhHg   1   1          8            0      5.5kb          5.5kb

但是当我看到docker容器中的磁盘空间信息时,我看到了以下内容

docker exec -it es bash
    df -h
    Filesystem      Size  Used Avail Use% Mounted on
overlay         278G   51G  213G  20% /
tmpfs            64M     0   64M   0% /dev
tmpfs           3.0G     0  3.0G   0% /sys/fs/cgroup
shm              64M     0   64M   0% /dev/shm
/dev/vda1       278G   51G  213G  20% /etc/hosts
tmpfs           3.0G     0  3.0G   0% /proc/acpi
tmpfs           3.0G     0  3.0G   0% /sys/firmware

我找到了这样的命令。

curl 'localhost:9201/_cat/allocation?v' 
shards disk.indices disk.used disk.avail disk.total disk.percent host ip node 
2 7.8gb 65gb 212.6gb 277.6gb 23 172.17.0.2 172.17.0.2 571fa89f411f 2 UNASSIGNED

但我不明白es花了多少65-7.8~57gb的磁盘空间?
据我所知,disk.used使用了shows的elasticsearch,包括translog和unassigned shard;节点的操作系统;节点“”上的任何其他应用程序或文件。如何减少磁盘的消耗?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题