Re: [PATCH RFC 0/3] Add guest cpu_entitlement reporting

2012-08-28 Thread Anthony Liguori
Avi Kivity  writes:

> On 08/27/2012 02:27 PM, Michael Wolf wrote:
>> On Mon, 2012-08-27 at 13:31 -0700, Avi Kivity wrote:
>> > On 08/27/2012 01:23 PM, Michael Wolf wrote:
>> > > > 
>> > > > How would a guest know what its entitlement is?
>> > > > 
>> > > > 
>> > >
>> > > Currently the Admin/management tool setting up the guests will put it on
>> > > the qemu commandline.  From this it is passed via an ioctl to the host.
>> > > The guest will get the value from the host via a hypercall.
>> > >
>> > > In the future the host could try and do some of it automatically in some
>> > > cases. 
>> > 
>> > Seems to me it's a meaningless value for the guest.  Suppose it is
>> > migrated to a host that is more powerful, and as a result its relative
>> > entitlement is reduced.  The value needs to be adjusted.
>>
>> This is why I chose to manage the value from the sysctl interface rather
>> than just have it stored as a value in /proc.  Whatever tool was used to
>> migrate the vm could hopefully adjust the sysctl value on the guest.
>
> We usually try to avoid this type of coupling.  What if the guest is
> rebooting while this is happening?  What if it's not running Linux at
> all?

The guest shouldn't need to know it's entitlement.  Or at least, it's up
to a management tool to report that in a way that's meaningful for the
guest.

For instance, with a hosting provider, you may have 3 service levels
(small, medium, large).  How you present whether the guest is small,
medium, or large to the guest is up to the hosting provider.

>
>> > 
>> > This is best taken care of from the host side.
>>
>> Not sure what you are getting at here.  If you are running in a cloud
>> environment, you purchase a VM with the understanding that you are
>> getting certain resources.  As this type of user I don't believe you
>> have any access to the host to see this type of information.  So the
>> user still wouldnt have a way to confirm that they are receiving what
>> they should be in the way of processor resources.
>>
>> Would you please elaborate a little more on this?
>
> I meant not reporting this time as steal time.  But that cripples steal
> time reporting.
>
> Looks like for each quanta we need to report how much real time has
> passed, how much the guest was actually using, and how much the guest
> was not using due to overcommit (with the reminder being unallocated
> time).  The guest could then present it any way it wanted to.

What I had previously suggested what splitting entitlement loss out of
steal time and reporting it as a separate metric (but not reporting a
fixed notion of entitlement).

You're missing the entitlement loss bit above.  But you need to call
out entitlement loss in order to report idle time correctly.

I think changing steal time (as this patch does) is wrong.

Regards,

Anthony Liguori

>
> -- 
> I have a truly marvellous patch that fixes the bug which this
> signature is too narrow to contain.
>
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH RFC 0/3] Add guest cpu_entitlement reporting

2012-08-27 Thread Michael Wolf
On Mon, 2012-08-27 at 14:41 -0700, Glauber Costa wrote:
> On 08/27/2012 02:27 PM, Michael Wolf wrote:
> > On Mon, 2012-08-27 at 13:31 -0700, Avi Kivity wrote:
> >> On 08/27/2012 01:23 PM, Michael Wolf wrote:
> 
>  How would a guest know what its entitlement is?
> 
> 
> >>>
> >>> Currently the Admin/management tool setting up the guests will put it on
> >>> the qemu commandline.  From this it is passed via an ioctl to the host.
> >>> The guest will get the value from the host via a hypercall.
> >>>
> >>> In the future the host could try and do some of it automatically in some
> >>> cases. 
> >>
> >> Seems to me it's a meaningless value for the guest.  Suppose it is
> >> migrated to a host that is more powerful, and as a result its relative
> >> entitlement is reduced.  The value needs to be adjusted.
> > 
> > This is why I chose to manage the value from the sysctl interface rather
> > than just have it stored as a value in /proc.  Whatever tool was used to
> > migrate the vm could hopefully adjust the sysctl value on the guest.
> >>
> >> This is best taken care of from the host side.
> > 
> > Not sure what you are getting at here.  If you are running in a cloud
> > environment, you purchase a VM with the understanding that you are
> > getting certain resources.  As this type of user I don't believe you
> > have any access to the host to see this type of information.  So the
> > user still wouldnt have a way to confirm that they are receiving what
> > they should be in the way of processor resources.
> > 
> > Would you please elaborate a little more on this?
> 
> What do you mean they have no access to the host?
> They have access to all sorts of tools that display information from the
> host. Speaking of a view-only resource, those are strictly equivalent.
> 
> 
> 

ok.  I will go look at those resources. 

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH RFC 0/3] Add guest cpu_entitlement reporting

2012-08-27 Thread Avi Kivity
On 08/27/2012 02:27 PM, Michael Wolf wrote:
> On Mon, 2012-08-27 at 13:31 -0700, Avi Kivity wrote:
> > On 08/27/2012 01:23 PM, Michael Wolf wrote:
> > > > 
> > > > How would a guest know what its entitlement is?
> > > > 
> > > > 
> > >
> > > Currently the Admin/management tool setting up the guests will put it on
> > > the qemu commandline.  From this it is passed via an ioctl to the host.
> > > The guest will get the value from the host via a hypercall.
> > >
> > > In the future the host could try and do some of it automatically in some
> > > cases. 
> > 
> > Seems to me it's a meaningless value for the guest.  Suppose it is
> > migrated to a host that is more powerful, and as a result its relative
> > entitlement is reduced.  The value needs to be adjusted.
>
> This is why I chose to manage the value from the sysctl interface rather
> than just have it stored as a value in /proc.  Whatever tool was used to
> migrate the vm could hopefully adjust the sysctl value on the guest.

We usually try to avoid this type of coupling.  What if the guest is
rebooting while this is happening?  What if it's not running Linux at all?

> > 
> > This is best taken care of from the host side.
>
> Not sure what you are getting at here.  If you are running in a cloud
> environment, you purchase a VM with the understanding that you are
> getting certain resources.  As this type of user I don't believe you
> have any access to the host to see this type of information.  So the
> user still wouldnt have a way to confirm that they are receiving what
> they should be in the way of processor resources.
>
> Would you please elaborate a little more on this?

I meant not reporting this time as steal time.  But that cripples steal
time reporting.

Looks like for each quanta we need to report how much real time has
passed, how much the guest was actually using, and how much the guest
was not using due to overcommit (with the reminder being unallocated
time).  The guest could then present it any way it wanted to.

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH RFC 0/3] Add guest cpu_entitlement reporting

2012-08-27 Thread Glauber Costa
On 08/27/2012 02:27 PM, Michael Wolf wrote:
> On Mon, 2012-08-27 at 13:31 -0700, Avi Kivity wrote:
>> On 08/27/2012 01:23 PM, Michael Wolf wrote:

 How would a guest know what its entitlement is?


>>>
>>> Currently the Admin/management tool setting up the guests will put it on
>>> the qemu commandline.  From this it is passed via an ioctl to the host.
>>> The guest will get the value from the host via a hypercall.
>>>
>>> In the future the host could try and do some of it automatically in some
>>> cases. 
>>
>> Seems to me it's a meaningless value for the guest.  Suppose it is
>> migrated to a host that is more powerful, and as a result its relative
>> entitlement is reduced.  The value needs to be adjusted.
> 
> This is why I chose to manage the value from the sysctl interface rather
> than just have it stored as a value in /proc.  Whatever tool was used to
> migrate the vm could hopefully adjust the sysctl value on the guest.
>>
>> This is best taken care of from the host side.
> 
> Not sure what you are getting at here.  If you are running in a cloud
> environment, you purchase a VM with the understanding that you are
> getting certain resources.  As this type of user I don't believe you
> have any access to the host to see this type of information.  So the
> user still wouldnt have a way to confirm that they are receiving what
> they should be in the way of processor resources.
> 
> Would you please elaborate a little more on this?

