-
Notifications
You must be signed in to change notification settings - Fork 76
P999 may not be accurate if Never Send is high. #15
Description
Hi all,
I find the synthetic in Caladan endures a high Never-Send rate (above 1%) when clients issue requests with a relatively high rate which is close to server’s capacity.
This is especially problematic under a Poisson distribution: when two adjacent requests are generated within a short time window (i.e., a bursty period), the latter one is more likely to be droped due to the Never-Send logic (see code). We have profiled Caladan's client logic, and find that the scheduling often causes the request to be delayed (which has already violated the Poisson distribution) and finally be dropped.
We further designed an experiment to confirm this. We modify the Caladan client with the scheduling policy disabled: specifically, workers are bound to different cores, which can execute send, do_softirq (directpath), handle_timeout, and recv in cycles without yielding.
We equip Caladan server with 4 kthreads and launch 16 client workers (each of which owns a TCP connection) to generate requests w/ a Poisson distribution and vary the request rate (last for 32 seconds). The following table shows the experiment result:
| Client Type | Thoughtput(pps) | P50 (us) | P90 (us) | P999 (us) | Never Send |
|---|---|---|---|---|---|
| synthetic | 0.75M | 13.4 | 23.1 | 40.0 | 1.39% |
| client w/o sched | 0.75M | 9.809091 | 18.500909 | 50.903636 | 0.000442% |
| synthetic | 0.8M | 13.6 | 22.6 | 37.9 | 1.4486% |
| client w/o sched | 0.8M | 9.49 | 16.81 | 584.52 | 0.000430% |
| synthetic | 1M | 13.6 | 21.9 | 38.6 | 1.6726% |
| client w/o sched | 1M | 9.64 | 17.59 | 2841.83 | 0.000694% |
| synthetic | 1.1M | 13.5 | 21.1 | 55.5 | 1.7345% |
| client w/o sched | 1.1M | 10.6 | 21.9 | 5177.75 | 0.000781% |