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

Use Unix socket for proxy client <-> proxy IPC #535

Open
redlicha opened this issue Dec 27, 2016 · 1 comment
Open

Use Unix socket for proxy client <-> proxy IPC #535

redlicha opened this issue Dec 27, 2016 · 1 comment

Comments

@redlicha
Copy link
Member

redlicha commented Dec 27, 2016

Currently a TCP socket over loopback or another local interface is used. This requires requests / responses to traverse the TCP/IP stack and that recv completions are handled in softirq context. Unix sockets allow to avoid that, which shows better performance / less CPU consumption in microbenchmarks [1].

Using the "abstract namespace" feature offered by Linux, Unix sockets can be used transparently, i.e. without putting sockets on the local filesystem / requiring configuration for this.

[1] a voldrv test that either uses a Unix socket (0) or a TCP socket over localhost (1) on a 4 x i5-6440HQ CPU @ 2.60GHz :

jenkins@9284e706203e:~$ LOCOREM_CLIENTS=8 LOCOREM_MESSAGE_COUNT=100000 LOCOREM_HEADER_SIZE=4200 LOCOREM_SERVER_THREADS=1 ./youtils_test --gtest_filter=*LocORem*echo* --disable-logging
Note: Google Test filter = *LocORem*echo*
[==========] Running 2 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 2 tests from LocORemTests/LocORemTest
[ RUN      ] LocORemTests/LocORemTest.echo/0
100000 iterations with headers of 4200 and messages of 0 bytes, 8 clients took 5.63182 seconds -> 142050 IOPS
[       OK ] LocORemTests/LocORemTest.echo/0 (5632 ms)
[ RUN      ] LocORemTests/LocORemTest.echo/1
100000 iterations with headers of 4200 and messages of 0 bytes, 8 clients took 7.66188 seconds -> 104413 IOPS
[       OK ] LocORemTests/LocORemTest.echo/1 (7662 ms)
[----------] 2 tests from LocORemTests/LocORemTest (13294 ms total)

[----------] Global test environment tear-down
[==========] 2 tests from 1 test case ran. (13294 ms total)
[  PASSED  ] 2 tests.
@wimpers wimpers added this to the Gilbert milestone Jan 19, 2017
@wimpers wimpers added the SRP label Jan 19, 2017
@domsj
Copy link
Contributor

domsj commented Jan 24, 2017

Why is this urgent/SRP ?
The proxy is no longer in the hot path, so imo this performance optimisation isn't urgent/important.

@wimpers wimpers modified the milestones: Roadmap, G May 30, 2017
@wimpers wimpers removed the SRP label May 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants