-
Notifications
You must be signed in to change notification settings - Fork 243
Managed RIO Server #12
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
Conversation
Latest results below. Seems CPU use went up a bit and we lost peak RPS (down from >7m) as a result.
|
Hi @benaadams, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution! The agreement was validated by .NET Foundation and real humans are currently evaluating your PR. TTYL, DNFBOT; |
@DamianEdwards CLA bot is happy. |
Hopefully this will max network before CPU |
Looking forward to trying this one 😄 |
Tried it on an Azure G5; need to put some SIMD fixes in as on that hardware Vector.Count operates on 32 bytes at the same time rather than 16 bytes (AVX 256 rather than SSE 128) |
wrk -c 512 --latency -t 32 http://url/ -s ./scripts/pipeline.lua -- 148 Still a bit funny on NUMA - good but not great, probably need to do thread affinities there; but on Azure G4: 9.0 Gbps at 59% CPU: At 6.8M requests per second (6,807,542). Latency of 92.ms (avg), 113.81 ms (std-dev), 1.27s (max), 50% < 43ms, 90% < 288ms. |
You do all crazy stuff with AVX and then use this in performance critical code???
|
😉 Lazy fix, function could be faster, but still should cut down the string allocs by 6.9M per second at 9.1 Gbps, to 512 per second; so not a bad change... Takes my test on 68% CPU to 61%, so seems effective. |
93d7f70
to
d56a876
Compare
I think you would found DateTime.UtcNow slow too (it is basically Kernel call). This is how simply I do it in Nowin: |
That's much better than the convoluted improvement I was planning; gone for something similar. |
1ac49d9
to
cfe0190
Compare
c020670
to
0e0e695
Compare
Assuming decent thread scheduling and allocation; move header and body data to same NUMA node
Shave a byte off per message by removing optional whitespace (or 5 bytes if you include the ones already removed) https://tools.ietf.org/html/rfc7230#section-3.2.4 > A field value might be preceded and/or followed by optional whitespace (OWS); a single SP preceding the field-value is preferred for consistent readability by humans.
No dev comment, just wanted to say awesome job @benaadams 👍 |
This is really cool. |
@CIPop A reference implementation! Super useful to know; I couldn't really find anything other than the api docs building this so its mostly trial and error iteration; will definitely have a look at it; thank you 👍 |
Glad to help :) |
Keep alive doesn't need to be returned in headers for http/1.1 Revert buffer changes
Closing this out |
Updated commit for #10