From 9c1eee0debc95a03a961500c59fa516389d4f202 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sun, 22 Mar 2026 21:10:23 +0000 Subject: [PATCH] Clear ClickHouse filesystem cache between cold runs in datalake benchmarks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The benchmarks drop the OS page cache before each query group, but the ClickHouse filesystem cache in `/dev/shm/clickhouse/` was not being cleared. This made cold run numbers unreliable — data cached by the filesystem cache from previous queries survived across runs, making cold times appear much faster than they actually are. Co-Authored-By: Claude Opus 4.6 (1M context) --- clickhouse-datalake-partitioned/run.sh | 1 + clickhouse-datalake/run.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/clickhouse-datalake-partitioned/run.sh b/clickhouse-datalake-partitioned/run.sh index 4b5cf99f4..6f98bf537 100755 --- a/clickhouse-datalake-partitioned/run.sh +++ b/clickhouse-datalake-partitioned/run.sh @@ -5,6 +5,7 @@ QUERY_NUM=1 ./clickhouse local --path . --query="$(cat create.sql)" cat queries.sql | while read -r query; do + rm -rf /dev/shm/clickhouse/* sync && echo 3 | sudo tee /proc/sys/vm/drop_caches > /dev/null echo -n "[" diff --git a/clickhouse-datalake/run.sh b/clickhouse-datalake/run.sh index 4b5cf99f4..6f98bf537 100755 --- a/clickhouse-datalake/run.sh +++ b/clickhouse-datalake/run.sh @@ -5,6 +5,7 @@ QUERY_NUM=1 ./clickhouse local --path . --query="$(cat create.sql)" cat queries.sql | while read -r query; do + rm -rf /dev/shm/clickhouse/* sync && echo 3 | sudo tee /proc/sys/vm/drop_caches > /dev/null echo -n "["