linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Peschke <mp3@de.ibm.com>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: psusi@cfl.rr.com, Jens Axboe <jens.axboe@oracle.com>,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [Patch 0/5] I/O statistics through request queues
Date: Thu, 26 Oct 2006 17:36:59 +0200	[thread overview]
Message-ID: <4540D61B.5040802@de.ibm.com> (raw)
In-Reply-To: <20061026140218.GC4978@redhat.com>

Frank Ch. Eigler wrote:
> Hi -
> 
> On Thu, Oct 26, 2006 at 03:37:54PM +0200, Martin Peschke wrote:
>> [...]
>> lookup_table[key] = value	, or
>> lookup_table[key]++
>>
>> How does this scale?
> 
> It depends.  If one is interested in only aggregates as an end result,
> then intermediate totals can be tracked individiaully per-cpu with no
> locking contention, so this scales well.

Sorry for not being clear.
I meant scaling with regard to lots of different keys.
This is what you have described as "By 'rows'", isn't it?

For example, if I wanted to store a timestamp for each request
issued, and there were lots of devices and the I/O was driving
the system crazy - how would affect that lookup time?

I would use, say, the address of struct request as key. I would
store the start time of a request there. Once a requests completes
I would look up the start time and calculate a latency.

I would be done with that lookup table entry then.
But it won't go away, will it? Is this an issue?

>> It must be someting else than an array, because key boundaries
>> aren't known when the lookup table is created, right?
>> And actual keys might be few and far between.
> 
> In systemtap, we use a hash table.
> 
>> What if the heap of intermediate results grows into thousands or
>> more?  [...]
> 
> It depends whether you mean "rows" or "columns".
> 
> By "rows", if you need to track thousands of queues, you will need
> memory to store some data for each of them.  In systemtap's case, the
> maximum number of elements in a hash table is configurable, and is all
> allocated at startup time.  (The default is a couple of thousand.)
> This is of course still larger than enlarging the base structures the
> way your code does.  But it's only larger by a constant amount, and
> makes it unnecessary to patch the code.
> 
> By "columns", if you need to track statistical aggregates of thousands
> of data points for an individual queue, then one can use a handful of
> fixed-size counters, as you already have for histograms.
> 
> 
> Anyway, my point was not that you should use systemtap proper, or that
> you need to use the same techniques for managing data on the side.
> It's that by using instrumentation markers, more things are possible.

Right, I have gone off on a tangent - systemtap, just one out of many
likely exploiters of markers.

Anyway, I think this discussion shows that any dynamically added client
of kernel markers which needs to hold extra data for entities like
requests might be difficult to be implemented efficiently (compared
to static instrumentation), because markers, by nature, only allow
for code additions, but not for additions to existing data structures.


  reply	other threads:[~2006-10-26 15:37 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-21 12:57 [Patch 0/5] I/O statistics through request queues Martin Peschke
2006-10-23 11:37 ` Jens Axboe
2006-10-23 18:11   ` Martin Peschke
2006-10-23 20:02     ` Jens Axboe
2006-10-24 16:02       ` Martin Peschke
2006-10-24 16:20         ` Jens Axboe
2006-10-24 20:38           ` Phillip Susi
2006-10-24 22:27             ` Martin Peschke
2006-10-25 17:50               ` Frank Ch. Eigler
2006-10-26 11:07                 ` Martin Peschke
2006-10-26 12:13                   ` Frank Ch. Eigler
2006-10-26 13:37                     ` Martin Peschke
2006-10-26 14:02                       ` Frank Ch. Eigler
2006-10-26 15:36                         ` Martin Peschke [this message]
2006-10-26 19:11                           ` Frank Ch. Eigler
2006-10-24 23:04           ` Martin Peschke
2006-10-25  5:12             ` Jens Axboe
2006-10-25 10:32               ` Martin Peschke
2006-10-25 10:42                 ` Jens Axboe
2006-11-02 14:39                   ` martin
2006-11-02 14:46                     ` Jens Axboe
2006-10-23 18:39 ` Phillip Susi
2006-10-24 16:05   ` Martin Peschke
2006-10-24 20:44     ` Phillip Susi
2006-10-24 22:49       ` Martin Peschke

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=4540D61B.5040802@de.ibm.com \
    --to=mp3@de.ibm.com \
    --cc=akpm@osdl.org \
    --cc=fche@redhat.com \
    --cc=jens.axboe@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=psusi@cfl.rr.com \
    /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;
as well as URLs for NNTP newsgroup(s).