All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Kampe <mark.kampe@dreamhost.com>
To: Colin McCabe <cmccabe@alumni.cmu.edu>
Cc: ceph-devel@vger.kernel.org
Subject: Re: towards a user-mode diagnostic log mechanism
Date: Fri, 06 Jan 2012 17:46:32 -0800	[thread overview]
Message-ID: <4F07A3F8.8000407@dreamhost.com> (raw)
In-Reply-To: <CA+qbEUNvLL0pui+XOr5W2m6dmBCxg8d4ZobrAnXV=wTQ=7YCFw@mail.gmail.com>

On 01/05/12 20:09, Colin McCabe wrote:

> Getting the system time is a surprisingly expensive operation, and
> this poses a problem for logging system designers.  You can use the
> rdtsc CPU instruction, but unfortunately on some architectures CPU
> frequency scaling makes it very inaccurate.  Even when it is accurate,
> it's not synchronized between multiple CPUs.
>
> Another option is to without time for most messages and just have a
> periodic timestamp that gets injected every so often-- perhaps every
> second, for example.

I agree it needs to be cheap ... but my experience with
debugging problems in this sort of system suggests that
we need the finest grained timestamps we can get
(on every single message).

Even though the clocks on different nodes are not that
closely synchronized, computing the relative offsets
from initial transactions isn't hard ... and then it
becomes possible to construct a total ordering of
events with accurate timings.

> Pantheios and log4cpp are two potential candidates.  I don't know that
> much about either, unfortunately.

Good suggestions.  I am also looking at varnish (suggested by Wido
den Hollander) which does logging in a shared memory segment from
which external processes can save it (or not).  What was (for me)
a new idea here is the clean decoupling of in-memory event capture
from on-disk persistence and log rotation.  After I thought about
it for a few minutes, I concluded it had many nice consequences.

> Honestly, I feel like logging is something that you will end up
> customizing pretty extensively to suit the needs of your application.
> But perhaps it's worth checking out what these libraries provide--
> especially in terms of efficiency.

I agree that the data captured is going to be something we hone
based on experience.  I am (for now) most concerned with the
mechanism ... because I don't want to start making big investments
in instrumentation until we have a good mechanism, around which
we can fix the APIs that instrumentation will use.

I'll try to review the suggested candidates and describe the
mechanisms and advantages of each in another two weeks.

Thank you very much for the feedback.

  reply	other threads:[~2012-01-07  1:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-20  2:42 towards a user-mode diagnostic log mechanism Mark Kampe
2011-12-23 10:04 ` Wido den Hollander
2012-01-06  4:09 ` Colin McCabe
2012-01-07  1:46   ` Mark Kampe [this message]
2012-01-10  2:20     ` Colin McCabe
2012-01-10 23:25   ` Tommi Virtanen
     [not found]     ` <4F0CDA9A.4070500@cs.ucsc.edu>
2012-01-11  1:04       ` Tommi Virtanen
2012-01-11  1:06         ` Noah Watkins

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=4F07A3F8.8000407@dreamhost.com \
    --to=mark.kampe@dreamhost.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=cmccabe@alumni.cmu.edu \
    /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.