public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH 0/3] Add cache for live-restore
@ 2021-04-28 16:06 Stefan Reiter
  2021-04-28 16:06 ` [pbs-devel] [PATCH proxmox-backup 1/3] tools: add mmap_buffer module Stefan Reiter
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Stefan Reiter @ 2021-04-28 16:06 UTC (permalink / raw)
  To: pbs-devel

Adds a mmap-backed buffer (as suggested by Dietmar to avoid memory starvation)
of 64+256 MiB for accessing chunks from PBS. Helps to accelerate live-restore.

Quantitative benchmarking appears really hard, variance between live-restore
runs is really high for some reason (both time-to-desktop and time-to-finish).
On average it seems to be between equal and up to 30% faster - again, with a lot
of variance between runs.

In testing with a Windows VM I saw cache hit rates of about 25% or higher, so
the cache is certainly used, but there seem to be too many other factors in
play...


proxmox-backup: Stefan Reiter (2):
  tools: add mmap_buffer module
  RemoteChunkReader: add LRU cached variant

 src/bin/proxmox_backup_client/mount.rs |  12 ++-
 src/client/remote_chunk_reader.rs      | 110 ++++++++++++++++++++----
 src/tools.rs                           |   1 +
 src/tools/mmap_buffer.rs               | 113 +++++++++++++++++++++++++
 4 files changed, 218 insertions(+), 18 deletions(-)
 create mode 100644 src/tools/mmap_buffer.rs

proxmox-backup-qemu: Stefan Reiter (1):
  access: use bigger cache and LRU chunk reader

 src/restore.rs | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

-- 
2.20.1




^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: [pbs-devel] [PATCH proxmox-backup 2/3] RemoteChunkReader: add LRU cached variant
@ 2021-04-28 16:26 Dietmar Maurer
  2021-04-29  8:06 ` Stefan Reiter
  0 siblings, 1 reply; 7+ messages in thread
From: Dietmar Maurer @ 2021-04-28 16:26 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion, Stefan Reiter


> +    /// Create a new instance.
> +    ///
> +    /// Chunks listed in ``cache_hint`` are cached and kept in RAM, as well as the last
> +    /// 'cache_lru' accessed chunks (the latter via a mmap file).

Does that cache_hint really helps here? 
Have you tested without? If so, whats the difference?




^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: [pbs-devel] [PATCH proxmox-backup 2/3] RemoteChunkReader: add LRU cached variant
@ 2021-04-29  8:12 Dietmar Maurer
  0 siblings, 0 replies; 7+ messages in thread
From: Dietmar Maurer @ 2021-04-29  8:12 UTC (permalink / raw)
  To: Stefan Reiter, Proxmox Backup Server development discussion

> Again, performance testing is hard with this (I'll take a closer look at 
> why as well), but in terms of hit rate the "hinted" cache is at about 
> 1-2% - we could probably reduce it's size.
> 
> Removing it entirely would probably not be good, as I think we use it to 
> cache the zero-chunk as well IIRC?

Yes, you are right.




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-04-29  8:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-28 16:06 [pbs-devel] [PATCH 0/3] Add cache for live-restore Stefan Reiter
2021-04-28 16:06 ` [pbs-devel] [PATCH proxmox-backup 1/3] tools: add mmap_buffer module Stefan Reiter
2021-04-28 16:06 ` [pbs-devel] [PATCH proxmox-backup 2/3] RemoteChunkReader: add LRU cached variant Stefan Reiter
2021-04-28 16:06 ` [pbs-devel] [PATCH proxmox-backup-qemu 3/3] access: use bigger cache and LRU chunk reader Stefan Reiter
2021-04-28 16:26 [pbs-devel] [PATCH proxmox-backup 2/3] RemoteChunkReader: add LRU cached variant Dietmar Maurer
2021-04-29  8:06 ` Stefan Reiter
2021-04-29  8:12 Dietmar Maurer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal