Skip to content

vk-registry: set TCP_NODELAY on accepted connections - #9

Open
kurze wants to merge 1 commit into
virtkit-dev:mainfrom
kurze:vk-registry/nodelay
Open

kurze wants to merge 1 commit into
virtkit-dev:mainfrom
kurze:vk-registry/nodelay

Conversation

@kurze

@kurze kurze commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

A small response goes out as a head write then a body write.
With Nagle's algorithm on, the body waits for the client's delayed ACK, about
40 ms on Linux (at least on my env), so every small object or manifest read on a kept-alive connection paid it.
A Go build cache over the DAV tree, mostly small entries, read back 3 to 4 times slower than with the option set.

useful if we want to use vk-registry as compilation cache server too

Copilot AI balanced review requested due to automatic review settings November 5, 2026 12:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The ignored TCP_NODELAY result lacks the Rust-guideline-required explanation of why failure is safe to ignore.

1 open issue
What changed in this PR

This PR enables TCP_NODELAY on accepted registry connections to reduce delayed-ACK latency when clients repeatedly read small objects.

Changes:

  • Set TCP_NODELAY in the registry’s connection acceptance loop.
  • Add a regression test checking median latency for repeated small DAV reads.
  • Document the latency improvement in the changelog.
File Description
vk-registry/​tests/​dav_e2e.rs Adds a small-object read latency regression test.
vk-registry/​src/​lib.rs Enables TCP_NODELAY on accepted connections.
CHANGELOG.md Records the small-read latency fix.

Review effort: Balanced

Comment thread vk-registry/src/lib.rs Resolved
@kurze
kurze force-pushed the vk-registry/nodelay branch from a040f34 to a6e67bb Compare November 5, 2026 12:27
A small response goes out as a head write then a body write. With
Nagle's algorithm on, the body waits for the client's delayed ACK, about
40 ms on Linux, so every small object or manifest read on a kept-alive
connection paid it. A Go build cache over the DAV tree, mostly small
entries, read back 3 to 4 times slower than with the option set.
@kurze
kurze force-pushed the vk-registry/nodelay branch from ef882e1 to 285fec7 Compare November 5, 2026 12:29
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