What do you mean they have no access to the host?
They have access to all sorts of tools that display information from the
host. Speaking of a view-only resource, those are strictly equivalent.



--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH RFC 0/3] Add guest cpu_entitlement reporting

2012-08-27 Thread Michael Wolf
On Mon, 2012-08-27 at 13:31 -0700, Avi Kivity wrote:
> On 08/27/2012 01:23 PM, Michael Wolf wrote:
> > > 
> > > How would a guest know what its entitlement is?
> > > 
> > > 
> >
> > Currently the Admin/management tool setting up the guests will put it on
> > the qemu commandline.  From this it is passed via an ioctl to the host.
> > The guest will get the value from the host via a hypercall.
> >
> > In the future the host could try and do some of it automatically in some
> > cases. 
> 
> Seems to me it's a meaningless value for the guest.  Suppose it is
> migrated to a host that is more powerful, and as a result its relative
> entitlement is reduced.  The value needs to be adjusted.

This is why I chose to manage the value from the sysctl interface rather
than just have it stored as a value in /proc.  Whatever tool was used to
migrate the vm could hopefully adjust the sysctl value on the guest.
> 
> This is best taken care of from the host side.

Not sure what you are getting at here.  If you are running in a cloud
environment, you purchase a VM with the understanding that you are
getting certain resources.  As this type of user I don't believe you
have any access to the host to see this type of information.  So the
user still wouldnt have a way to confirm that they are receiving what
they should be in the way of processor resources.

Would you please elaborate a little more on this?
> 



--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH RFC 0/3] Add guest cpu_entitlement reporting

2012-08-27 Thread Glauber Costa
On 08/27/2012 01:19 PM, Michael Wolf wrote:
> On Mon, 2012-08-27 at 11:50 -0700, Glauber Costa wrote:
>> On 08/27/2012 08:50 AM, Michael Wolf wrote:
>>> On Sat, 2012-08-25 at 19:36 -0400, Glauber Costa wrote:
 On 08/24/2012 11:11 AM, Michael Wolf wrote:
> On Fri, 2012-08-24 at 08:53 +0400, Glauber Costa wrote:
>> On 08/24/2012 03:14 AM, Michael Wolf wrote:
>>> This is an RFC regarding the reporting of stealtime.  In the case of
>>> where you have a system that is running with partial processors such as
>>> KVM the user may see steal time being reported in accounting tools such
>>> as top or vmstat.  This can cause confusion for the end user.  To
>>> ease the confusion this patch set adds a sysctl interface to set the
>>> cpu entitlement.  This is the percentage of cpu that the guest system is
>>>  expected to receive.  As long as the steal time is within its expected
>>> range it will show up as 0 in /proc/stat.  The user will then see in the
>>> accounting tools that they are getting a full utilization of the cpu
>>> resources assigned to them.
>>>
>>
>> And how is such a knob not confusing?
>>
>> Steal time is pretty well defined in meaning and is shown in top for
>> ages. I really don't see the point for this.
>
> Currently you can see the steal time but you have no way of knowing if
> the cpu utilization you are seeing on the guest is the expected amount.
> I decided on making it a knob because a guest could be migrated to
> another system and it's entitlement could change because of hardware or 
> load differences.  It could simply be a /proc file and report the
> current entitlement if needed.   As things are currently implemented I 
> don't see how someone knows if the guest is running as expected or
> whether there is a problem.
>

 Turning off steal time display won't get even close to displaying the
 information you want. What you probably want is a guest-visible way to
 say how many miliseconds you are expected to run each second. Right?
>>>
>>> It is not clear to me how knowing how many milliseconds you are
>>> expecting to run will help the user.  Currently the users will run top
>>> to see how well the guest is running.  If they see _any_ steal time some
>>> users think they are not getting the full use of their processor
>>> entitlement.
>>>
>>
>> And your plan is just to selectively lie about it, but disabling it with
>> a knob?
> 
> It is about making it very obvious to the end user whether they are
> receiving their cpu entitlement.  If there is more steal time than
> expected that will still show up.  I have experimented, and it seems to
> work, to put the raw stealtime at the end of each cpu line
> in /proc/stat.  That way the raw data is there as well.   
> 
> Do you have another suggestion to communicate to the user whether they
> are receiving their full entitlement?  At the very least shouldn't the
> entitlement reside in a /proc file somewhere so that the user could look
> up the value and "do the math"?
> 

