Repository navigation
agent, ntf server: add lookupOrInsertIO, use it for locks and stats - #1989
Merged
epoberezkin merged 12 commits intoOct 26, 2026
Merged
Conversation
evgeny-simplex
requested review from
epoberezkin and
spaced4ndy
as code owners
October 26, 2026 07:50
epoberezkin
reviewed
Oct 26, 2026
evgeny-simplex
commented
Oct 26, 2026
epoberezkin
approved these changes
Oct 26, 2026
Contributor
Author
Benchmark: A = 3818284 (base) vs B = c0c416d (this PR, merged)Method
Server (2026-10-26, 22:38-23:43 UTC)
Client (2026-10-26 23:53 to 10-27 00:12 UTC; the run stopped during repetition 8)
Re-runs (2026-10-27, 03:29-03:40 UTC; same scripts and arguments) In the tables recomputed from the raw logs, storm 10k unlimited also has p < 0.05 (B slower), so it was re-run too. Host load was higher than in the first runs: load average 14-22, with 1.4-2.2 CPUs in I/O wait (0.0-0.2 in the first server runs). With 3+3 runs alone, p cannot be below 0.10. In the "all runs" rows, the first runs and the re-runs are pooled.
Conclusion
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TMap
lookupOrInsertIO: looks the key up without a transaction; if absent, looks it up again and inserts in one transaction. ReturnsRightfor a found value,Leftfor an inserted one.Agent
withLockMap/withLocksMap): an existing lock is found without a transaction and then taken; a new lock is inserted already taken. A thread waiting for a lock no longer re-runs its transaction on every insert into the lock map.createLockis removed (unused).Ntf server
incServerStatuseslookupOrInsertIOinstead of its own double lookup.