hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jian He (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-7351) High CPU usage issue in RegistryDNS
Date Tue, 17 Oct 2017 23:21:00 GMT

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

Jian He commented on YARN-7351:
-------------------------------

The reason is because the implementation, it creates a new thread for every dns query.
{code}      
while (true) {
        final SocketChannel socketChannel = serverSocketChannel.accept();
        if (socketChannel != null) {
          executor.submit(new Callable<Boolean>() {
            @Override
            public Boolean call() throws Exception {
              nioTCPClient(socketChannel);
              return true;
            }
          });
        }
      }
{code}
After the patch, the DNS process cpu usages drops from 100% to 0.1% on my Mac

> High CPU usage issue in RegistryDNS
> -----------------------------------
>
>                 Key: YARN-7351
>                 URL: https://issues.apache.org/jira/browse/YARN-7351
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Jian He
>            Assignee: Jian He
>         Attachments: YARN-7351.yarn-native-services.01.patch
>
>
> Thanks [~aw] for finding this issue.
> The current RegistryDNS implementation is always running on high CPU and pretty much
eats one core. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org


Mime
View raw message