src/api2/admin/datastore/backup.rs: use smaller window sizes

This commit is contained in:
Dietmar Maurer 2019-05-27 07:40:50 +02:00
parent 174ad378d8
commit 771953f9eb
2 changed files with 5 additions and 4 deletions

View File

@ -104,8 +104,9 @@ fn upgrade_to_backup_protocol(
let mut http = hyper::server::conn::Http::new(); let mut http = hyper::server::conn::Http::new();
http.http2_only(true); http.http2_only(true);
// increase window size: todo - find optiomal size // increase window size: todo - find optiomal size
http.http2_initial_stream_window_size( (1 << 31) - 2); let window_size = 32*1024*1024; // max = (1 << 31) - 2
http.http2_initial_connection_window_size( (1 << 31) - 2); http.http2_initial_stream_window_size(window_size);
http.http2_initial_connection_window_size(window_size);
http.serve_connection(conn, service) http.serve_connection(conn, service)
.map_err(Error::from) .map_err(Error::from)

View File

@ -506,7 +506,7 @@ impl BackupClient {
mpsc::Sender<(MergedChunkInfo, Option<h2::client::ResponseFuture>)>, mpsc::Sender<(MergedChunkInfo, Option<h2::client::ResponseFuture>)>,
sync::oneshot::Receiver<Result<(), Error>> sync::oneshot::Receiver<Result<(), Error>>
) { ) {
let (verify_queue_tx, verify_queue_rx) = mpsc::channel(100); let (verify_queue_tx, verify_queue_rx) = mpsc::channel(64);
let (verify_result_tx, verify_result_rx) = sync::oneshot::channel(); let (verify_result_tx, verify_result_rx) = sync::oneshot::channel();
let h2_2 = h2.clone(); let h2_2 = h2.clone();
@ -521,7 +521,7 @@ impl BackupClient {
response response
.map_err(Error::from) .map_err(Error::from)
.and_then(H2Client::h2api_response) .and_then(H2Client::h2api_response)
.and_then(move |result| { .and_then(move |_result| {
Ok(MergedChunkInfo::Known(list)) Ok(MergedChunkInfo::Known(list))
}) })
) )