From 5e2b7dc9eada85938597d4b24b65743d45f4ec5b Mon Sep 17 00:00:00 2001 From: MyroTk Date: Mon, 24 Aug 2026 13:09:46 -0400 Subject: [PATCH 1/2] limit max threads --- tests/sqllogic/connection.py | 1 + tests/sqllogic/runner.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/sqllogic/connection.py b/tests/sqllogic/connection.py index 66e03b25cb48..24b0ff0d0ddd 100644 --- a/tests/sqllogic/connection.py +++ b/tests/sqllogic/connection.py @@ -103,6 +103,7 @@ def default_clickhouse_native_conn_args(): "max_bytes_before_external_sort": 128 * 1024 * 1024, "max_bytes_ratio_before_external_group_by": 0.0, "max_bytes_ratio_before_external_sort": 0.0, + "max_threads": 1, } ) diff --git a/tests/sqllogic/runner.py b/tests/sqllogic/runner.py index 5b7b4dd9f2e2..ac1aa046e070 100755 --- a/tests/sqllogic/runner.py +++ b/tests/sqllogic/runner.py @@ -142,7 +142,9 @@ def _child_process(setup_kwargs, runner_kwargs, input_dir, output_dir, test): def run_all_tests_in_parallel(setup_kwargs, runner_kwargs, input_dir, output_dir): - process_count = max(1, os.cpu_count() - 4) + cpu_count = os.cpu_count() or 2 + process_count = max(1, min(8, cpu_count - 4)) + logger.info("Running tests with %s worker processes (cpu_count=%s)", process_count, cpu_count) tests = list(TestRunner.list_tests(input_dir)) with multiprocessing.Pool(process_count) as pool: async_results = [ From dddb8303180b119f683100064c16ce333a3e345d Mon Sep 17 00:00:00 2001 From: MyroTk Date: Mon, 24 Aug 2026 20:57:04 -0400 Subject: [PATCH 2/2] increase workers to 10 --- tests/sqllogic/runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sqllogic/runner.py b/tests/sqllogic/runner.py index ac1aa046e070..bd4c9818f53f 100755 --- a/tests/sqllogic/runner.py +++ b/tests/sqllogic/runner.py @@ -143,7 +143,7 @@ def _child_process(setup_kwargs, runner_kwargs, input_dir, output_dir, test): def run_all_tests_in_parallel(setup_kwargs, runner_kwargs, input_dir, output_dir): cpu_count = os.cpu_count() or 2 - process_count = max(1, min(8, cpu_count - 4)) + process_count = max(1, min(10, cpu_count - 4)) logger.info("Running tests with %s worker processes (cpu_count=%s)", process_count, cpu_count) tests = list(TestRunner.list_tests(input_dir)) with multiprocessing.Pool(process_count) as pool: