Skip to content

db/kv/mdbx: comment on 9K roTxsLimiter target#21094

Merged
AskAlexSharov merged 1 commit into
mainfrom
alex/comment_about_9K
May 11, 2026
Merged

db/kv/mdbx: comment on 9K roTxsLimiter target#21094
AskAlexSharov merged 1 commit into
mainfrom
alex/comment_about_9K

Conversation

@AskAlexSharov

Copy link
Copy Markdown
Collaborator

Explain why the read-only tx semaphore is sized at 9000:

  • Go panics above ~10K OS threads.
  • An RoTx itself does not spawn a thread, but a goroutine that hits a page fault inside the RoTx moves from the CPU-bounded thread pool to the (unlimited) IO-bounded pool.
  • 9K concurrent RoTx goroutines can therefore produce 0 new threads (no faults) or up to 9K IO threads (cold reads).

Comment-only change.

@Giulio2002 Giulio2002 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM — comment-only clarification for the 9K roTxsLimiter target.

@AskAlexSharov AskAlexSharov added this pull request to the merge queue May 11, 2026
Merged via the queue into main with commit 18db6e0 May 11, 2026
38 checks passed
@AskAlexSharov AskAlexSharov deleted the alex/comment_about_9K branch May 11, 2026 11:15
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