public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Jeremi Piotrowski <jeremi.piotrowski@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] OT: Can a linux vmware guest tell if its host is CPU constrained?
Date: Thu, 30 Jul 2020 21:36:09 +0200	[thread overview]
Message-ID: <CALpL90PFV2veXHOFBBiwcSpYAJyCqTVSf31BGzWD-3NRX6Pb7Q@mail.gmail.com> (raw)
In-Reply-To: <CAC=wYCEMyYPj_rk7Ys-QaY3qoHnogpG+RJ6RxWvqAVwSWri1yw@mail.gmail.com>

On Thu, Jul 30, 2020 at 2:52 AM Adam Carter <adamcarter3@gmail.com> wrote:
>>
>> > So should I run something like: date ; time <some command that runs at
>> > 100%CPU for a minute> ; date ?
>>
>> No, date will pull from your RTC, which is usually kept up to date with an asynchronous
>> counter.
>>
>> First check GNU top(1) and look in the %Cpu line for "st." That is % CPU time stolen. If it is
>> nonzero then the guest time's accounting is probably working. It's not typical for the
>> hypervisor to hide this information. It's really important for load balancing.
>
>
> Thanks for that. I haven't seen any non-zero stolen time yet, however.
>
> FWIW vmstat also shows stolen time.

Stolen time reporting through vmstat/top only works on xen and kvm
hypervisors, it wasn't
implemented for vmware. It actually looks like it was finally
submitted for linux v5.7
(https://lore.kernel.org/lkml/20200331100353.GA37509@gmail.com/).

If you want those numbers for older kernels, fetch this repository:
https://github.com/dagwieers/vmguestlib
and run vmguest-stats. You'll also need open-vm-tools installed. Have
used this many times in the past and
the numbers are good.


      reply	other threads:[~2020-07-30 19:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-27  3:23 [gentoo-user] OT: Can a linux vmware guest tell if its host is CPU constrained? Adam Carter
2020-07-27  3:34 ` Ashley Dixon
2020-07-27  4:21   ` Adam Carter
2020-07-27  4:36     ` Ashley Dixon
2020-07-27 15:01     ` Sid Spry
2020-07-28  2:24       ` Adam Carter
2020-07-28 16:56         ` Sid Spry
2020-07-30  0:51           ` Adam Carter
2020-07-30 19:36             ` Jeremi Piotrowski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALpL90PFV2veXHOFBBiwcSpYAJyCqTVSf31BGzWD-3NRX6Pb7Q@mail.gmail.com \
    --to=jeremi.piotrowski@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox