From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <aderumier@odiso.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id BAEAC611DB
 for <pve-devel@lists.proxmox.com>; Tue, 13 Oct 2020 08:33:09 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id AC3DCB229
 for <pve-devel@lists.proxmox.com>; Tue, 13 Oct 2020 08:33:09 +0200 (CEST)
Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com
 [IPv6:2a00:1450:4864:20::242])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS id 8C82AB215
 for <pve-devel@lists.proxmox.com>; Tue, 13 Oct 2020 08:33:08 +0200 (CEST)
Received: by mail-lj1-x242.google.com with SMTP id a5so19153695ljj.11
 for <pve-devel@lists.proxmox.com>; Mon, 12 Oct 2020 23:33:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=odiso-com.20150623.gappssmtp.com; s=20150623;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=/NjeeVeaEF0dWZhVewWMCrIwQtL7Fffb8DW9L27Im+8=;
 b=sGCDdi8yCzVh5rSG5u4cbmHYtCRhLqtvD+AXWgT74isWCxXafySOJ4IvHiXZ3ZX7La
 qUPHUm2D5XwgnXupwbW+A006AhD/eRwsSRDQlNTTKzF6+I8CgWvOhJ2tQD1PY+kvO5aJ
 cp8zQU/wyz6RI//XiHsDj/bNYAAwwS5c37ayQQ8+lmi1WZej5flMgo8E7SQa/Ys5Cl+n
 +jAhc4ohZqB9p4FAAKtdTR1NI14VZywEV3/JPaykSUmswksJ7R7t3QHmiDOV4no/4Dq9
 +Q92UV2GwPVpD31Jevq1WE30WyMkMkMSi0fIe7vCPiUppm8h6GCXbSm41ZCAJzyIjQPV
 C0jw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=/NjeeVeaEF0dWZhVewWMCrIwQtL7Fffb8DW9L27Im+8=;
 b=pdAd0f9C1HTvHPvXYMiR3VEMLnW2gka4ItP+KU+FSsoxQM4XJmOH49zIPNnpAmZPt/
 ygEfNfHEoq3CwbXV9nvGzoQ7QKIQcPe3pmrmPjF+ASLmp6cUkHqnO2jsVrkVfpTuI8sv
 qXS0Ikbtp1g7IoEq0bJGwDyPnQc5BtFwtYM9q9nTJZB+R4+ARNTF6BAdiKFSF62uiusk
 csn0P5x+wYHvxRf1W+A8MlNKEEt+XdwEw5PhYkc/DCvHZk4iJTjDVf2lNJeqUTf9XUux
 eJRIvbGydk5qcvzkUjkRlbeZUbioUrVU0VvSnFQl39mNDWrQBqXo1hjy8wqGUJZ7uyMp
 wfsg==
X-Gm-Message-State: AOAM5312ZyHFsG33X2nmapZnWfuNstTvrVFcJVATBgDNOREoW5BvP2W9
 OSP8m86D6QVD0tiG9UnUEA4/Rt8TW/tEDUapHaOQiA==
X-Google-Smtp-Source: ABdhPJwwqPvOV5fW4DFw+IAMXYFNzIrdG5+f2nY8rnqBl7I5PdmLxNM+VtG4ANU+V52fhbMPH/Wdjk+Fa8dLHdTCNJU=
X-Received: by 2002:a2e:b610:: with SMTP id r16mr2666352ljn.145.1602570781940; 
 Mon, 12 Oct 2020 23:33:01 -0700 (PDT)
MIME-Version: 1.0
References: <20201006115839.1026402-1-aderumier@odiso.com>
 <20201006115839.1026402-2-aderumier@odiso.com>
 <CAMGxVzCCQusf3ZkfxV0=CGGoZRJhfwyhtB40zgyq6T+PSjXdRQ@mail.gmail.com>
 <190420382.634.1602569100580@webmail.proxmox.com>
In-Reply-To: <190420382.634.1602569100580@webmail.proxmox.com>
From: Alexandre Derumier <aderumier@odiso.com>
Date: Tue, 13 Oct 2020 08:32:50 +0200
Message-ID: <CAMGxVzBo940=kdAHLxWgY6RkuFYnHxwP-pEexs_rw8zSegogLA@mail.gmail.com>
To: Dietmar Maurer <dietmar@proxmox.com>
Cc: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
X-SPAM-LEVEL: Spam detection results:  0
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 HTML_MESSAGE            0.001 HTML included in message
 RCVD_IN_DNSWL_NONE     -0.0001 Sender listed at https://www.dnswl.org/,
 no trust
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more
 information. [qemu.sl]
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
Subject: Re: [pve-devel] [PATCH pve-common 1/1] ProcFSTools: add
 read_pressure
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Tue, 13 Oct 2020 06:33:09 -0000

>>I have no idea how reliable this is, because we do not use cgroups v2.
But yes,
>>I think this would be useful.

I have tested it on a host with a lot of small vms. (something like 400vms
on  a 48cores), with this number of vms, they was a lot of context
switches, and vms was laggy.
cpu usage was ok (maybe 40%), loadaverage was around 40,  but pressure was
around 20%. (so it seem more precise than loadaverage)

global /proc/pressure/cpu   was almost the sum of cgroups of
/sys/fs/cgroup/unified/qemu.slice/<vmid>.scope/cpu.pressure

so,it seem reliable.

(I don't have lxc container in production, but I think it should be the
same)

So, yes, I think we could add them to rrd for both host/vms.


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 ?

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).
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)




Le mar. 13 oct. 2020 =C3=A0 08:05, Dietmar Maurer <dietmar@proxmox.com> a =
=C3=A9crit :

> > I have notice that it's possible to get pressure info for each vm/ct
> > through cgroups
> >
> > /sys/fs/cgroup/unified/qemu.slice/<vmid>.scope/cpu.pressure
> > /sys/fs/cgroup/unified/lxc/<vmid>/cpu.pressure
> >
> >
> > Maybe it could be great to have some new rrd graphs for each vm/ct ?
> > They are very useful counters to known a specific vm/ct is overloaded
>
> I have no idea how reliable this is, because we do not use cgroups v2. Bu=
t
> yes,
> I think this would be useful.
>
>