trafficserver
trafficserver copied to clipboard
Support splice in http blind tunnel
- Add TS_USE_LINUX_SPLICE as a compilation option.
- Make MIOBuffer and MIOBufferReader polymorphic classes making their member function virtual.
- Create PipeIOBuffer and PipeIOBufferReader as derived classes, encapsulating Linux pipe.
- Use dynamic_cast to enable logic switch in state machines and continuations.
Documentations: ATS_splice_runbook.md ATS Performance Benchmark.pdf ATS_splice_design_doc.pdf
Passes unit test and manual integration test on Debian 12. Performance benchmark shows that splice could improve maximum blind tunnel throughput from 300 MB/s to 575 MB/s and reduce latency by 40% for MB level payload on C6in.large EC2 instance. Feel free to benchmark this CR.
Thanks for the comments @moonchen. I will start to resolve the comments
Slightly reorganized the file structure to decouple PipieIOBuffer from original IOBuffer.
The latest revision is to address the following comments:
- https://github.com/apache/trafficserver/pull/11890#discussion_r1925531050
- https://github.com/apache/trafficserver/pull/11890#discussion_r1925533339
[approve ci]
@YIHONG-JIN can you take a look at the CI failures? Looks like clang-format and license header checks found some problems.
Thanks! Will take a look at CI failures this weekend. @moonchen
[approve ci]
Took a look. Looks like format is fine this time. @bryancall Is there a way to read the log of failed tests or reproduce them locally? Looks like I don't have permissions to read the logs
[approve ci]
[approve ci]
@YIHONG-JIN sorry for the late response, we went through all the open PRs yesterday in our meeting.
You can go to the URLs below and look at the console output. For example here is the run for Ubuntu: https://ci.trafficserver.apache.org/job/Github_Builds/job/ubuntu/6069/ And here is the Ubuntu build output: https://ci.trafficserver.apache.org/job/Github_Builds/job/ubuntu/6069/console
And I am seeing the errors:
/usr/bin/ccache /usr/lib/llvm-12/bin/clang++ -DDEBUG -DPACKAGE_NAME="\"Apache Traffic Server\"" -DPACKAGE_VERSION=\"10.2.0\" -D_DEBUG -Dlinux -I/home/jenkins/workspace/Github_Builds/ubuntu/src/include -I/home/jenkins/workspace/Github_Builds/ubuntu/src/build/include -I/home/jenkins/workspace/Github_Builds/ubuntu/src/lib/swoc/include -I/home/jenkins/workspace/Github_Builds/ubuntu/src/lib/yamlcpp/include -isystem /home/jenkins/workspace/Github_Builds/ubuntu/src/lib/systemtap -D_FORTIFY_SOURCE=2 -fPIE -fstack-protector -pthread -g -std=c++20 -Wno-invalid-offsetof -pipe -Wall -Wextra -Wno-noexcept-type -Wsuggest-override -Wno-vla-extension -fno-strict-aliasing -Wno-deprecated-declarations -mcx16 -Werror -MD -MT src/iocore/net/CMakeFiles/inknet.dir/UnixNetVConnection.cc.o -MF src/iocore/net/CMakeFiles/inknet.dir/UnixNetVConnection.cc.o.d -o src/iocore/net/CMakeFiles/inknet.dir/UnixNetVConnection.cc.o -c /home/jenkins/workspace/Github_Builds/ubuntu/src/src/iocore/net/UnixNetVConnection.cc
../src/iocore/net/UnixNetVConnection.cc:643:3: error: unknown type name 'PipeIOBuffer'
PipeIOBuffer *pipe_buffer = dynamic_cast<PipeIOBuffer *>(buf.writer());
^
../src/iocore/net/UnixNetVConnection.cc:643:44: error: unknown type name 'PipeIOBuffer'
PipeIOBuffer *pipe_buffer = dynamic_cast<PipeIOBuffer *>(buf.writer());
^
../src/iocore/net/UnixNetVConnection.cc:649:20: error: no member named 'splice_to' in 'UnixSocket'
r = con.sock.splice_to(pipe_buffer->fd[1], to_splice, SPLICE_F_MOVE | SPLICE_F_NONBLOCK);
~~~~~~~~ ^
3 errors generated.
This pull request has been automatically marked as stale because it has not had recent activity. Marking it stale to flag it for further consideration by the community.