--- title: "Easysearch VS Opensearch 数据写入与存储性能对比" date: 2025-03-24 lastmod: 2025-03-24 description: "本文对比 Easysearch 和 Opensearch 数据写入和数据存储方面的性能。" tags: ["Easysearch", "Opensearch"] summary: "本文记录 Easysearch 和 Opensearch 数据写入和数据存储方面的性能对比。 准备 # 压测工具:INFINI Loadgen 对比版本: Easysearch 1.11.1(lucene 8.11.4) Opensearch 2.19.1(lucene 9.12.1) 节点 JVM 配置:1G 数据写入 # 压测命令: ./loadgen-linux-amd64 -c 20 -d 300 Opensearch # PUT infinilabs { "settings": { "number_of_shards": "1", "number_of_replicas": 0, "index.refresh_interval": "120s", "translog": { "durability": "async", "sync_interval": "120s" } } } Easysearch # PUT infinilabs { "settings": { "number_of_shards": "1", "number_of_replicas": 0, "index." --- 本文记录 Easysearch 和 Opensearch 数据写入和数据存储方面的性能对比。 ## 准备 1. 压测工具:INFINI Loadgen 2. 对比版本: - Easysearch 1.11.1(lucene 8.11.4) - Opensearch 2.19.1(lucene 9.12.1) 3. 节点 JVM 配置:1G ## 数据写入 压测命令: ```shell ./loadgen-linux-amd64 -c 20 -d 300 ``` ### Opensearch ```plain PUT infinilabs { "settings": { "number_of_shards": "1", "number_of_replicas": 0, "index.refresh_interval": "120s", "translog": { "durability": "async", "sync_interval": "120s" } } } ``` {{% load-img "/img/blog/2025/easysearch-vs-opensearch-performance-comparison/01.png" "" %}} ### Easysearch ```plain PUT infinilabs { "settings": { "number_of_shards": "1", "number_of_replicas": 0, "index.refresh_interval": "120s", "translog": { "durability": "async", "sync_interval": "120s" } } } ``` {{% load-img "/img/blog/2025/easysearch-vs-opensearch-performance-comparison/02.png" "" %}} ## 数据存储 压测命令: ```shell ./loadgen-linux-amd64 -c 20 -d 600 -l 10000 ``` ### Opensearch: zstd 压缩 ```plain PUT infinilabs { "settings": { "number_of_shards": "1", "number_of_replicas": 0, "index.refresh_interval": "120s", "translog": { "durability": "async", "sync_interval": "120s" }, "index.codec": "zstd" } } ``` {{% load-img "/img/blog/2025/easysearch-vs-opensearch-performance-comparison/03.png" "" %}} {{% load-img "/img/blog/2025/easysearch-vs-opensearch-performance-comparison/04.png" "" %}} ### Easysearch: zstd + source_reuse 压缩 ```plain PUT infinilabs { "settings": { "number_of_shards": "1", "number_of_replicas": 0, "index.refresh_interval": "120s", "translog": { "durability": "async", "sync_interval": "120s" }, "index.codec": "ZSTD", "index.source_reuse": "true" } } ``` {{% load-img "/img/blog/2025/easysearch-vs-opensearch-performance-comparison/05.png" "" %}} {{% load-img "/img/blog/2025/easysearch-vs-opensearch-performance-comparison/06.png" "" %}} ## 结论 1. 数据写入方面,Easysearch(lucene 8.x) 和 Opensearch(lucene 9.x)基本持平; 2. 数据存储方面,相同数据量经过 Easysearch 和 Opensearch 的压缩后,Easysearch 占用的空间明显少于 Opensearch,并且数据量越大越明显。