From 6781009ee89fb0bd703d752b221865d066a76846 Mon Sep 17 00:00:00 2001 From: Alan Paxton Date: Thu, 2 Feb 2023 11:11:40 -0800 Subject: [PATCH] CI Benchmarking. Small configuration changes based on performance analysis. (#11074) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: First, we made a small reduction in DURATION_RW as runs were exceeding 1 hour and colliding with subsequent runs. See Mark Callaghan’s blog post at http://smalldatum.blogspot.com/2023/01/variance-in-rocksdb-benchmarks-on-cloud.html Configuration parameters which are not consistent with the following email from Mark (see the blog post for more context) have been updated. Where Mark has defined the parameter and we haven't, we define it explicitly. We will need to further monitor for an expected reduction in variance of test times: To match what I did: --- nsecs=1800 dbdir=/data/m/rx resultdir=bm.lc.nt1.cm1.d0 env WRITE_BUFFER_SIZE_MB=16 TARGET_FILE_SIZE_BASE_MB=16 MAX_BYTES_FOR_LEVEL_BASE_MB=64 MAX_BACKGROUND_JOBS=4 NUM_KEYS=20000000 CACHE_SIZE_MB=10240 DURATION_RW=$nsecs DURATION_RO=$nsecs MB_WRITE_PER_SEC=2 NUM_THREADS=1 COMPRESSION_TYPE=none CACHE_INDEX_AND_FILTER_BLOCKS=1 VALUE_SIZE=400 NUMA=1 MIN_LEVEL_TO_COMPRESS=3 COMPACTION_STYLE=leveled bash benchmark_compare.sh $dbdir $resultdir 7.8.fb env WRITE_BUFFER_SIZE_MB=16 TARGET_FILE_SIZE_BASE_MB=16 MAX_BYTES_FOR_LEVEL_BASE_MB=64 MAX_BACKGROUND_JOBS=4 NUM_KEYS=200000000 CACHE_SIZE_MB=10240 DURATION_RW=$nsecs DURATION_RO=$nsecs MB_WRITE_PER_SEC=2 NUM_THREADS=1 COMPRESSION_TYPE=lz4 CACHE_INDEX_AND_FILTER_BLOCKS=1 VALUE_SIZE=400 NUMA=1 MIN_LEVEL_TO_COMPRESS=3 COMPACTION_STYLE=leveled bash benchmark_compare.sh $dbdir $resultdir 7.8.fb Pull Request resolved: https://github.com/facebook/rocksdb/pull/11074 Reviewed By: ajkr Differential Revision: D42969668 Pulled By: cbi42 fbshipit-source-id: 1ea4e6a3901be4016108f93817eb58f74baac21a --- .circleci/config.yml | 13 +++++++++---- tools/benchmark_ci.py | 1 + 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 120cdf88b..cb1e518e5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -152,15 +152,15 @@ commands: steps: - run: name: "Test low-variance benchmarks" - command: ./tools/benchmark_ci.py --db_dir /tmp/rocksdb-benchmark-datadir --output_dir /tmp/benchmark-results --num_keys 10000000 + command: ./tools/benchmark_ci.py --db_dir /tmp/rocksdb-benchmark-datadir --output_dir /tmp/benchmark-results --num_keys 20000000 environment: LD_LIBRARY_PATH: /usr/local/lib # How long to run parts of the test(s) DURATION_RO: 400 - DURATION_RW: 700 + DURATION_RW: 600 # Keep threads within physical capacity of server (much lower than default) NUM_THREADS: 1 - MAX_BACKGROUND_JOBS: 3 + MAX_BACKGROUND_JOBS: 4 # Don't run a couple of "optional" initial tests CI_TESTS_ONLY: "true" # Reduce configured size of levels to ensure more levels in the leveled compaction LSM tree @@ -170,7 +170,12 @@ commands: # The benchmark host has 32GB memory # The following values are tailored to work with that # Note, tests may not exercise the targeted issues if the memory is increased on new test hosts. - + COMPRESSION_TYPE: "none" + CACHE_INDEX_AND_FILTER_BLOCKS: 1 + MIN_LEVEL_TO_COMPRESS: 3 + CACHE_SIZE_MB: 10240 + MB_WRITE_PER_SEC: 2 + NUMA: 1 post-benchmarks: steps: diff --git a/tools/benchmark_ci.py b/tools/benchmark_ci.py index de9f69cf9..1e95ba73c 100755 --- a/tools/benchmark_ci.py +++ b/tools/benchmark_ci.py @@ -49,6 +49,7 @@ class Config: "SUBCOMPACTIONS", "COMPACTION_STYLE", "CI_TESTS_ONLY", + "NUMA", ]