tcp-acceleration-service / tas

Licence: other
TAS is a drop-in highly CPU efficient and scalable TCP acceleration service.

Programming Languages

c
50402 projects - #5 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to tas

Limago
Limago: an FPGA-based Open-source 100 GbE TCP/IP Stack
Stars: ✭ 95 (+75.93%)
Mutual labels:  tcp, network-stack
tcpcv
💻 TCPCV is a retro-style, text-based server for hosting your résumé.
Stars: ✭ 35 (-35.19%)
Mutual labels:  tcp
Mgx
🌈 A high performance network framework written in c++ (support tcp and http)
Stars: ✭ 15 (-72.22%)
Mutual labels:  tcp
ComputerNetworks-unipd2018
Tips and resources to easily pass the "Computer Networks" practical exam ("Reti di calcolatori") in Padua
Stars: ✭ 21 (-61.11%)
Mutual labels:  tcp
epoller
epoll implementation for connections in Linux, MacOS and Windows
Stars: ✭ 58 (+7.41%)
Mutual labels:  tcp
Socketify
Raw TCP and UDP Sockets API on Desktop Browsers
Stars: ✭ 67 (+24.07%)
Mutual labels:  tcp
easytcp
✨ 🚀 EasyTCP is a light-weight TCP framework written in Go (Golang), built with message router. EasyTCP helps you build a TCP server easily fast and less painful.
Stars: ✭ 416 (+670.37%)
Mutual labels:  tcp
dpdk
A comprehensive rust binding for DPDK allowing high speed userspace networking across 256 cores and 32 NICs
Stars: ✭ 30 (-44.44%)
Mutual labels:  tcp
dats
📈 Minimalistic zero-dependencies statsd client for Node.js
Stars: ✭ 63 (+16.67%)
Mutual labels:  tcp
TCP BBR
BBR implementation and research resources
Stars: ✭ 43 (-20.37%)
Mutual labels:  tcp
createprocess-windows
A complete, robust command-line utility to construct highly customized calls to the CreateProcess() Windows API. Released under a MIT or LGPL license.
Stars: ✭ 74 (+37.04%)
Mutual labels:  tcp
im-bass
基础IM通信
Stars: ✭ 56 (+3.7%)
Mutual labels:  tcp
Magician
Magician is a small HTTP service package based on Netty that makes it very easy to start an http service, and also supports WebSocket, using annotated configuration Handler, If you want to develop an http service with netty but find it cumbersome, then Magician may help you.
Stars: ✭ 97 (+79.63%)
Mutual labels:  tcp
neteng-roadmap
Network Engineering at Scale Roadmap/Landscape
Stars: ✭ 53 (-1.85%)
Mutual labels:  tcp
InterProcessCommunication
Inter-process Communication
Stars: ✭ 11 (-79.63%)
Mutual labels:  tcp
net-Socket
A minimalist wrapper around System.Net.Sockets.Socket.
Stars: ✭ 21 (-61.11%)
Mutual labels:  tcp
jwEngine
A cross-platform C++<->lua server quick solution
Stars: ✭ 226 (+318.52%)
Mutual labels:  tcp
twjitm-core
采用Netty信息加载实现长连接实时通讯系统,客户端可以值任何场景,支持实时http通讯、webSocket通讯、tcp协议通讯、和udp协议通讯、广播协议等 通过http协议,rpc协议。 采用自定义网络数据包结构, 实现自定义网络栈。
Stars: ✭ 98 (+81.48%)
Mutual labels:  tcp
L2-Emulator
Implementing a Layer-2 Emulator in C using Graphs and LinkedList
Stars: ✭ 17 (-68.52%)
Mutual labels:  tcp
knockonports
A port knocking client for Android
Stars: ✭ 25 (-53.7%)
Mutual labels:  tcp

TCP Acceleration Service

Build Status Documentation Status

TAS is a drop-in highly CPU efficient and scalable TCP acceleration service.

Our EuroSys2019 Paper describes the TAS design and its rationale.

Building

Requirements:

  • TAS is built on top of Intel DPDK for direct access to the NIC. We have tested this version with dpdk versions (17.11.9, 18.11.5, 19.11).

Assuming that dpdk is installed in ~/dpdk-inst TAS can be built as follows:

make RTE_SDK=~/dpdk-inst

This will build the TAS service (binary tas/tas), client libraries (in lib/), and a few debugging tools (in tools/).

