[ 
https://issues.apache.org/jira/browse/OOZIE-3160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16326780#comment-16326780
 ] 

jj commented on OOZIE-3160:
---------------------------

[~andras.piros]

I set property "oozie.service.CallableQueueService.threads=50" , and start 
oozie whitout any task, only started oozie。

i use jmx monitor:
!222222222222222222.png!


linux top commond:
 !11111111111111.png! 


in CallableQueueService class,i find this code:
{code:java}
int threads = ConfigurationService.getInt(conf, CONF_THREADS);

executor = new ThreadPoolExecutor(threads, threads, 10, TimeUnit.SECONDS, 
(BlockingQueue) queue,
                new NamedThreadFactory("CallableQueue")) {
            protected void beforeExecute(Thread t, Runnable r) {
                super.beforeExecute(t,r);
                XLog.Info.get().clear();
            }
            protected <T> RunnableFuture<T> newTaskFor(Callable<T> callable) {
                return (RunnableFuture<T>)callable;
            }
        };

{code}

the ThreadPoolExecutor‘s corePoolSize equals maximumPoolSize.


> oozie high cpu usage problem
> ----------------------------
>
>                 Key: OOZIE-3160
>                 URL: https://issues.apache.org/jira/browse/OOZIE-3160
>             Project: Oozie
>          Issue Type: Bug
>          Components: core
>         Environment: all platforms
>            Reporter: jj
>            Assignee: Andras Piros
>            Priority: Major
>         Attachments: 11111111111111.png, 222222222222222222.png
>
>
> oozie process always  consume  high cpu. in my mechine,around 10%. 
> I check the source code,find take() method in PriorityDelayQueue class。
> code:
> {code:java}
> public QueueElement<E> take() throws InterruptedException {
>     QueueElement<E> e = poll();
>     while (e == null) {
>         Thread.sleep(10);
>         e = poll();
>     }
>     return e;
> }
> {code}
> i think it's the reason of this problem. it's keep while, not await.  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to