[pve-devel] [PATCH proxmox-backup-qemu 05/11] access: use bigger cache and LRU chunk reader
Stefan Reiter
s.reiter at proxmox.com
Mon Jan 11 12:14:03 CET 2021
Values chosen by fair dice roll, seems to be a good sweet spot on my
machine where any less causes performance degradation but any more
doesn't really make it go any faster.
Keep in mind that those values are per drive in an actual restore.
Signed-off-by: Stefan Reiter <s.reiter at proxmox.com>
---
Depends on new proxmox-backup.
src/restore.rs | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/restore.rs b/src/restore.rs
index 24983dd..fdb3d1c 100644
--- a/src/restore.rs
+++ b/src/restore.rs
@@ -218,15 +218,16 @@ impl RestoreTask {
let index = client.download_fixed_index(&manifest, &archive_name).await?;
let archive_size = index.index_bytes();
- let most_used = index.find_most_used_chunks(8);
+ let most_used = index.find_most_used_chunks(16); // 64 MB most used cache
let file_info = manifest.lookup_file_info(&archive_name)?;
- let chunk_reader = RemoteChunkReader::new(
+ let chunk_reader = RemoteChunkReader::new_lru_cached(
Arc::clone(&client),
self.crypt_config.clone(),
file_info.chunk_crypt_mode(),
most_used,
+ 64, // 256 MB LRU cache
);
let reader = AsyncIndexReader::new(index, chunk_reader);
--
2.20.1
More information about the pve-devel
mailing list