Running

Before running TAS the following steps are necessary:

  • Make sure hugetlbfs is mounted on /dev/hugepages and enough huge pages are allocated for TAS and dpdk.
  • Binding the NIC to the dpdk driver, as with any other dpdk application (for Intel NICs use vfio because uio does not support multiple interrupts).
sudo modprobe vfio-pci
sudo mount -t hugetlbfs nodev /dev/hugepages
echo 1024 | sudo tee /sys/devices/system/node/node*/hugepages/hugepages-2048kB/nr_hugepages
sudo ~/dpdk-inst/sbin/dpdk-devbind  -b vfio-pci 0000:08:00.0

To run (--ip-addr and --fp-cores-max are the minimum arguments typically needed to run tas, for more see --help):

sudo code/tas/tas --ip-addr=10.0.0.1/24 --fp-cores-max=2

Once tas is running, applications that directly link to libtas or libtas_sockets can be run directly. To run an unmodified application with sockets interposition run as follows (for example):

sudo LD_PRELOAD=lib/libtas_interpose.so ../benchmarks/micro_rpc/echoserver_linux 1234 1 foo 8192 1

In Qemu/KVM

For functional testing and development TAS can run in Qemu (with or without acceleration through KVM). We have tested this with the virtio dpdk driver. By default, the qemu virtio device only provides a single queue, and thus only allows TAS to run on a single core. To run a virtual machine with support for multiple queue, qemu requires a tap device with multi-queue support enabled.

Here is an example sequence of commands to create a tap device with multi queue support and then start a qemu instance that binds this tap device to a multi-queue virtio device:

sudo ip link add tastap0 type tuntap
sudo ip tuntap add mode tap multi_queue name tastap0
sudo ip link set dev tastap0 up
qemu-system-x86_64 \
    -machine q35 -cpu host \
    -drive file=vm1.qcow2,if=virtio \
    -netdev tap,ifname=tastap0,script=no,downscript=no,vhost=on,queues=8,id=nInt\
    -device virtio-net-pci,mac=52:54:00:12:34:56,vectors=18,mq=on,netdev=nInt \
    -serial mon:stdio -m 8192 -smp 16 -display none -enable-kvm

Inside the virtual machine, the following sequence of commands first takes the linux network interface down, binds it to the uio_pci_generic driver that the dpdk virtio PMD supports, and then reserves huge pages:

sudo ifconfig enp0s2 down
sudo modprobe uio
sudo modprobe uio_pci_generic
sudo dpdk-devbind.py -b uio_pci_generic 0000:00:02.0
echo 1024 | sudo tee /sys/devices/system/node/node*/hugepages/hugepages-2048kB/nr_hugepages

Virtio does not support all the NIC features that we depend on in physical NICs. In particular virtio does not support transmit checksum offload or the RSS redirection table TAS uses for scaling up and down. The dpdk virtio PMD also does not support multiple MSI-X interrupts. To run TAS given these constraints, the following command line parameters disable the use of these features (note that this implies busy polling and no autoscaling):

sudo code/tas/tas --ip-addr=10.0.0.1/24 --fp-cores-max=8 \
    --fp-no-xsumoffload --fp-no-ints --fp-no-autoscale

Kernel NIC Interface

TAS supports the DPDK kernel NIC interface (KNI) to pass packets to the Linux kernel network stack. With KNI enabled, TAS becomes an opt-in fastpath where TAS-enabled applications operate through TAS, and other applications can use the Linux network stack as before, sharing the same physical NIC.

To run TAS with KNI the first step is to load the rte_kni kernel module. Next, when run with the --kni-name= option, TAS will create a KNI dummy network interface with the specified name. After assigning an IP address to this network interface, the Linux network stack can send and receive packets through this interface as long as TAS is running. Here is the complete sequence of commands:

sudo modprobe rte_kni
sudo code/tas/tas --ip-addr=10.0.0.1/24 --kni-name=tas0
# in separate terminal
sudo ifconfig tas0 10.0.0.1/24 up

Code Structure

  • tas/: service implementation
    • tas/fast: TAS fast path
    • tas/slow: TAS slow path
  • lib/: client libraries
    • lib/tas: lowlevel TAS client library (interface: lib/tas/include/tas_ll.h)
    • lib/sockets: socket emulation layer
  • tools/: debugging tools
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].