public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "KAMEZAWA Hiroyuki" <kamezawa.hiroyu@jp.fujitsu.com>
To: "Ken Chen" <kenchen@google.com>
Cc: "KAMEZAWA Hiroyuki" <kamezawa.hiroyu@jp.fujitsu.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"menage@google.com" <menage@google.com>,
	"lizf@cn.fujitsu.com" <lizf@cn.fujitsu.com>,
	"balbir@linux.vnet.ibm.com" <balbir@linux.vnet.ibm.com>,
	mingo@elte.hu,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>
Subject: Re: [PATCH] change cpuacct usage percpu format v2
Date: Sat, 28 Feb 2009 09:14:27 +0900 (JST)	[thread overview]
Message-ID: <661fca240cb094bcf4d261ccebab9848.squirrel@webmail-b.css.fujitsu.com> (raw)
In-Reply-To: <b040c32a0902271600h31785bb8q93acde59f5d15e3d@mail.gmail.com>

Ken Chen さんは書きました:
> On Fri, Feb 27, 2009 at 3:34 PM, KAMEZAWA Hiroyuki
> <kamezawa.hiroyu@jp.fujitsu.com> wrote:
>> "a lot of" ? I talking about cpu hotplug and reading another file as
>> /sys/devices/system/cpu/present every time before reading this file
>> gives much much much more overhead ;)
>
> yes, really a lot.  CPU hotplug is an uncommon event.  It happens
> perhaps once a day? maybe once an hour?
>
Are you saying the software should have hotplug script and send SIGHUP or
some to reload the present map ?

> User monitoring process usually reads usage_percpu at fairly high
> rate, say once a sec.  At each pass it will need to parse N number of
> CPU index.  The overhead is N_CPU * T, where T is time in second
> between cpu hotplug event.  Assume T = one day, on a moderate sized
> 64-CPU size machine, the overhead is:
>
> 64 * 86400 : 1, that's like 5.5 million to 1 ratio.  To me that is
> *high* overhead.
>
Sounds strange. I can't catch hat you want to say.

parsing overhead is
==
 1. read cpu.usage_perpu.
 2. parse the line to number (separated by " ")
 3. tie the number to cpu id which is loadead at startup
v.s.
 1. read cpu.usage_percpu.
 2. parse the line to number (sparated by ":" and "\n")
 3. record it
==
Hmm ? no big difference.

But okay, if you don't want this, I'll just add warning text to
Documentation/cgroup/cpuacct.txt as the user may have to prepare
cpu hotplug script if you write flight-recorder like "sar".

Thanks,
-Kame


  reply	other threads:[~2009-02-28  0:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-27  5:05 [PATCH] change cpuacct usage percpu format KAMEZAWA Hiroyuki
2009-02-27  6:39 ` Balbir Singh
2009-02-27  6:55   ` KAMEZAWA Hiroyuki
2009-02-27  7:01     ` Balbir Singh
2009-02-27  7:03       ` Li Zefan
2009-02-27  7:05         ` KAMEZAWA Hiroyuki
2009-02-27  7:29 ` [PATCH] change cpuacct usage percpu format v2 KAMEZAWA Hiroyuki
2009-02-27  7:55   ` Paul Menage
2009-02-27  8:02     ` KAMEZAWA Hiroyuki
2009-02-27 20:13   ` Ken Chen
2009-02-27 23:34     ` KAMEZAWA Hiroyuki
2009-02-28  0:00       ` Ken Chen
2009-02-28  0:14         ` KAMEZAWA Hiroyuki [this message]
2009-02-28  0:42           ` KAMEZAWA Hiroyuki
2009-02-28  1:11             ` Dhaval Giani
2009-02-28  5:25               ` KAMEZAWA Hiroyuki
2009-02-28  9:24                 ` Dhaval Giani
2009-02-28  9:37                   ` KAMEZAWA Hiroyuki

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=661fca240cb094bcf4d261ccebab9848.squirrel@webmail-b.css.fujitsu.com \
    --to=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=kenchen@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=menage@google.com \
    --cc=mingo@elte.hu \
    /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