powertop.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* Re: [Powertop] powertop accounting for virtual network interfaces
@ 2017-01-06 16:14 Peter Jones
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Jones @ 2017-01-06 16:14 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 2619 bytes --]

On Fri, Jan 06, 2017 at 07:43:47AM -0800, Arjan van de Ven wrote:
> On 1/6/2017 7:10 AM, Peter Jones wrote:
> > Hi,
> > 
> > I noticed something this morning when running powertop on my Dell XPS-13
> > (skylake).  I've got wifi tethered to my phone, which is also plugged in
> > the USB port, and the company vpn running on a virtual bridge on top of
> > that.  Powertop accounts for that like this:
> > 
> > -------------------------
> > The battery reports a discharge rate of 5.99 W
> > The estimated remaining time is 8 hours, 32 minutes
> > 
> > Summary: 529.1 wakeups/second,  5.2 GPU ops/seconds, 0.0 VFS ops/sec and 8.9% CPU use
> > 
> > Power est.              Usage       Events/s    Category       Description
> >   3.32 W      0.0 pkts/s                Device         nic:virbr0
> >   2.71 W    100.0%                      Device         USB device: usb-device-8087-0a2a
> 
> > 
> > The second line is the (disabled) bluetooth device.  No idea what's going on
> > there; bluetoothctl believes it's powered down.
> 
> but it's not in USB autosuspend, which then has lots of nasty power
> impacts on CPU C states and the like.  it's the USB device that's
> getting blamed, not the bluetooth view of that device

I think (without looking at the code) you're using time based weights like load
averages do, and once I actually powered it off with bluetoothctl it still took
considerably less power, but it took a while to amortize away?  Anyway, the
gnome control didn't seem to do anything, but the manual way did, and after a
couple of hours (and turning the backlight down) powertop now looks like:

------------------------
The battery reports a discharge rate of 4.40 W
The estimated remaining time is 10 hours, 12 minutes

Summary: 629.2 wakeups/second,  6.4 GPU ops/seconds, 0.0 VFS ops/sec and 14.3% CPU use

Power est.              Usage       Events/s    Category       Description
  1.97 W      0.0 pkts/s                Device         nic:virbr0
  855 mW    642.1 µs/s     179.5        Interrupt      [17] idma64.1
  701 mW     60.0 ms/s      38.3        Process        /usr/bin/gnome-shell
  459 mW      2.6 pkts/s                Device         Network interface: wlp58s0 (iwlwifi)
  363 mW    100.0%                      Device         Radio device: btusb
...
------------------------

The btusb radio device did show up before, but much lower on the list since the
top was dominated by big things, and I think it's where the lack of autosuspend
is showing up.

Obviously you can still see the nic:virbr0 mis-attribution here.

-- 
  Peter

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Powertop] powertop accounting for virtual network interfaces
@ 2017-01-06 17:41 Oleg Drokin
  0 siblings, 0 replies; 6+ messages in thread
From: Oleg Drokin @ 2017-01-06 17:41 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 2145 bytes --]


On Jan 6, 2017, at 12:29 PM, Peter Jones wrote:

