All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sage Weil <sweil@redhat.com>
To: Guang Yang <yguang11@outlook.com>
Cc: Gregory Farnum <greg@inktank.com>,
	Ceph-devel <ceph-devel@vger.kernel.org>,
	david.z1003@yahoo.com
Subject: Re: OSD suicide after being down/in for one day as it needs to search large amount of objects
Date: Wed, 20 Aug 2014 08:19:46 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.00.1408200816210.28244@cobra.newdream.net> (raw)
In-Reply-To: <BLU436-SMTP149AEBB380BB925D15D777ADFD20@phx.gbl>

On Wed, 20 Aug 2014, Guang Yang wrote:
> Thanks Greg.
> On Aug 20, 2014, at 6:09 AM, Gregory Farnum <greg@inktank.com> wrote:
> 
> > On Mon, Aug 18, 2014 at 11:30 PM, Guang Yang <yguang11@outlook.com> wrote:
> >> Hi ceph-devel,
> >> David (cc?ed) reported a bug (http://tracker.ceph.com/issues/9128) which we came across in our test cluster during our failure testing, basically the way to reproduce it was to leave one OSD daemon down and in for a day, at the same time, keep giving write traffic. When the OSD daemon was started again, it hit suicide timeout and kill itself.
> >> 
> >> After some analysis (details in the bug), David found that the op thread was busy searching for missing objects and once the volume to search increase, the thread is expected to work that long time, please refer to the bug for detailed logs.
> > 
> > Can you talk a little more about what's going on here? At a quick
> > naive glance, I'm not seeing why leaving an OSD down and in should
> > require work based on the amount of write traffic. Perhaps if the rest
> > of the cluster was changing mappings??
> We increased the down to out time interval from 5 minutes to 2 days to 
> avoid migrating data back and forth which could increase latency, so 
> that we target to mark OSD out manually. To achieve such, we are testing 
> against some boundary cases to let the OSD down and in for like 1 day, 
> however, when we try to bring it up again, it always failed due to hit 
> the suicide timeout.

Looking at the log snippet I see the PG had log range

	5481'28667,5646'34066

Which is ~5500 log events.  The default max is 10k.  search_for_missing is 
basically going to iterate over this list and check if the object is 
present locally.

If that's slow enough to trigger a suicide (which it seems to be), teh 
fix is simple: as Greg says we just need to make it probe the internel 
heartbeat code to indicate progress.  In most contexts this is done by 
passing a ThreadPool::TPHandle &handle into each method and then 
calling handle.reset_tp_timeout() on each iteration.  The same needs to be 
done for search_for_missing...

sage


  reply	other threads:[~2014-08-20 15:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-19  6:30 OSD suicide after being down/in for one day as it needs to search large amount of objects Guang Yang
2014-08-19 22:09 ` Gregory Farnum
2014-08-20 11:42   ` Guang Yang
2014-08-20 15:19     ` Sage Weil [this message]
2014-08-21  1:42       ` Guang Yang

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=alpine.DEB.2.00.1408200816210.28244@cobra.newdream.net \
    --to=sweil@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=david.z1003@yahoo.com \
    --cc=greg@inktank.com \
    --cc=yguang11@outlook.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 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.