forked from TrueCloudLab/restic
sftp: slightly increase write concurrency
This should increase upload throughput for high latency links a bit.
This commit is contained in:
parent
669a669603
commit
935327d480
1 changed files with 3 additions and 1 deletions
|
@ -105,7 +105,9 @@ func startClient(cfg Config) (*SFTP, error) {
|
||||||
client, err := sftp.NewClientPipe(rd, wr,
|
client, err := sftp.NewClientPipe(rd, wr,
|
||||||
// write multiple packets (32kb) in parallel per file
|
// write multiple packets (32kb) in parallel per file
|
||||||
// not strictly necessary as we use ReadFromWithConcurrency
|
// not strictly necessary as we use ReadFromWithConcurrency
|
||||||
sftp.UseConcurrentWrites(true))
|
sftp.UseConcurrentWrites(true),
|
||||||
|
// increase send buffer per file to 4MB
|
||||||
|
sftp.MaxConcurrentRequestsPerFile(128))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.Errorf("unable to start the sftp session, error: %v", err)
|
return nil, errors.Errorf("unable to start the sftp session, error: %v", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue