Dietmar Maurer
cc0bb59788
proxmox-rrd: log all errors from apply_and_commit_journal_thread (but only once)
2021-10-18 11:57:19 +02:00
Dietmar Maurer
a74384f725
proxmox-rrd: cleanup - use struct instead of tuple
2021-10-16 12:45:03 +02:00
Dietmar Maurer
4393b93a8b
proxmox-rrd: move RRDMap into extra file
2021-10-16 12:45:03 +02:00
Dietmar Maurer
9dcc64b71a
proxmox-rrd: move JournalState into extra file
2021-10-16 12:45:03 +02:00
Dietmar Maurer
30b4800f4f
proxmox-rrd: implement non blocking journal
...
Do not block while applying the journal.
2021-10-16 12:45:03 +02:00
Dietmar Maurer
2c24c1dd22
proxmox-rrd: rename RRDCacheState to JournalState
2021-10-15 09:35:44 +02:00
Dietmar Maurer
2be07c2250
proxmox-rrd: avoild blocking readers while applying the journal
...
By using and extra RwLock<RRDMap> on the rrd data.
2021-10-15 09:22:07 +02:00
Dietmar Maurer
3275f1ac16
proxmox-rrd: log journal apply/flush times, split apply and flush
...
We need to apply the journal only once.
2021-10-15 07:16:41 +02:00
Dietmar Maurer
26bd6a4f77
proxmox-rrd: improve dev docs
2021-10-14 11:53:54 +02:00
Dietmar Maurer
8619b21e4d
proxmox-rrd: make rrd load callback configurable
2021-10-14 11:41:26 +02:00
Dietmar Maurer
a1eede6918
proxmox-rrd: pass time and value to update function
2021-10-14 08:12:56 +02:00
Dietmar Maurer
2c72c6a7ba
proxmox-rrd: split out load_rrd (cleanup)
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-10-13 13:36:02 +02:00
Dietmar Maurer
cf097c5a89
proxmox-rrd: remove dependency to proxmox-rrd-api-types
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-10-13 13:36:02 +02:00
Dietmar Maurer
bc68dee171
proxmox-rrd: implement new CBOR based format
...
Storing much more data points now got get better graphs.
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-10-13 13:36:02 +02:00
Dietmar Maurer
0355554905
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>
2021-10-13 13:36:02 +02:00
Wolfgang Bumiller
e0ce41b03a
update to first proxmox crate split
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-11 11:58:49 +02:00
Dietmar Maurer
071cb7aa8b
proxmox-rrd: use correct directory options in create_rrdb_dir
2021-10-07 08:50:50 +02:00
Dietmar Maurer
5165bed8c2
proxmox-rrd: use log crate instead of eprintln, avoid duplicate logs
2021-10-06 18:19:22 +02:00
Dietmar Maurer
881d8f85ea
proxmox-rrd: improve developer docs
2021-10-06 12:19:54 +02:00
Dietmar Maurer
538e6f66f3
split out RRD api types into proxmox-rrd-api-types crate
2021-10-06 09:49:51 +02:00
Dietmar Maurer
ac17698e4a
proxmox-rrd: use create_path instead of std::fs::create_dir_all
...
To ensure correct file ownership.
2021-10-06 08:37:14 +02:00
Dietmar Maurer
8d1a9d2ec6
move RRD code into proxmox-rrd crate
2021-10-06 08:13:28 +02:00