From: Alexandra Yates <alexandra.yates at linux.intel.com>
To: powertop@lists.01.org
Subject: Re: [Powertop] Too much memory consumption by powertop
Date: Wed, 29 Apr 2015 10:39:37 -0700 [thread overview]
Message-ID: <53172.10.24.5.14.1430329177.squirrel@linux.intel.com> (raw)
In-Reply-To: s5hvbgg83a0.wl-tiwai@suse.de
[-- Attachment #1: Type: text/plain, Size: 2191 bytes --]
> At Tue, 28 Apr 2015 10:14:17 -0700 (PDT),
> Alexandra Yates wrote:
>>
>>
>> > As powertop list is for subscribers only, here Takashi's
>> > findings concerning a big memory waste fowarded:
>> >
>> > ---------- Forwarded Message ----------
>> >
>> > Subject: Too much memory consumption by powertop
>> > Date: Tuesday, April 28, 2015, 05:32:41 PM
>> > From: Takashi Iwai <tiwai(a)suse.de>
>> > To: powertop(a)lists.01.org
>> > CC: trenn(a)suse.de
>> >
>> > Hi,
>> >
>> > I noticed that powertop consumes way too much memory than needed. It
>> > constantly takes over 170MB RES, sometimes over 200MB.
>> >
>> > Then I looked at profile, and it showed that most of memory is
>> > allocated for newpad_sp(). Indeed, the current code allocates a pad
>> > of the fixed size of 1000x1000 (!) for each tab, and we have five
>> > tabs, so five times of that. No wonder that such a small neat CUI
>> > program is so hungry.
>> >
>> > For example, a hack like below already reduces the memory footprint
>> > to around 20MB, 90% cut. Not bad.
>> >
>> > --- a/src/display.cpp
>> > +++ b/src/display.cpp
>> > @@ -48,7 +48,7 @@ void create_tab(const string &name, cons
>> > if (!w)
>> > w = new(class tab_window);
>> >
>> > - w->win = newpad(1000,1000);
>> > + w->win = newpad(80,160); // XXX FIXME XXX
>> > tab_names.push_back(name);
>> > tab_windows[name] = w;
>> > tab_translations[name] = translation;
>> >
>> > Can anyone look into this and give a better / smarter solution?
>> >
>> >
>> > thanks,
>> >
>> > Takashi
>> > -----------------------------------------
>> > _______________________________________________
>> > PowerTop mailing list
>> > PowerTop(a)lists.01.org
>> > https://lists.01.org/mailman/listinfo/powertop
>> >
>>
>> To avoid the high memory consumption on testing run it on HTML mode so
>> that the powertop.html report is generated in the background.
>
> Yeah, starting firefox is smaller than powertop, indeed :)
>
>
> Takashi
>
Now if you really want save resources you could go by having your output
on a .txt file.
Thank you,
Alexandra.
next reply other threads:[~2015-04-29 17:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-29 17:39 Alexandra Yates [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-04-29 21:14 [Powertop] Too much memory consumption by powertop Alexandra Yates
2015-04-28 21:54 Arjan van de Ven
2015-04-28 21:29 Kok, Auke-jan H
2015-04-28 17:14 Alexandra Yates
2015-04-28 15:58 Thomas Renninger
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=53172.10.24.5.14.1430329177.squirrel@linux.intel.com \
--to=powertop@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.