[ 
https://issues.apache.org/jira/browse/IMPALA-15451?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Venugopal Reddy K updated IMPALA-15451:
---------------------------------------
    Description: 
When hierarchical event processing is enabled, catalogd consumes noticeable CPU 
on a completely idle cluster (reported at ~14% of a core). Each DbEventExecutor 
and TableEventExecutor thread was scheduled with scheduleAtFixedRate() every 10 
ms, regardless of whether it had any work. With the default configuration of 5 
db executors, each having 5 table executors, 30 threads wake up 100
times per second each, i.e. ~3000 wakeups per second. Although each pass finds 
no events and does little work, cost of scheduling and context switches adds up.
{noformat}
# top -p 115429
top - 14:26:17 up 642 days, 22:11,  2 users,  load average: 1.36, 1.13, 1.16
Tasks:   1 total,   0 running,   1 sleeping,   0 stopped,   0 zombie
%Cpu(s):  1.9 us,  1.1 sy,  0.0 ni, 96.8 id,  0.0 wa,  0.0 hi,  0.2 si,  0.0 st
MiB Mem : 257561.6 total, 135617.4 free,  53952.7 used,  67991.5 buff/cache
MiB Swap: 126976.0 total, 122672.7 free,   4303.3 used. 196004.1 avail Mem 
 
    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND  
                                                                                
                                                                               
 115429 impala    20   0 3585756   1.0g  28436 S  14.0   0.4 969:24.08 catalogd 
{noformat}
 
{noformat}
# top -H -p 115429    
 PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND     
                                                                                
                                                                            
 117588 impala    20   0 3585756   1.0g  28436 S   1.0   0.4  28:47.97 
DbEventExecutor                                                                 
                                                                                
        
 117583 impala    20   0 3585756   1.0g  28436 S   0.7   0.4  30:07.16 
DbEventExecutor                                                                 
                                                                                
        
 117592 impala    20   0 3585756   1.0g  28436 S   0.7   0.4  30:33.49 
DbEventExecutor                                                                 
                                                                                
        
 117593 impala    20   0 3585756   1.0g  28436 S   0.7   0.4  30:47.84 
DbEventExecutor                                                                 
                                                                                
        
 117600 impala    20   0 3585756   1.0g  28436 S   0.7   0.4  35:39.66 
DbEventExecutor                                                                 
                                                                                
        
 117601 impala    20   0 3585756   1.0g  28436 S   0.7   0.4  29:33.93 
DbEventExecutor                                                                 
                                                                                
        
 117610 impala    20   0 3585756   1.0g  28436 S   0.7   0.4  30:59.53 
DbEventExecutor                                                                 
                                                                                
        
 117582 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  30:30.13 
DbEventExecutor                                                                 
                                                                                
        
 117585 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  28:28.52 
DbEventExecutor                                                                 
                                                                                
        
 117586 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  28:32.20 
DbEventExecutor                                                                 
                                                                                
        
 117587 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  30:51.24 
DbEventExecutor                                                                 
                                                                                
        
 117589 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  29:30.48 
DbEventExecutor                                                                 
                                                                                
        
 117590 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  37:34.03 
DbEventExecutor                                                                 
                                                                                
        
 117591 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  30:23.53 
DbEventExecutor                                                                 
                                                                                
        
 117594 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  33:00.33 
DbEventExecutor                                                                 
                                                                                
        
 117595 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  29:45.05 
DbEventExecutor                                                                 
                                                                                
        
 117596 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  30:47.51 
DbEventExecutor                                                                 
                                                                                
        
 117597 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  31:13.82 
DbEventExecutor                                                                 
                                                                                
        
 117598 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  29:06.22 
DbEventExecutor                                                                 
                                                                                
        
 117599 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  30:32.21 
DbEventExecutor                                                                 
                                                                                
        
 117602 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  31:15.07 
DbEventExecutor                                                                 
                                                                                
        
 117603 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  29:57.25 
DbEventExecutor                                                                 
                                                                                
        
 117604 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  30:43.94 
DbEventExecutor                                                                 
                                                                                
        
 117605 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  30:11.14 
DbEventExecutor                                                                 
                                                                                
        
 117606 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  30:17.53 
DbEventExecutor                                                                 
                                                                                
        
 117607 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  29:28.57 
DbEventExecutor                                                                 
                                                                                
        
 117608 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  32:13.84 
DbEventExecutor                                                                 
                                                                                
        
 117609 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  29:25.44 
DbEventExecutor                                                                 
                                                                                
        
 117611 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  30:08.89 
DbEventExecutor                                                                 
                                                                                
        
 117612 impala    20   0 3585756   1.0g  28436 S   0.3   0.4   2:18.46 
MetastoreEvents    {noformat}

  was:
When hierarchical event processing is enabled, catalogd consumes noticeable CPU 
on a completely idle cluster (reported at ~14% of a
core). Each DbEventExecutor and TableEventExecutor thread was scheduled with 
scheduleAtFixedRate() every 10 ms, regardless of whether it had any work. With 
the default configuration of 5 db executors, each having 5 table executors, 30 
threads wake up 100
times per second each, i.e. ~3000 wakeups per second. Although each pass finds 
no events and does little work, cost of scheduling and context switches adds up.
{noformat}
# top -p 115429
top - 14:26:17 up 642 days, 22:11,  2 users,  load average: 1.36, 1.13, 1.16
Tasks:   1 total,   0 running,   1 sleeping,   0 stopped,   0 zombie
%Cpu(s):  1.9 us,  1.1 sy,  0.0 ni, 96.8 id,  0.0 wa,  0.0 hi,  0.2 si,  0.0 st
MiB Mem : 257561.6 total, 135617.4 free,  53952.7 used,  67991.5 buff/cache
MiB Swap: 126976.0 total, 122672.7 free,   4303.3 used. 196004.1 avail Mem 
 
    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND  
                                                                                
                                                                               
 115429 impala    20   0 3585756   1.0g  28436 S  14.0   0.4 969:24.08 catalogd 
{noformat}
 
{noformat}
# top -H -p 115429    
 PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND     
                                                                                
                                                                            
 117588 impala    20   0 3585756   1.0g  28436 S   1.0   0.4  28:47.97 
DbEventExecutor                                                                 
                                                                                
        
 117583 impala    20   0 3585756   1.0g  28436 S   0.7   0.4  30:07.16 
DbEventExecutor                                                                 
                                                                                
        
 117592 impala    20   0 3585756   1.0g  28436 S   0.7   0.4  30:33.49 
DbEventExecutor                                                                 
                                                                                
        
 117593 impala    20   0 3585756   1.0g  28436 S   0.7   0.4  30:47.84 
DbEventExecutor                                                                 
                                                                                
        
 117600 impala    20   0 3585756   1.0g  28436 S   0.7   0.4  35:39.66 
DbEventExecutor                                                                 
                                                                                
        
 117601 impala    20   0 3585756   1.0g  28436 S   0.7   0.4  29:33.93 
DbEventExecutor                                                                 
                                                                                
        
 117610 impala    20   0 3585756   1.0g  28436 S   0.7   0.4  30:59.53 
DbEventExecutor                                                                 
                                                                                
        
 117582 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  30:30.13 
DbEventExecutor                                                                 
                                                                                
        
 117585 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  28:28.52 
DbEventExecutor                                                                 
                                                                                
        
 117586 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  28:32.20 
DbEventExecutor                                                                 
                                                                                
        
 117587 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  30:51.24 
DbEventExecutor                                                                 
                                                                                
        
 117589 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  29:30.48 
DbEventExecutor                                                                 
                                                                                
        
 117590 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  37:34.03 
DbEventExecutor                                                                 
                                                                                
        
 117591 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  30:23.53 
DbEventExecutor                                                                 
                                                                                
        
 117594 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  33:00.33 
DbEventExecutor                                                                 
                                                                                
        
 117595 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  29:45.05 
DbEventExecutor                                                                 
                                                                                
        
 117596 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  30:47.51 
DbEventExecutor                                                                 
                                                                                
        
 117597 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  31:13.82 
DbEventExecutor                                                                 
                                                                                
        
 117598 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  29:06.22 
DbEventExecutor                                                                 
                                                                                
        
 117599 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  30:32.21 
DbEventExecutor                                                                 
                                                                                
        
 117602 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  31:15.07 
DbEventExecutor                                                                 
                                                                                
        
 117603 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  29:57.25 
DbEventExecutor                                                                 
                                                                                
        
 117604 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  30:43.94 
DbEventExecutor                                                                 
                                                                                
        
 117605 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  30:11.14 
DbEventExecutor                                                                 
                                                                                
        
 117606 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  30:17.53 
DbEventExecutor                                                                 
                                                                                
        
 117607 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  29:28.57 
DbEventExecutor                                                                 
                                                                                
        
 117608 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  32:13.84 
DbEventExecutor                                                                 
                                                                                
        
 117609 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  29:25.44 
DbEventExecutor                                                                 
                                                                                
        
 117611 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  30:08.89 
DbEventExecutor                                                                 
                                                                                
        
 117612 impala    20   0 3585756   1.0g  28436 S   0.3   0.4   2:18.46 
MetastoreEvents    {noformat}


> Catalogd consumes noticeable CPU on an idle cluster when hierarchical event 
> processing is enabled.
> --------------------------------------------------------------------------------------------------
>
>                 Key: IMPALA-15451
>                 URL: https://issues.apache.org/jira/browse/IMPALA-15451
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Catalog
>            Reporter: Venugopal Reddy K
>            Assignee: Venugopal Reddy K
>            Priority: Major
>
> When hierarchical event processing is enabled, catalogd consumes noticeable 
> CPU on a completely idle cluster (reported at ~14% of a core). Each 
> DbEventExecutor and TableEventExecutor thread was scheduled with 
> scheduleAtFixedRate() every 10 ms, regardless of whether it had any work. 
> With the default configuration of 5 db executors, each having 5 table 
> executors, 30 threads wake up 100
> times per second each, i.e. ~3000 wakeups per second. Although each pass 
> finds no events and does little work, cost of scheduling and context switches 
> adds up.
> {noformat}
> # top -p 115429
> top - 14:26:17 up 642 days, 22:11,  2 users,  load average: 1.36, 1.13, 1.16
> Tasks:   1 total,   0 running,   1 sleeping,   0 stopped,   0 zombie
> %Cpu(s):  1.9 us,  1.1 sy,  0.0 ni, 96.8 id,  0.0 wa,  0.0 hi,  0.2 si,  0.0 
> st
> MiB Mem : 257561.6 total, 135617.4 free,  53952.7 used,  67991.5 buff/cache
> MiB Swap: 126976.0 total, 122672.7 free,   4303.3 used. 196004.1 avail Mem 
>  
>     PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ 
> COMMAND                                                                       
>                                                                               
>             
>  115429 impala    20   0 3585756   1.0g  28436 S  14.0   0.4 969:24.08 
> catalogd 
> {noformat}
>  
> {noformat}
> # top -H -p 115429    
>  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND   
>                                                                               
>                                                                               
>   
>  117588 impala    20   0 3585756   1.0g  28436 S   1.0   0.4  28:47.97 
> DbEventExecutor                                                               
>                                                                               
>             
>  117583 impala    20   0 3585756   1.0g  28436 S   0.7   0.4  30:07.16 
> DbEventExecutor                                                               
>                                                                               
>             
>  117592 impala    20   0 3585756   1.0g  28436 S   0.7   0.4  30:33.49 
> DbEventExecutor                                                               
>                                                                               
>             
>  117593 impala    20   0 3585756   1.0g  28436 S   0.7   0.4  30:47.84 
> DbEventExecutor                                                               
>                                                                               
>             
>  117600 impala    20   0 3585756   1.0g  28436 S   0.7   0.4  35:39.66 
> DbEventExecutor                                                               
>                                                                               
>             
>  117601 impala    20   0 3585756   1.0g  28436 S   0.7   0.4  29:33.93 
> DbEventExecutor                                                               
>                                                                               
>             
>  117610 impala    20   0 3585756   1.0g  28436 S   0.7   0.4  30:59.53 
> DbEventExecutor                                                               
>                                                                               
>             
>  117582 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  30:30.13 
> DbEventExecutor                                                               
>                                                                               
>             
>  117585 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  28:28.52 
> DbEventExecutor                                                               
>                                                                               
>             
>  117586 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  28:32.20 
> DbEventExecutor                                                               
>                                                                               
>             
>  117587 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  30:51.24 
> DbEventExecutor                                                               
>                                                                               
>             
>  117589 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  29:30.48 
> DbEventExecutor                                                               
>                                                                               
>             
>  117590 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  37:34.03 
> DbEventExecutor                                                               
>                                                                               
>             
>  117591 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  30:23.53 
> DbEventExecutor                                                               
>                                                                               
>             
>  117594 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  33:00.33 
> DbEventExecutor                                                               
>                                                                               
>             
>  117595 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  29:45.05 
> DbEventExecutor                                                               
>                                                                               
>             
>  117596 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  30:47.51 
> DbEventExecutor                                                               
>                                                                               
>             
>  117597 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  31:13.82 
> DbEventExecutor                                                               
>                                                                               
>             
>  117598 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  29:06.22 
> DbEventExecutor                                                               
>                                                                               
>             
>  117599 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  30:32.21 
> DbEventExecutor                                                               
>                                                                               
>             
>  117602 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  31:15.07 
> DbEventExecutor                                                               
>                                                                               
>             
>  117603 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  29:57.25 
> DbEventExecutor                                                               
>                                                                               
>             
>  117604 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  30:43.94 
> DbEventExecutor                                                               
>                                                                               
>             
>  117605 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  30:11.14 
> DbEventExecutor                                                               
>                                                                               
>             
>  117606 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  30:17.53 
> DbEventExecutor                                                               
>                                                                               
>             
>  117607 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  29:28.57 
> DbEventExecutor                                                               
>                                                                               
>             
>  117608 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  32:13.84 
> DbEventExecutor                                                               
>                                                                               
>             
>  117609 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  29:25.44 
> DbEventExecutor                                                               
>                                                                               
>             
>  117611 impala    20   0 3585756   1.0g  28436 S   0.3   0.4  30:08.89 
> DbEventExecutor                                                               
>                                                                               
>             
>  117612 impala    20   0 3585756   1.0g  28436 S   0.3   0.4   2:18.46 
> MetastoreEvents    {noformat}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to