perf(jetsocat): use a larger buffer for plain forwarding #968
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.
By increasing the size of the intermediate buffer from 8k to 16k, perfomance of raw TCP forwarding is increased by ~19.4%.
Performance was measured using
iperf
on local network.Direct:
Forwarding using
socat
:Forwarding using
jetsocat
without this patch:~31.8% faster than
socat
.Forwarding using
jetsocat
with this patch:~57.5% faster than
socat
and ~19.4% faster than without this patch.Forwarding using
jetsocat
’s JMUX proxy (unrelated to this patch):Using the JMUX proxy, even for a simple TCP port forwarding, is currently a whole ~86.7 slower than regular TCP port forwarding.