I personally believe Avi is right here. This is something to be done at
the host side. The user can learn this from any tool he is using to
manage his VMs.

Now if you absolutely must inform him from inside the guest, I would go
with the later, informing him in another location. (I am not saying I
agree with this, just that this is less worse)

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH RFC 0/3] Add guest cpu_entitlement reporting

2012-08-27 Thread Avi Kivity
On 08/27/2012 01:23 PM, Michael Wolf wrote:
> > 
> > How would a guest know what its entitlement is?
> > 
> > 
>
> Currently the Admin/management tool setting up the guests will put it on
> the qemu commandline.  From this it is passed via an ioctl to the host.
> The guest will get the value from the host via a hypercall.
>
> In the future the host could try and do some of it automatically in some
> cases. 

Seems to me it's a meaningless value for the guest.  Suppose it is
migrated to a host that is more powerful, and as a result its relative
entitlement is reduced.  The value needs to be adjusted.

This is best taken care of from the host side.

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH RFC 0/3] Add guest cpu_entitlement reporting

2012-08-27 Thread Michael Wolf
On Mon, 2012-08-27 at 11:55 -0700, Avi Kivity wrote:
> On 08/23/2012 04:14 PM, Michael Wolf wrote:
> > This is an RFC regarding the reporting of stealtime.  In the case of
> > where you have a system that is running with partial processors such as
> > KVM the user may see steal time being reported in accounting tools such
> > as top or vmstat.  This can cause confusion for the end user.  To
> > ease the confusion this patch set adds a sysctl interface to set the
> > cpu entitlement.  This is the percentage of cpu that the guest system is
> >  expected to receive.  As long as the steal time is within its expected
> > range it will show up as 0 in /proc/stat.  The user will then see in the
> > accounting tools that they are getting a full utilization of the cpu
> > resources assigned to them.
> >
> > This patchset is changing the contents/output of /proc/stat and could 
> > affect 
> > user tools.  However the default setting is that the cpu is entitled to 
> > 100% 
> > so the code will act as before.  Also another field could be added to the 
> > /proc/stat output and show the unaltered steal time. Since this additional 
> > field could cause more confusion than it would clear up I have left it out 
> > for now.
> > 
> 
> How would a guest know what its entitlement is?
> 
> 

Currently the Admin/management tool setting up the guests will put it on
the qemu commandline.  From this it is passed via an ioctl to the host.
The guest will get the value from the host via a hypercall.

In the future the host could try and do some of it automatically in some
cases. 

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH RFC 0/3] Add guest cpu_entitlement reporting

2012-08-27 Thread Michael Wolf
On Mon, 2012-08-27 at 11:50 -0700, Glauber Costa wrote:
> On 08/27/2012 08:50 AM, Michael Wolf wrote:
> > On Sat, 2012-08-25 at 19:36 -0400, Glauber Costa wrote:
> >> On 08/24/2012 11:11 AM, Michael Wolf wrote:
> >>> On Fri, 2012-08-24 at 08:53 +0400, Glauber Costa wrote:
>  On 08/24/2012 03:14 AM, Michael Wolf wrote:
> > This is an RFC regarding the reporting of stealtime.  In the case of
> > where you have a system that is running with partial processors such as
> > KVM the user may see steal time being reported in accounting tools such
> > as top or vmstat.  This can cause confusion for the end user.  To
> > ease the confusion this patch set adds a sysctl interface to set the
> > cpu entitlement.  This is the percentage of cpu that the guest system is
> >  expected to receive.  As long as the steal time is within its expected
> > range it will show up as 0 in /proc/stat.  The user will then see in the
> > accounting tools that they are getting a full utilization of the cpu
> > resources assigned to them.
> >
> 
>  And how is such a knob not confusing?
> 
>  Steal time is pretty well defined in meaning and is shown in top for
>  ages. I really don't see the point for this.
> >>>
> >>> Currently you can see the steal time but you have no way of knowing if
> >>> the cpu utilization you are seeing on the guest is the expected amount.
> >>> I decided on making it a knob because a guest could be migrated to
> >>> another system and it's entitlement could change because of hardware or 
> >>> load differences.  It could simply be a /proc file and report the
> >>> current entitlement if needed.   As things are currently implemented I 
> >>> don't see how someone knows if the guest is running as expected or
> >>> whether there is a problem.
> >>>
> >>
> >> Turning off steal time display won't get even close to displaying the
> >> information you want. What you probably want is a guest-visible way to
> >> say how many miliseconds you are expected to run each second. Right?
> > 
> > It is not clear to me how knowing how many milliseconds you are
> > expecting to run will help the user.  Currently the users will run top
> > to see how well the guest is running.  If they see _any_ steal time some
> > users think they are not getting the full use of their processor
> > entitlement.
> >
> 
> And your plan is just to selectively lie about it, but disabling it with
> a knob?

It is about making it very obvious to the end user whether they are
receiving their cpu entitlement.  If there is more steal time than
expected that will still show up.  I have experimented, and it seems to
work, to put the raw stealtime at the end of each cpu line
in /proc/stat.  That way the raw data is there as well.   

Do you have another suggestion to communicate to the user whether they
are receiving their full entitlement?  At the very least shouldn't the
entitlement reside in a /proc file somewhere so that the user could look
up the value and "do the math"?

> 
> > Maybe I'm missing what you are proposing, but even if you knew the
> > milliseconds that you were expecting for your processor you would have
> > to adjust the top output in your head so to speak.  You would see the
> > utilization and then say 'ok that matches the number of milliseconds I
> > expected to run..."   If we take away the steal time (as long as it is
> > equal to or less than the expected amount of steal time) then the user
> > running top will see the 100% utilization.
> > 
> 



--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH RFC 0/3] Add guest cpu_entitlement reporting

2012-08-27 Thread Avi Kivity
On 08/23/2012 04:14 PM, Michael Wolf wrote:
> This is an RFC regarding the reporting of stealtime.  In the case of
> where you have a system that is running with partial processors such as
> KVM the user may see steal time being reported in accounting tools such
> as top or vmstat.  This can cause confusion for the end user.  To
> ease the confusion this patch set adds a sysctl interface to set the
> cpu entitlement.  This is the percentage of cpu that the guest system is
>  expected to receive.  As long as the steal time is within its expected
> range it will show up as 0 in /proc/stat.  The user will then see in the
> accounting tools that they are getting a full utilization of the cpu
> resources assigned to them.
>
> This patchset is changing the contents/output of /proc/stat and could affect 
> user tools.  However the default setting is that the cpu is entitled to 100% 
> so the code will act as before.  Also another field could be added to the 
> /proc/stat output and show the unaltered steal time. Since this additional 
> field could cause more confusion than it would clear up I have left it out 
> for now.
> 

How would a guest know what its entitlement is?


-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH RFC 0/3] Add guest cpu_entitlement reporting

2012-08-27 Thread Glauber Costa
On 08/27/2012 08:50 AM, Michael Wolf wrote:
> On Sat, 2012-08-25 at 19:36 -0400, Glauber Costa wrote:
>> On 08/24/2012 11:11 AM, Michael Wolf wrote:
>>> On Fri, 2012-08-24 at 08:53 +0400, Glauber Costa wrote:
 On 08/24/2012 03:14 AM, Michael Wolf wrote:
> This is an RFC regarding the reporting of stealtime.  In the case of
> where you have a system that is running with partial processors such as
> KVM the user may see steal time being reported in accounting tools such
> as top or vmstat.  This can cause confusion for the end user.  To
> ease the confusion this patch set adds a sysctl interface to set the
> cpu entitlement.  This is the percentage of cpu that the guest system is
>  expected to receive.  As long as the steal time is within its expected
> range it will show up as 0 in /proc/stat.  The user will then see in the
> accounting tools that they are getting a full utilization of the cpu
> resources assigned to them.
>

 And how is such a knob not confusing?

 Steal time is pretty well defined in meaning and is shown in top for
 ages. I really don't see the point for this.
