Grace delay feature added

`proxy -g8000,3,10`

First parameter is average read size we want to keep, second parameter is
minimal number of packets in the same direction to apply algorythm,
last value is delay added after polling and prior to reading data.
An example above adds 10 millisecond delay before reading data if average
polling size is below 8000 bytes and 3 read operations are made in the same
direction. It's specially usefule with splice. `logdump 1 1` is useful
to see how grace delays work, choose delay value to avoid filling the read
pipe/buffer (typically 64K) but keep the request sizes close to chosen average
on large file upload/download.
This commit is contained in:
Vladimir Dubrovin committed 2022-05-19 18:51:02 +03:00
1 parent 8a8622b30f
commit 55d1bbe155
8 files changed
+49 -2

No files matched your search

+1 -1
View File
@@ -30,7 +30,7 @@
#define MAXNSERVERS 5
#define UDPBUFSIZE 16384
#define TCPBUFSIZE 8192
#define TCPBUFSIZE 65536
#define SRVBUFSIZE (param->srv->bufsize?param->srv->bufsize:((param->service == S_UDPPM)?UDPBUFSIZE:TCPBUFSIZE))