Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v23.3.x] net: Cache value of local address #15958

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #15931

- Performance testing has shown excessive CPU time is spent when
local_address() is called within a tight loop, this has been tracked
down to the fact that ss::file_desc::local_address() invokes a system
call, getsockname.

- To mitigate this issue, the connection class now caches the value of
local address upon instantiation.

- Partially fixes: redpanda-data#15898

(cherry picked from commit 1cc1d1b)
@vbotbuildovich vbotbuildovich added this to the v23.3.x-next milestone Jan 5, 2024
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Jan 5, 2024
@piyushredpanda piyushredpanda modified the milestones: v23.3.x-next, v23.3.2 Jan 5, 2024
@piyushredpanda piyushredpanda marked this pull request as ready for review January 5, 2024 11:16
@piyushredpanda
Copy link
Contributor

/ci-repeat

1 similar comment
@piyushredpanda
Copy link
Contributor

/ci-repeat

@piyushredpanda piyushredpanda merged commit ac8fd04 into redpanda-data:v23.3.x Jan 5, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants