Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@naoNao89
Copy link
Contributor

@naoNao89 naoNao89 commented Nov 4, 2025

Add dd benchmark suite to validate O_DIRECT optimization theory from PR #9104.

This addresses the high priority checklist item in PR #9104. Results show 7-8x performance improvement with larger blocks (default 85.12ms vs 1M blocks 11.62ms), confirming that page-aligned buffers reduce syscall overhead

Benchmarks will track performance regression and establish baseline for O_DIRECT implementation.

- Create dd's first benchmark suite using divan framework
- Benchmark various block sizes (4K, 8K, 64K, 1M) to measure performance
- Test different dd scenarios: default, partial copy, skip, seek operations
- Measure impact of separate input/output block sizes
- All benchmarks use status=none to avoid output noise
- Benchmarks verify the O_DIRECT buffer alignment optimization
- Follows existing uutils benchmark patterns and conventions
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 4, 2025

CodSpeed Performance Report

Merging #9136 will degrade performances by 2.64%

Comparing naoNao89:feature/dd-benchmarks (cbbd265) with main (714a72e)

Summary

❌ 1 regression
✅ 122 untouched
🆕 9 new
⏩ 2 skipped1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
🆕 dd_copy_1m_blocks[128] N/A 1.4 ms N/A
🆕 dd_copy_4k_blocks[24] N/A 1.3 ms N/A
🆕 dd_copy_64k_blocks[64] N/A 574.6 µs N/A
🆕 dd_copy_8k_blocks[32] N/A 990.4 µs N/A
🆕 dd_copy_default[32] N/A 14 ms N/A
🆕 dd_copy_partial[32] N/A 518.6 µs N/A
🆕 dd_copy_separate_blocks[48] N/A 44.2 ms N/A
🆕 dd_copy_with_seek[48] N/A 2.3 ms N/A
🆕 dd_copy_with_skip[48] N/A 2.2 ms N/A
du_human_balanced_tree[(5, 4, 10)] 10.2 ms 10.5 ms -2.64%

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@github-actions
Copy link

github-actions bot commented Nov 4, 2025

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/tee (passes in this run but fails in the 'main' branch)

@naoNao89 naoNao89 closed this by deleting the head repository Nov 6, 2025
@naoNao89 naoNao89 reopened this Nov 7, 2025
@github-actions
Copy link

github-actions bot commented Nov 7, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)

@sylvestre
Copy link
Contributor

can we have tests that take between 100 to 300ms?
µs are too short and we only bench the init system

Increase benchmark dataset sizes to achieve consistent 100-300ms timing:
- dd_copy_default: 16 -> 32 MB
- dd_copy_4k_blocks: 16 -> 24 MB
- dd_copy_64k_blocks: 16 -> 64 MB
- dd_copy_1m_blocks: 16 -> 128 MB
- dd_copy_separate_blocks: 16 -> 48 MB
- dd_copy_partial: 16 -> 32 MB
- dd_copy_with_skip: 16 -> 48 MB
- dd_copy_with_seek: 16 -> 48 MB
- dd_copy_8k_blocks: 16 -> 32 MB

This ensures stable, repeatable benchmark measurements across different systems.
@github-actions
Copy link

github-actions bot commented Nov 8, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants