ihudedi commented on issue #884:
URL: https://github.com/apache/mina-sshd/issues/884#issuecomment-4005489962
Hi @tomaswolf
Thank you for the suggestion to instrument! The data is very revealing:
Key Finding: sendWindowAdjust() is the bottleneck
Server side (receiving upload) with ORIGINAL 2.15.0 code:
Calls: 172-243 per 5 seconds
sendWindowAdjust calls: 172-243 per 5 seconds (100% - EVERY release triggers
a window adjust!)
Avg time per release(): 134-508us total
- Sync block: 4-10us (fast)
- sendWindowAdjust(): 121-493us (slow - network I/O)
Root Cause:
The 16KB threshold in line 110 causes a window adjust message to be sent
after every single packet received (packets are ~65KB, threshold is 16KB, so
every release exceeds threshold).
Impact:
200+ sendWindowAdjust() calls per 5 seconds
Each call takes 121-493us (network message overhead)
Total overhead: 70-100ms per 5 seconds just sending window adjusts
This accumulates to significant throughput degradation
My Fix:
Increased threshold from 16KB to 128KB. Result:
sendWindowAdjust calls: Reduced from 200/5s to ~40/5s (5x reduction)
Question:
Is this the intended behavior? Should every 65KB packet trigger a window
adjust message, or should they be batched more efficiently?
Thanks,
Itay
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]