OpenMLDB Benchmak tool is used for tesing the performance of OpenMLDB's online SQL engine.
You may also refer to FEBench (https://github.com/decis-bench/febench), which is a more comprehensive benchmark for real-time feature extraction developed by a third-party, comparing the performance between OpenMLDB and Flink.
cd benchmark
mvn clean package
mkdir -p /work/benchmark/conf /work/benchmark/lib
cp target/openmldb-benchmark-0.5.0.jar /work/benchmark/lib
cp src/main/resources/conf.properties /work/benchmark/conf
ZK_CLUSTER=127.0.0.1:32200
ZK_PATH=/udf_test
cd /work/benchmark
java -cp conf/:lib/* com._4paradigm.openmldb.benchmark.OpenMLDBPerfBenchmark
The above testing run with the default confguration. You can modify WINDOW_NUM
, WINDOW_SIZE
and JOIN_NUM
in the confguration file if you want to evaluate the performance impact of those parameters.
Moreover, the default number of threads is 10. You need to set the thread number by Threads
annotation in OpenMLDBPerfBenchmark.java
or OpenMLDBLongWindowBenchmark.java
as below and compile again if you want to test under other thread confguration.
@Threads(10)
If you want to test Throughput
, set BenchmarkMode
and OutputTimeUnit
annotation in OpenMLDBPerfBenchmark.java
or OpenMLDBLongWindowBenchmark.java
file as below:
@BenchmarkMode(Mode.Throughput)
@OutputTimeUnit(TimeUnit.SECONDS)
Update WINDOW_SIZE
in confguration file and execute the following command.
java -cp conf/:lib/ com._4paradigm.openmldb.benchmark.OpenMLDBLongWindowBenchmark
Note: If you want to test specific SQL, you can modify here
We provide two ways to measure OpenMLDB's memory usage. First, you can conduct comparative testing using a dataset composed of randomly generated data in a specified format. Second, you can conduct comparative testing using the existing TalkingData dataset.
Configure memory.properties
You need to configure the service addresses for your OpenMLDB and Redis instances in the configuration file. Additionally, you can configure parameters such as KEY_LENGTH, VALUE_LENGTH, VALUE_PER_KEY, and TOTAL_KEY_NUM based on your requirements, which are used for Approach One.
Start the test by executing the following command:
# using generated dataset
java -cp conf/:lib/* com._4paradigm.openmldb.memoryusagecompare.BenchmarkMemoryUsage
# using TalkingData
java -cp conf/:lib/* com._4paradigm.openmldb.memoryusagecompare.BenchmarkMemoryUsageByTalkingData
The test report will be printed at the end of the test execution.
Similar to memory usage comparison testing, we also provide two approaches for testing index memory usage.
Configure memory.properties.
Configure the service addresses for your OpenMLDB.
Start the test by executing the following command:
# using generated dataset
java -cp conf/:lib/* com._4paradigm.openmldb.memoryusagecompare.BenchmarkIndexMemoryUsage
# using TalkingData
java -cp conf/:lib/* com._4paradigm.openmldb.memoryusagecompare.BenchmarkIndexMemoryUsageByTalkingData
The test report will be printed at the end of the test execution.
Note:
Comparing the query performance of OpenMLDB and Redis under the same scenario.
Configure memory.properties.
Configure the service addresses for your OpenMLDB and Redis instances, and modify the configuration parameters in the 'query perf test' section according to the requirements.
(Optional) Load data into OpenMLDB.
Start the test by executing the following command:
java -cp conf/:lib/* com._4paradigm.openmldb.memoryusagecompare.BenchmarkQueryPerf
The test report will be printed at the end of the test execution.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。