>>>
>>> Currently you can see the steal time but you have no way of knowing if
>>> the cpu utilization you are seeing on the guest is the expected amount.
>>> I decided on making it a knob because a guest could be migrated to
>>> another system and it's entitlement could change because of hardware or 
>>> load differences.  It could simply be a /proc file and report the
>>> current entitlement if needed.   As things are currently implemented I 
>>> don't see how someone knows if the guest is running as expected or
>>> whether there is a problem.
>>>
>>
>> Turning off steal time display won't get even close to displaying the
>> information you want. What you probably want is a guest-visible way to
>> say how many miliseconds you are expected to run each second. Right?
> 
> It is not clear to me how knowing how many milliseconds you are
> expecting to run will help the user.  Currently the users will run top
> to see how well the guest is running.  If they see _any_ steal time some
> users think they are not getting the full use of their processor
> entitlement.
>

And your plan is just to selectively lie about it, but disabling it with
a knob?

> Maybe I'm missing what you are proposing, but even if you knew the
> milliseconds that you were expecting for your processor you would have
> to adjust the top output in your head so to speak.  You would see the
> utilization and then say 'ok that matches the number of milliseconds I
> expected to run..."   If we take away the steal time (as long as it is
> equal to or less than the expected amount of steal time) then the user
> running top will see the 100% utilization.
> 

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH RFC 0/3] Add guest cpu_entitlement reporting

2012-08-27 Thread Michael Wolf
On Sat, 2012-08-25 at 19:36 -0400, Glauber Costa wrote:
> On 08/24/2012 11:11 AM, Michael Wolf wrote:
> > On Fri, 2012-08-24 at 08:53 +0400, Glauber Costa wrote:
> >> On 08/24/2012 03:14 AM, Michael Wolf wrote:
> >>> This is an RFC regarding the reporting of stealtime.  In the case of
> >>> where you have a system that is running with partial processors such as
> >>> KVM the user may see steal time being reported in accounting tools such
> >>> as top or vmstat.  This can cause confusion for the end user.  To
> >>> ease the confusion this patch set adds a sysctl interface to set the
> >>> cpu entitlement.  This is the percentage of cpu that the guest system is
> >>>  expected to receive.  As long as the steal time is within its expected
> >>> range it will show up as 0 in /proc/stat.  The user will then see in the
> >>> accounting tools that they are getting a full utilization of the cpu
> >>> resources assigned to them.
> >>>
> >>
> >> And how is such a knob not confusing?
> >>
> >> Steal time is pretty well defined in meaning and is shown in top for
> >> ages. I really don't see the point for this.
> > 
> > Currently you can see the steal time but you have no way of knowing if
> > the cpu utilization you are seeing on the guest is the expected amount.
> > I decided on making it a knob because a guest could be migrated to
> > another system and it's entitlement could change because of hardware or 
> > load differences.  It could simply be a /proc file and report the
> > current entitlement if needed.   As things are currently implemented I 
> > don't see how someone knows if the guest is running as expected or
> > whether there is a problem.
> > 
> 
> Turning off steal time display won't get even close to displaying the
> information you want. What you probably want is a guest-visible way to
> say how many miliseconds you are expected to run each second. Right?

It is not clear to me how knowing how many milliseconds you are
expecting to run will help the user.  Currently the users will run top
to see how well the guest is running.  If they see _any_ steal time some
users think they are not getting the full use of their processor
entitlement.

Maybe I'm missing what you are proposing, but even if you knew the
milliseconds that you were expecting for your processor you would have
to adjust the top output in your head so to speak.  You would see the
utilization and then say 'ok that matches the number of milliseconds I
expected to run..."   If we take away the steal time (as long as it is
equal to or less than the expected amount of steal time) then the user
running top will see the 100% utilization.



