![[Feature Request - RAGFlow+OceanBase] Storage Engine Performance Benchmarking](https://www.chat-gpts.plus/wp-content/uploads/2026/07/12773-d07f4b1f.jpg)
[Feature Request – RAGFlow+OceanBase] Storage Engine Performance Benchmarking
快速结论:这是一个功能请求,旨在为RAGFlow创建性能基准测试脚本,用于对比Elasticsearch、Infinity和OceanBase在文档存储、向量检索和全文搜索等场景下的表现。该Issue已关闭,但并未提供完整的解决方案或基准测试结果。
问题场景
用户正在参与RAGFlow + OceanBase Hackathon活动,希望为RAGFlow项目添加一个性能基准测试框架。具体来说,需要在test/benchmark/storage_benchmark.py中实现一个类,用于对比不同存储引擎的性能表现。该请求涉及开发一个约200行代码的Python测试脚本,难度评分为4星(高),优先级为绿色(低)。
报错原文
# 这不是一个错误报告,而是一个功能请求。
# Issue 标题: [Feature Request - RAGFlow+OceanBase] Storage Engine Performance Benchmarking
# 核心实现框架预期为:
class StorageBenchmark:
def __init__(self, engine_type):
self.engine = self.create_engine(engine_type)
def benchmark_write(self, num_docs, doc_size):
"""Test write performance"""
pass
def benchmark_vector_search(self, dimension, top_k):
"""Test vector retrieval performance"""
pass
def benchmark_fulltext_search(self, query):
"""Test full-text search performance"""
pass
def run_all_benchmarks(self):
"""Run all tests and generate report"""
pass
原因分析
可能原因:该Issue是一个功能增强请求,而非错误报告。它源于RAGFlow + OceanBase Hackathon活动,目的是为社区提供客观的存储引擎性能测试数据。然而,该Issue已关闭,且评论暗示RAGFlow项目正在从Python迁移到Go(API完全一致),因此可能不再支持或维护Python版本的基准测试。
环境排查
- 需要确认RAGFlow项目的当前语言版本(Python vs Go)。
- 检查存储引擎的兼容性:Elasticsearch、Infinity、OceanBase。
- 确认基准测试所需的依赖:如
elasticsearch、oceanbase等Python客户端库。 - 确认RAGFlow版本是否仍处于Python维护阶段。
解决步骤
- 确认项目状态:查看RAGFlow项目通知或文档,确认Python版本是否已弃用。如果已迁移到Go,则Python基准测试可能不再适用。可优先尝试联系项目维护者确认。
- 实现基准测试框架:如果项目仍维护Python版本,按Issue要求创建
test/benchmark/storage_benchmark.py文件,实现StorageBenchmark类。 - 实现各场景测试:完成文档存储、向量检索、全文搜索和并发性能的测试方法。
- 生成报告:实现
run_all_benchmarks方法,输出Markdown格式的性能比较报告。 - 注册测试用例:确保
test/benchmark/README.md中添加相应的测试文档。
验证方法
运行python test/benchmark/storage_benchmark.py,确保测试能完整执行并生成性能报告。生成结果应为Markdown格式,包含各引擎的优劣分析和建议。