> On Fri, Jan 06, 2017 at 11:49:59AM -0500, Oleg Drokin wrote:
>> 
>> On Jan 6, 2017, at 10:10 AM, Peter Jones wrote:
>> 
>>> Hi,
>>> 
>>> I noticed something this morning when running powertop on my Dell XPS-13
>>> (skylake).  I've got wifi tethered to my phone, which is also plugged in
>>> the USB port, and the company vpn running on a virtual bridge on top of
>>> that.  Powertop accounts for that like this:
>>> 
>>> -------------------------
>>> The battery reports a discharge rate of 5.99 W
>>> The estimated remaining time is 8 hours, 32 minutes
>>> 
>>> Summary: 529.1 wakeups/second,  5.2 GPU ops/seconds, 0.0 VFS ops/sec and 8.9% CPU use
>>> 
>>> Power est.              Usage       Events/s    Category       Description
>>> 3.32 W      0.0 pkts/s                Device         nic:virbr0
>>> 2.71 W    100.0%                      Device         USB device: usb-device-8087-0a2a
>>> 739 mW     53.6 ms/s      36.2        Process        /usr/bin/gnome-shell
>>> 477 mW    100.0%                      Device         Display backlight
>>> ...
>>> -------------------------
>>> 
>>> The second line is the (disabled) bluetooth device.  No idea what's going on
>>> there; bluetoothctl believes it's powered down.
>> 
>> Is this Fedora 24/25?
>> I filed a ticket for this last summer, it's fwupd holding the mouse
>> usbfs device open.
> 
> Yeah, it's f25.  So that's interesting, but it's not the mouse device
> (because I don't have one).  I suspect you're right about the cause,
> though.  I'll poke hughsie about it, thanks.

Right, mouse is BT, so you can only get to btusb locally, that's what I see
too, just a bit misworded since it was awhile ago and my memory is a bit hazy.

>> If you'd use current master version of powertop, you'd see it
>> correctly attributed to fwupd.
> 
> I'm not sure how to take to this statement.  Are you really chiding me
> for using the version that's in the distro I'm using?

Oh, no. Just a comment that current powertop handles this better and
once Fedora catches up you'll see the benefits too.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Powertop] powertop accounting for virtual network interfaces
@ 2017-01-06 17:29 Peter Jones
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Jones @ 2017-01-06 17:29 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 1877 bytes --]

On Fri, Jan 06, 2017 at 11:49:59AM -0500, Oleg Drokin wrote:
> 
> On Jan 6, 2017, at 10:10 AM, Peter Jones wrote:
> 
> > Hi,
> > 
> > I noticed something this morning when running powertop on my Dell XPS-13
> > (skylake).  I've got wifi tethered to my phone, which is also plugged in
> > the USB port, and the company vpn running on a virtual bridge on top of
> > that.  Powertop accounts for that like this:
> > 
> > -------------------------
> > The battery reports a discharge rate of 5.99 W
> > The estimated remaining time is 8 hours, 32 minutes
> > 
> > Summary: 529.1 wakeups/second,  5.2 GPU ops/seconds, 0.0 VFS ops/sec and 8.9% CPU use
> > 
> > Power est.              Usage       Events/s    Category       Description
> >  3.32 W      0.0 pkts/s                Device         nic:virbr0
> >  2.71 W    100.0%                      Device         USB device: usb-device-8087-0a2a
> >  739 mW     53.6 ms/s      36.2        Process        /usr/bin/gnome-shell
> >  477 mW    100.0%                      Device         Display backlight
> > ...
> > -------------------------
> > 
> > The second line is the (disabled) bluetooth device.  No idea what's going on
> > there; bluetoothctl believes it's powered down.
> 
> Is this Fedora 24/25?
> I filed a ticket for this last summer, it's fwupd holding the mouse
> usbfs device open.

Yeah, it's f25.  So that's interesting, but it's not the mouse device
(because I don't have one).  I suspect you're right about the cause,
though.  I'll poke hughsie about it, thanks.

> If you'd use current master version of powertop, you'd see it
> correctly attributed to fwupd.

I'm not sure how to take to this statement.  Are you really chiding me
for using the version that's in the distro I'm using?

> See https://bugzilla.redhat.com/show_bug.cgi?id=1340587

Thanks.

-- 
  Peter

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Powertop] powertop accounting for virtual network interfaces
@ 2017-01-06 16:49 Oleg Drokin
  0 siblings, 0 replies; 6+ messages in thread
From: Oleg Drokin @ 2017-01-06 16:49 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 1403 bytes --]


On Jan 6, 2017, at 10:10 AM, Peter Jones wrote:

