[pve-devel] [PATCH pve-common 1/1] ProcFSTools: add read_pressure

Dietmar Maurer dietmar at proxmox.com
Tue Oct 13 09:38:14 CEST 2020


> BTW, I'm currently playing with reading the rrd files, and I have notice than lower precision is 1minute.
> as pvestatd send values around each 10s, is this 1minute precision an average of 6x10s values send by pvestatd ?

Yes (we also store the MAX)

> I'm currently working on a poc of vm balancing, but I would like to have something like 15min of 10s precision (90 samples of 10s).

Why do you need 10s resulution? Isn't 1min good enough?

> So currently I'm getting stats each 10s manually with PVE::API2Tools::extract_vm_stats like the ressource api.
> (This use PVE::Cluster::rrd_dump , but I don't understand the ipcc_. code. does it only return current streamed values?
> then after the rrdcached daemon is writing to rrd file the average values each minute ?)
> 
> I don't known if we could have rrd files with 15min of 10s precision ? (don't known the write load impact on disks)

We use the following RRD conf, step is 60 seconds (see pve-cluster/src/status.c):

static const char *rrd_def_node[] = {
	"DS:loadavg:GAUGE:120:0:U",
	"DS:maxcpu:GAUGE:120:0:U",
	"DS:cpu:GAUGE:120:0:U",
	"DS:iowait:GAUGE:120:0:U",
	"DS:memtotal:GAUGE:120:0:U",
	"DS:memused:GAUGE:120:0:U",
	"DS:swaptotal:GAUGE:120:0:U",
	"DS:swapused:GAUGE:120:0:U",
	"DS:roottotal:GAUGE:120:0:U",
	"DS:rootused:GAUGE:120:0:U",
	"DS:netin:DERIVE:120:0:U",
	"DS:netout:DERIVE:120:0:U",

	"RRA:AVERAGE:0.5:1:70", // 1 min avg - one hour
	"RRA:AVERAGE:0.5:30:70", // 30 min avg - one day
	"RRA:AVERAGE:0.5:180:70", // 3 hour avg - one week
	"RRA:AVERAGE:0.5:720:70", // 12 hour avg - one month
	"RRA:AVERAGE:0.5:10080:70", // 7 day avg - ony year

	"RRA:MAX:0.5:1:70", // 1 min max - one hour
	"RRA:MAX:0.5:30:70", // 30 min max - one day
	"RRA:MAX:0.5:180:70",  // 3 hour max - one week
	"RRA:MAX:0.5:720:70", // 12 hour max - one month
	"RRA:MAX:0.5:10080:70", // 7 day max - ony year
	NULL,
};

Also See: man rrdcreate

So no, you do not get 10s precission from RRD.





More information about the pve-devel mailing list