Paul Brannan created KUDU-3763:
----------------------------------

             Summary: Kudu master spending a lot of time in 
ExtractTabletsToProcess
                 Key: KUDU-3763
                 URL: https://issues.apache.org/jira/browse/KUDU-3763
             Project: Kudu
          Issue Type: Bug
    Affects Versions: 1.18.1
            Reporter: Paul Brannan


I've noticed for a while that kudu-master is using cpu when idle.  When I run 
{{{}perf top{}}}, I see:

{{34.01%  kudu-master          [.] 
kudu::master::CatalogManager::ExtractTabletsToProcess
26.07%  kudu-master          [.] kudu::subtle::RefCountedThreadSafeBase::AddRef
25.04%  libpthread-2.31.so   [.] pthread_mutex_trylock
3.30%  libpthread-2.31.so   [.] pthread_mutex_unlock}}

This is somewhat expected – background tasks do run periodically, after all – 
but it is surprising that so much time is spent in this background task than 
the others.

Per {{{}/varz{}}}, {{--catalog_manager_bg_task_wait_ms}} is set at the default 
of 1000.  Increasing this default would make the problem less noticeable, but > 
100ms every second to run a background task is not ideal.

There is a TODO in {{CatalogManager::ExtractTabletsToProcess}} suggesting ways 
to avoid the lock.

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to