Repository navigation
Reduce disk usage of performance tests - #111377
Conversation
Otherwise they take too much space
It's too slow and dominates runtime
|
Workflow [PR], commit [e9f7b3c] Summary: ✅
AI ReviewSummaryThis PR tries to reduce performance-test disk usage by cleaning Findings[ci/jobs/performance_tests.py:1394] Suggested fix: reset Final VerdictStatus: Minimum required actions:
|
| print(f"Test Files ({len(test_files)}): [{test_files}]") | ||
| assert test_files | ||
|
|
||
| def cleanup_user_files(): |
There was a problem hiding this comment.
cleanup_user_files() only runs after CHServer.run_test returns, but run_test delegates to tests/performance/scripts/perf.py, and that harness executes the whole XML test in one shot: create/fill, then prewarm, then repeated measured runs for every sampled query, and only then exits.
That means this cleanup never bounds peak usage within one test. tests/performance/file_table_function.xml still reuses the same file('test_file', ...) path for timed inserts without truncation, so the prewarm plus roughly seven measured runs of up to ten sampled queries can keep appending into user_files/test_file until the disk fills up before line 1394 is ever reached. Can we move the reset into the per-query path (or otherwise truncate/reset benchmarks that repeatedly write to the same file() path) so the fix actually caps peak disk usage instead of only cleaning end-of-test leftovers?
There was a problem hiding this comment.
Correct that this doesn't bound the peak within one test – that's intentional. The observed failures were caused by accumulation across tests, not a single huge test.
Truncating inside measured query adds a huge speed overhead and we don't see what we are measuring anymore. Better avoided
…usage Reduce disk usage of performance tests
Performance tests started failing with out-of-disk errors [1, 2, 3]. This PR adds a clean up of files created during performance tests by
INSERT INTO FUNCTION file(...). Previously, they used to accumulate until the end of the job.It also decreases table sizes of really heavy tests:
min_max_index: 429M -> 107M rows, disk 15.2 GB -> 3.0 GB.join_convert_to_fixed_hash_table: 200M -> 50M rows, disk 27.4 GB -> 6.1 GB.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Version info
26.7.1.1337(included in26.7and later)