Project

General

Profile

Actions

Bug #48678

open

client: spins on tick interval

Added by Patrick Donnelly over 3 years ago. Updated about 1 year ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
Code Hygiene
Target version:
% Done:

0%

Source:
Q/A
Tags:
Backport:
reef,quincy
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Client
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

2020-12-18T02:28:02.759+0000 7f964dffb700 20 client.4623 upkeep thread waiting interval 1s
2020-12-18T02:28:02.759+0000 7f967501e200  2 client.4623 cache still has 0+25 items, waiting (for caps to release?)
2020-12-18T02:28:03.759+0000 7f964dffb700 20 client.4623 upkeep thread waiting interval 0.000026643s
2020-12-18T02:28:03.759+0000 7f964dffb700 20 client.4623 upkeep thread waiting interval 0.000026643s
2020-12-18T02:28:03.759+0000 7f964dffb700 20 client.4623 upkeep thread waiting interval 0.000026643s
2020-12-18T02:28:03.759+0000 7f964dffb700 20 client.4623 upkeep thread waiting interval 0.000026643s
2020-12-18T02:28:03.759+0000 7f964dffb700 20 client.4623 upkeep thread waiting interval 0.000026643s
2020-12-18T02:28:03.759+0000 7f964dffb700 20 client.4623 upkeep thread waiting interval 0.000026643s
2020-12-18T02:28:03.759+0000 7f964dffb700 20 client.4623 upkeep thread waiting interval 0.000026643s
2020-12-18T02:28:03.759+0000 7f964dffb700 20 client.4623 upkeep thread waiting interval 0.000026643s
2020-12-18T02:28:03.759+0000 7f964dffb700 20 client.4623 upkeep thread waiting interval 0.000026643s

From: /ceph/teuthology-archive/pdonnell-2020-12-17_23:13:08-fs-wip-pdonnell-testing-20201217.205941-distro-basic-smithi/5715878/remote/smithi091/log/ceph-client.0.36435.log.gz

Actions #1

Updated by Patrick Donnelly over 3 years ago

  • Target version changed from v16.0.0 to v17.0.0
  • Backport set to pacific,octopus,nautilus
Actions #2

Updated by Patrick Donnelly almost 2 years ago

  • Target version deleted (v17.0.0)
Actions #3

Updated by Venky Shankar about 1 year ago

  • Assignee changed from Patrick Donnelly to Rishabh Dave
  • Target version set to v19.0.0
  • Backport changed from pacific,octopus,nautilus to reef,quincy

This spin happens in:

void Client::start_tick_thread()
{
  upkeeper = std::thread([this]() {
    using time = ceph::coarse_mono_time;
    using sec = std::chrono::seconds;

    auto last_tick = time::min();

    std::unique_lock cl(client_lock);
    while (!tick_thread_stopped) {
      auto now = clock::now();
      auto since = now - last_tick;

      auto t_interval = clock::duration(cct->_conf.get_val<sec>("client_tick_interval"));
      auto d_interval = clock::duration(cct->_conf.get_val<sec>("client_debug_inject_tick_delay"));

      auto interval = std::max(t_interval, d_interval);
      if (likely(since >= interval*.90)) {
        tick();
        last_tick = clock::now();
      } else {
        interval -= since;
      }

      ldout(cct, 20) << "upkeep thread waiting interval " << interval << dendl;
      if (!tick_thread_stopped)
        upkeep_cond.wait_for(cl, interval);
    }
  });
}

By default, client_tick_interval default: 1s and client_debug_inject_tick_delay: 0s. So, the upkeep thread waits for 1s initially, and then it could spin by waiting less. Commit eb47e990c33843b9baa366e2b2a187439210e680 introduced change to fix spurious sleeps. It looks like the client could possibly spin on tick interval? Patrick?

Actions

Also available in: Atom PDF