> Hi,
> 
> I noticed something this morning when running powertop on my Dell XPS-13
> (skylake).  I've got wifi tethered to my phone, which is also plugged in
> the USB port, and the company vpn running on a virtual bridge on top of
> that.  Powertop accounts for that like this:
> 
> -------------------------
> The battery reports a discharge rate of 5.99 W
> The estimated remaining time is 8 hours, 32 minutes
> 
> Summary: 529.1 wakeups/second,  5.2 GPU ops/seconds, 0.0 VFS ops/sec and 8.9% CPU use
> 
> Power est.              Usage       Events/s    Category       Description
>  3.32 W      0.0 pkts/s                Device         nic:virbr0
>  2.71 W    100.0%                      Device         USB device: usb-device-8087-0a2a
>  739 mW     53.6 ms/s      36.2        Process        /usr/bin/gnome-shell
>  477 mW    100.0%                      Device         Display backlight
> ...
> -------------------------
> 
> The second line is the (disabled) bluetooth device.  No idea what's going on
> there; bluetoothctl believes it's powered down.

Is this Fedora 24/25?
I filed a ticket for this last summer, it's fwupd holding the mouse usbfs device
open.
If you'd use current master version of powertop, you'd see it correctly attributed to fwupd.

See https://bugzilla.redhat.com/show_bug.cgi?id=1340587


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Powertop] powertop accounting for virtual network interfaces
@ 2017-01-06 15:43 Arjan van de Ven
  0 siblings, 0 replies; 6+ messages in thread
From: Arjan van de Ven @ 2017-01-06 15:43 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 1125 bytes --]

On 1/6/2017 7:10 AM, Peter Jones wrote:
> Hi,
>
> I noticed something this morning when running powertop on my Dell XPS-13
> (skylake).  I've got wifi tethered to my phone, which is also plugged in
> the USB port, and the company vpn running on a virtual bridge on top of
> that.  Powertop accounts for that like this:
>
> -------------------------
> The battery reports a discharge rate of 5.99 W
> The estimated remaining time is 8 hours, 32 minutes
>
> Summary: 529.1 wakeups/second,  5.2 GPU ops/seconds, 0.0 VFS ops/sec and 8.9% CPU use
>
> Power est.              Usage       Events/s    Category       Description
>   3.32 W      0.0 pkts/s                Device         nic:virbr0
>   2.71 W    100.0%                      Device         USB device: usb-device-8087-0a2a

>
> The second line is the (disabled) bluetooth device.  No idea what's going on
> there; bluetoothctl believes it's powered down.

but it's not in USB autosuspend, which then has lots of nasty power impacts on CPU C states and the like.
it's the USB device that's getting blamed, not the bluetooth view of that device


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Powertop] powertop accounting for virtual network interfaces
@ 2017-01-06 15:10 Peter Jones
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Jones @ 2017-01-06 15:10 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 1493 bytes --]

Hi,

I noticed something this morning when running powertop on my Dell XPS-13
(skylake).  I've got wifi tethered to my phone, which is also plugged in
the USB port, and the company vpn running on a virtual bridge on top of
that.  Powertop accounts for that like this:

-------------------------
The battery reports a discharge rate of 5.99 W
The estimated remaining time is 8 hours, 32 minutes

Summary: 529.1 wakeups/second,  5.2 GPU ops/seconds, 0.0 VFS ops/sec and 8.9% CPU use

Power est.              Usage       Events/s    Category       Description
  3.32 W      0.0 pkts/s                Device         nic:virbr0
  2.71 W    100.0%                      Device         USB device: usb-device-8087-0a2a
  739 mW     53.6 ms/s      36.2        Process        /usr/bin/gnome-shell
  477 mW    100.0%                      Device         Display backlight
...
-------------------------

The first line seems almost certainly to just be mis-attribution of the
base power level.  I talked to arjan on IRC, and he suggested that we
should probably just ignore virtual network interfaces.  If it were
ignored, any actual network device power usage or chipset overhead will
be accounted for on the real network device, and any cpu associated with
it will show up on the process doing the work (i.e. openvpn).

The second line is the (disabled) bluetooth device.  No idea what's going on
there; bluetoothctl believes it's powered down.

Thoughts?

-- 
  Peter

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-01-06 17:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-06 16:14 [Powertop] powertop accounting for virtual network interfaces Peter Jones
  -- strict thread matches above, loose matches on Subject: below --
2017-01-06 17:41 Oleg Drokin
2017-01-06 17:29 Peter Jones
2017-01-06 16:49 Oleg Drokin
2017-01-06 15:43 Arjan van de Ven
2017-01-06 15:10 Peter Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).