Skip to content

defaults: a server runs one proactor unless told otherwise, not twelve whatever the machine (#40) - #55

Merged
MDA2AV merged 1 commit into
mainfrom
fix/one-proactor-default
Nov 11, 2026
Merged

MDA2AV merged 1 commit into
mainfrom
fix/one-proactor-default

Conversation

@MDA2AV

@MDA2AV MDA2AV commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Closes #40.

ServerConfig.proactorCount defaulted to 12 whatever the machine. Each proactor has its own ring and receive buffers, recvSlots x recvBufferSize = 128 MiB with the defaults, and even a few connections come to touch all of them, so the default came to about 1.5 GiB, and to more proactors than CPUs on a small machine.

It now defaults to 1, and the doc says how to ask for more. This follows MDA2AV/ioxide#560, which makes the same change to ReactorCount.

Nothing in the repo relies on the old default: every playground sample sets proactorCount, and the Ktor engine passes its own count. A host that never set it now runs one proactor instead of twelve, which is the behaviour change to know. The receive pool sizes stay as they are.

Tests.

  • Native: all 318 passed.
  • JVM: all 93 passed.

…e whatever the machine (#40)

Each proactor has its own ring and receive buffers, recvSlots x recvBufferSize = 128 MiB with the defaults, and even a few connections come to touch all of them, so twelve came to about 1.5 GiB, and to more proactors than CPUs on a small machine. A server that wants more sets proactorCount; every playground sample already does, and the Ktor engine passes its own count.
@MDA2AV
MDA2AV merged commit fd57892 into main Nov 11, 2026
3 checks passed
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.

defaults: 12 proactors whatever the machine, and a recv pool that goes fully resident at any connection count

1 participant