curl -H "Content-Type:application/json" -XPUT http://localhost:9200/_cluster/settings -d '{"persistent" : {"indices.segment_memory.off_heap.enable" : true}}'
curl -H "Content-Type:application/json" -XPUT http://localhost:9210/_cluster/settings -d '{"persistent" : {"indices.segment_memory.off_heap.size" : "5gb"}}'
方案对比 | FST 存放位置 | FST 内存占用量 | 单个 FST 堆内存占用量 | 单节点最大磁盘数据量 |
原生方案 | 堆内内存 | 全量存储在内存中,内存占用量大 | MB 级别(源生 FST 数据结构) | 10TB(需调优) |
优化方案 | 堆外内存 | Cache LRU 淘汰冷数据 内存占用量小 | 100Byte左右(Cache Key 大小) | 50TB |
写入性能对比 | 内存使用量(MB) | GC 时长(s) | TPS | 90%时延(ms) | 99%时延(ms) |
原生方案 | 402.59 | 20.453 | 198051 | 463.201 | 617.701 |
优化方案 | 102.217 | 18.969 | 201188 | 455.124 | 618.379 |
Diff | 优74.6% | 优7.26% | 优1.58% | 优1.74% | 劣0.11% |
查询性能对比 | 内存使用量(MB) | GC 时长(s) | QPS | 90%时延(ms) | 99%时延(ms) |
原生方案 | 401.806 | 20.107 | 200.057 | 3.96062 | 11.1894 |
优化方案 | 101.004 | 19.228 | 200.087 | 3.87805 | 11.2316 |
Diff | 优74.9% | 优4.37% | - | 优2.00% | 劣0.38% |
文档反馈