On Wed, Jun 28, 2017 at 10:01:59AM +0200, Wolfgang Bumiller wrote:
> On Mon, Jun 19, 2017 at 12:10:10PM +0200, Tobias Böhm wrote:
> > Currently, only read/write bytes are extracted from cgroups stats.
> 
> s/bytes/operations/
> 
> > In order to provide IO operation stats these counters need to be
> > read as well.
> > 
> > Signed-off-by: Tobias Böhm <t...@robhost.de>
> > ---
> >  src/PVE/LXC.pm | 12 ++++++++++++
> >  1 file changed, 12 insertions(+)
> > 
> > diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
> > index 32b0318..8e1043a 100644
> > --- a/src/PVE/LXC.pm
> > +++ b/src/PVE/LXC.pm
> > @@ -183,6 +183,9 @@ sub vmstatus {
> >     $d->{diskread} = 0;
> >     $d->{diskwrite} = 0;
> >  
> > +   $d->{ioread} = 0;
> > +   $d->{iowrite} = 0;
> > +
> >     $d->{template} = PVE::LXC::Config->is_template($conf);
> >      }
> >  
> > @@ -210,6 +213,15 @@ sub vmstatus {
> >         }
> >     }
> >  
> > +   my $blkio_opers = read_cgroup_value('blkio', $vmid, 
> > 'blkio.throttle.io_serviced', 1);
> 
> The blkio cgroup is not really hierarchical. If a container creates a
> subdirectory in its /sys/fs/cgroup/blkio and moves its processes into
> it you won't see any updates here, and recursing through the entire
> tree is a no-go. We need a better solution for this.

Note that yes, we do already use the blkio cgroup a couple lines above,
but that, too, is basically "broken" (depending on the storage and what
the container actually does) and adding more "wrong" data doesn't
really make sense to me.

_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to