mirror of
https://github.com/octoleo/restic.git
synced 2024-11-27 15:26:37 +00:00
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
@ -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 New Issue
Block a user