src/api2/admin/datastore/backup.rs: add speedtest api, improve upload speed

We need to disable tcp Nagle algorythm (set_nodelay), and use larger window size for http2
This commit is contained in:
Dietmar Maurer
2019-05-16 10:24:23 +02:00
parent 372724afea
commit adec8ea263
5 changed files with 139 additions and 4 deletions

View File

@ -29,9 +29,9 @@ impl Future for PipeToSendStream {
fn poll(&mut self) -> Poll<Self::Item, Self::Error> {
loop {
if self.data != None {
// we don't have the next chunk of data yet, so just reserve 1 byte to make
// sure there's some capacity available. h2 will handle the capacity management
// for the actual body chunk.
// just reserve 1 byte to make sure there's some
// capacity available. h2 will handle the capacity
// management for the actual body chunk.
self.body_tx.reserve_capacity(1);
if self.body_tx.capacity() == 0 {