Skip to content
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

Sample TCP proxy application (slow performance) #300

Open
sebymiano opened this issue Jun 17, 2020 · 0 comments
Open

Sample TCP proxy application (slow performance) #300

sebymiano opened this issue Jun 17, 2020 · 0 comments

Comments

@sebymiano
Copy link

sebymiano commented Jun 17, 2020

Hi there!

I am trying to write a simple TCP proxy application with mTCP where basically the proxy can accept multiple TCP connections from a set of clients on the same TCP port and, for every new connection, creates a parallel session with a backend server with another IP:Port.

I have basically copied the epproxy application from this repo [1] (AccelTCP), modifying it in a way that it does not read the HTTP packet content but just forwards all the data from the client socket to the corresponding backend socket (without any hardware-assisted mtcp_splice operation).
You can have a look at the application here [2].

I have tested the application with iperf3, with the proxy redirecting packets from a frontend interface (where the proxy is listening to) to a backend interface (where the backend server is placed).

The problem is that performance are tremendously slow. Within a single core and the default mTCP parameters (rcvbuf = sndbuf = 8192) the reported iperf3 throughput is about 290 Kbits/sec.
I was able to achieve better results increasing the rcvbuf and sndbuf size to around 4MB but with a throughput of 50 Mbits/sec.

I am sure there is something wrong with my applicatsiion but I am not able to understand what.
Any help?

Thanks!

[1] https://github.com/acceltcp/AccelTCP/tree/master/apps/epproxy/src
[2] https://github.com/sebymiano/mtcp/blob/blu5_proxy_new/apps/blue5_proxy/blue5_proxy.c

@sebymiano sebymiano changed the title Sample TCP proxy application Sample TCP proxy application (slow performance) Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant