79b3113361
proxmox-rrd: new helpers: slot, slot_start_time & slot_end_time
...
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
5885767b91
proxmox-rrd: avoid expensive modulo (%) inside loop
...
Modulo is very slow, so we try to avoid it inside loops.
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
ec08247e5c
proxmox-rrd: add binary to create/manage rrd files
...
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
400f081487
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
03664514ab
proxmox-rrd: support CF::Last
...
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
c68fa58a59
remove proxmox-rrd-api-types crate, s/RRDTimeFrameResolution/RRDTimeFrame/
...
Because the types used inside the RRD have other requirements
than the API types:
- other serialization format
- the API may not support all RRD features
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
426dda0730
proxmox-rrd: extract_data: include values from current slot
...
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
eb37d4ece2
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
1198f8d4e6
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
1d44f175c6
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
6ef1b649d9
update to first proxmox crate split
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-10-11 11:58:49 +02:00
e3f3359c86
bump proxmox dependency to 0.14.0 and proxmox-http to 0.5.0
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com >
2021-10-08 11:18:22 +02:00
b3a67f1f14
proxmox-rrd: use correct directory options in create_rrdb_dir
2021-10-07 08:50:50 +02:00
3cc23ca6cc
proxmox-rrd: cleanup error handling
2021-10-07 08:01:12 +02:00
3def6bfc64
proxmox-rrd: use log crate instead of eprintln, avoid duplicate logs
2021-10-06 18:19:22 +02:00
18e8bc17e4
proxmox-rrd: fix update (do not update) when time is in the past
2021-10-06 18:01:48 +02:00
0191759316
proxmox-rrd: improve developer docs
2021-10-06 12:19:54 +02:00
dbc42e6f75
proxmox-rrd: remove serde dependency
2021-10-06 10:55:46 +02:00
d1c3bc5350
split out RRD api types into proxmox-rrd-api-types crate
2021-10-06 09:49:51 +02:00
a97301350f
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
09340f28f5
move RRD code into proxmox-rrd crate
2021-10-06 08:13:28 +02:00