]> git.proxmox.com Git - proxmox-backup.git/commit
proxmox-rrd: use a journal to reduce amount of bytes written
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 13 Oct 2021 08:24:38 +0000 (10:24 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 13 Oct 2021 11:36:02 +0000 (13:36 +0200)
commit1d44f175c6d3b44977a65daaa4047b9fc4284aa0
tree14a5ead225e00f61f0384a18650e308902c51513
parent890b88cbef006ddec08ddc74c8fad0ac7cccf5e7
proxmox-rrd: use a journal to reduce amount of bytes written

Append pending changes in a simple text based format that allows for
lockless appends as long as we stay below 4 KiB data per write.

Apply the journal every 30 minutes and on daemon startup.

Note that we do not ensure that the journal is synced, this is a
perfomance optimization we can make as the kernel defaults to
writeback in-flight data every 30s (sysctl vm/dirty_expire_centisecs)
anyway, so we lose at max half a minute of data on a crash, here one
should have in mind that we normally expose 1 minute as finest
granularity anyway, so not really much lost.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
proxmox-rrd/Cargo.toml
proxmox-rrd/src/cache.rs
proxmox-rrd/src/lib.rs
proxmox-rrd/src/rrd.rs
src/bin/proxmox-backup-api.rs
src/bin/proxmox-backup-proxy.rs
src/lib.rs