Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Use unbounded queue in the receiver #16

Merged
merged 2 commits into from Nov 28, 2017

Conversation

gandro
Copy link
Member

@gandro gandro commented Nov 28, 2017

The transport::Receiver in strymon_communication was using a blocking (bounded) queue which turned out to severely cripple performance. This PR changes this such that is uses a non-blocking queue.

The original intention of using a bounded queue in the receiver was to propagate back-pressure to the sender. However, the current publisher interface does not really have a good way of indicating back-pressure, which means the original motivation for using a bounded queue is void.

Additionally, this PR also uses a buffered stream for the receiver, which should reduce the number of required system calls when reading from the socket.

Sebastian Wicki added 2 commits November 28, 2017 11:39
Signed-off-by: Sebastian Wicki <swicki@inf.ethz.ch>
Since senders are currently also unbounded, there is not much point in
having receivers use bounded queues.

Signed-off-by: Sebastian Wicki <swicki@inf.ethz.ch>
@gandro
Copy link
Member Author

gandro commented Nov 28, 2017

I'm merging this, as @antiguru has reported that it increases the throughput of his test program from ~150MBit/s to ~800MBit/s (on an input rate of 1000MBit/s).

@gandro gandro merged commit 5f773ff into strymon-system:master Nov 28, 2017
@gandro gandro deleted the improve-receiver branch November 28, 2017 13:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant