Repository navigation
exp(https): pool queue growth test + static vs growable ring A/B - #349
Merged
Merged
Conversation
tests/test_https_pool_queue.c holds the only pool thread while 5000 tasks queue behind it, so the ring wraps and then grows several times; every task must run exactly once, in submission order. docs/performance/https-pool-dynamic-queue.md records the A/B of the static 2097152-slot ring against the growable one (8d5a595): pool init RSS +98484 KiB vs +176 KiB, idle RSS of a 4-worker server 422 MB vs 29 MB, unchanged keep-alive/churn/burst results, and a 6000-connection burst on one worker that grew the ring to 4096 slots with no failures.
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.
Experiments for the HTTPS pool queue change that was pushed directly to dev (
8d5a5958) and cherry-picked to main (e7568313). This PR only adds a regression test and the write-up; it does not changesrc/.Results (details in
docs/performance/https-pool-dynamic-queue.md)Each result compares two non-ASan builds from the same tree that differ only in
https.c. Server:CWIST_C1M_MODE=1.https_pool_init()alone.bssof the server binarywrk -c64, 3 roundsab -c64, new TLS conn eachThroughput and latency are within run-to-run noise. The memory saving is about 96 MiB per process that starts the pool.
Test
tests/test_https_pool_queue.c(newmake test_https_pool_queuetarget, also added to the test list). One pool thread is held in a handler while 5000 tasks queue behind it, so the ring wraps first and then grows while wrapped. Every task must run exactly once, in submission order. It passes under ASan + UBSan.Open questions, not decided here