- Notifications
You must be signed in to change notification settings - Fork7
TCP and TLS performance testing tool.
License
facebookexperimental/kperf
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
kperf is a an iperf/netperf replacement with a more fine-grained workercontrol. Modern NICs have multiple Rx queues and while iperf / netperfcan bind to a CPU they are not aware of which CPU is serving the Rx queueselected by the NIC for the flow. If the NIC does not support flow steeringthis is a problem. kperf asks the kernel which CPU is used for Rx and canbind itself appropriately (same core, Rx core + N, etc.). For parallel runsit can also make sure that the flows are not colliding (being served bythe same CPU).
- Other strengths include:
- RPC-like traffic (unlike iperf);
- kTLS support (just data, no control records);
- more stats (TCP, latency, CPU use).
That said, kperf is more of hackable library than a ready-to-use Swissarmy knife. There is an example client application provided but the numberof configurations is so high it seems impossible to write a comprehensiveclient controlled solely by command line options.
Client does not generate any traffic, it only orchestrates load betweenServers.
When Client connect to a Server Server spawns a Session which is whatClient controls on the server side. There can be multiple concurrentSessions within one Server, there are no limitations. Note that Sessionis between Client and one Server, it can contain connections to manyother Sessions. Each Session is a separate process.
Session can establish Connections with other Sessions.
Session can spawn Workers which is what drivers the IO.
Connections are established within Sessions, not Workers because Workersand Connections are usually assigned once it's known which CPU givenconnection lands on.
Currently only Process Workers are supported (each worker is a separateprocess), adding threads should not be a problem but was not needed, so far:
.--------. .-----| Client |----. | '--------' | | | ----------------------|------ ------|--------------------- v | | v .--------. .---------. | | .---------. .--------. | Server |-----| Session | | | | Session |-----| Server | '--------' '---------' | | '---------' '--------' | | | | v | | v .---------. | | .---------. | Worker | | | | Worker | '---------' | | '---------'Host A .---------. | | .---------. Host B | Worker | | | | Worker | '---------' | | '---------' .---------. | | .---------. | Worker | | | | Worker | '---------' | | '---------' | |
Please refer to relevant details in thelicense,code of conduct,andcontributing guide.
Per Meta's policies contributors are required to submit a CLA.