为什么 AWS Elasticsearch 最小免费存储 space 指标与 cat 分配 api 不同

Why is the AWS Elasticsearch Minimum free storage space metric different to cat allocation api

我在 AWS 中有一个 Elasticsearch 集群,我被告知集群的最小存储空间 space 约为 2GB。在升级每个节点上的存储之前,我决定深入挖掘一下。作为参考,集群有 8 个节点,每个节点上有 35GB 的存储空间。我很难理解为什么每个节点的 FreeStorageSpace 指标(以及集群的最小 FreeStorageSpace 指标)不一致。

在 ES 实例运行状况选项卡上查看每个节点的可用存储 space:

当我cat/allocation:

最终,我试图确定我的节点上的可用存储 space 报告的最少存储量 space 是根据 Cloudwatch 指标剩余 2gb 还是根据 cat 分配 [=8.8gb] =32=] - 这将帮助我决定如何扩展。我了解 Amazon ES 在每个实例上保留一定百分比的存储 space 用于内部操作,但我认为这会减少上图中的 disk.avail。任何关于为什么这些不排队的见解都会很棒。

这是因为 AWS Elasticsearch 作为托管服务,有其自己的存储开销。

来自 AWS Documentation:

Operating system reserved space: By default, Linux reserves 5% of the file system for the root user for critical processes, system recovery, and to safeguard against disk fragmentation problems.

Amazon ES overhead: Amazon ES reserves 20% of the storage space of each instance (up to 20 GiB) for segment merges, logs, and other internal operations.

有两个指标可以查看您的免费存储空间:

FreeStorageSpace CW 指标 - 这将合并开销并显示最终用户可用的实际 space。

来自 AWS Documentation 的 FreeStorageSpace:

FreeStorageSpace will always be lower than the value that the Elasticsearch _cluster/stats API provides. Amazon ES reserves a percentage of the storage space on each instance for internal operations.

Elasticsearch API's - 由于这些是原生 Elasticsearch api's,它们将显示可用的原始 space高于实际 space.