--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH RFC 0/3] Add guest cpu_entitlement reporting

2012-08-25 Thread Glauber Costa
On 08/24/2012 11:11 AM, Michael Wolf wrote:
> On Fri, 2012-08-24 at 08:53 +0400, Glauber Costa wrote:
>> On 08/24/2012 03:14 AM, Michael Wolf wrote:
>>> This is an RFC regarding the reporting of stealtime.  In the case of
>>> where you have a system that is running with partial processors such as
>>> KVM the user may see steal time being reported in accounting tools such
>>> as top or vmstat.  This can cause confusion for the end user.  To
>>> ease the confusion this patch set adds a sysctl interface to set the
>>> cpu entitlement.  This is the percentage of cpu that the guest system is
>>>  expected to receive.  As long as the steal time is within its expected
>>> range it will show up as 0 in /proc/stat.  The user will then see in the
>>> accounting tools that they are getting a full utilization of the cpu
>>> resources assigned to them.
>>>
>>
>> And how is such a knob not confusing?
>>
>> Steal time is pretty well defined in meaning and is shown in top for
>> ages. I really don't see the point for this.
> 
> Currently you can see the steal time but you have no way of knowing if
> the cpu utilization you are seeing on the guest is the expected amount.
> I decided on making it a knob because a guest could be migrated to
> another system and it's entitlement could change because of hardware or 
> load differences.  It could simply be a /proc file and report the
> current entitlement if needed.   As things are currently implemented I 
> don't see how someone knows if the guest is running as expected or
> whether there is a problem.
> 

Turning off steal time display won't get even close to displaying the
information you want. What you probably want is a guest-visible way to
say how many miliseconds you are expected to run each second. Right?
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH RFC 0/3] Add guest cpu_entitlement reporting

2012-08-24 Thread Michael Wolf
On Fri, 2012-08-24 at 08:53 +0400, Glauber Costa wrote:
> On 08/24/2012 03:14 AM, Michael Wolf wrote:
> > This is an RFC regarding the reporting of stealtime.  In the case of
> > where you have a system that is running with partial processors such as
> > KVM the user may see steal time being reported in accounting tools such
> > as top or vmstat.  This can cause confusion for the end user.  To
> > ease the confusion this patch set adds a sysctl interface to set the
> > cpu entitlement.  This is the percentage of cpu that the guest system is
> >  expected to receive.  As long as the steal time is within its expected
> > range it will show up as 0 in /proc/stat.  The user will then see in the
> > accounting tools that they are getting a full utilization of the cpu
> > resources assigned to them.
> > 
> 
> And how is such a knob not confusing?
> 
> Steal time is pretty well defined in meaning and is shown in top for
> ages. I really don't see the point for this.

Currently you can see the steal time but you have no way of knowing if
the cpu utilization you are seeing on the guest is the expected amount.
I decided on making it a knob because a guest could be migrated to
another system and it's entitlement could change because of hardware or 
load differences.  It could simply be a /proc file and report the
current entitlement if needed.   As things are currently implemented I 
don't see how someone knows if the guest is running as expected or
whether there is a problem.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH RFC 0/3] Add guest cpu_entitlement reporting

2012-08-23 Thread Glauber Costa
On 08/24/2012 03:14 AM, Michael Wolf wrote:
> This is an RFC regarding the reporting of stealtime.  In the case of
> where you have a system that is running with partial processors such as
> KVM the user may see steal time being reported in accounting tools such
> as top or vmstat.  This can cause confusion for the end user.  To
> ease the confusion this patch set adds a sysctl interface to set the
> cpu entitlement.  This is the percentage of cpu that the guest system is
>  expected to receive.  As long as the steal time is within its expected
> range it will show up as 0 in /proc/stat.  The user will then see in the
> accounting tools that they are getting a full utilization of the cpu
> resources assigned to them.
> 

And how is such a knob not confusing?

Steal time is pretty well defined in meaning and is shown in top for
ages. I really don't see the point for this.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html