Skip to content

Conversation

@eubnara
Copy link
Contributor

@eubnara eubnara commented Nov 27, 2025

Description of PR

There are some points to improve the performance of YARN Registry DNS Server.

  • Do not print unnecessary logs (It just needs change log4j.properties)
    • log4j.logger.org.apache.hadoop.registry.server.dns=WARN
  • Change some loglevels at points which can affect performance degradation.
  • Use "newFixedThreadPool" instead of "newCachedThreadPool" to prevent OOM
  • Use Blocking on TCP handler. Using non-blocking and sleeping some time("Thread.sleep(500)") is meaningless.

In our environment, QPS of original yarn dns server is about 5000 (UDP), 100 (TCP).
Now, QPS of our improved yarn dns server is about 47000 (UDP), 500 (TCP).

I will make a pull request at https://github.com/apache/hadoop soon.

How was this patch tested?

Our team members have tested this manually in our cluster.

For code changes:

  • Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
  • Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

if (response.length > output.capacity()) {
LOG.warn("{}: Response of UDP query {} exceeds limit {}",
remoteAddress, query.getQuestion(), output.limit());
query.getHeader().setFlag(Flags.TC);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the response of UDP query exceeds limit, TC(truncated) flag should be set in order for the client to request again with TCP query.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 42s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 💚 mvninstall 21m 36s trunk passed
+1 💚 compile 9m 2s trunk passed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04
+1 💚 compile 8m 45s trunk passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
+1 💚 checkstyle 0m 21s trunk passed
+1 💚 mvnsite 0m 25s trunk passed
+1 💚 javadoc 0m 26s trunk passed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 27s trunk passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
-1 ❌ spotbugs 0m 35s /branch-spotbugs-hadoop-common-project_hadoop-registry-warnings.html hadoop-common-project/hadoop-registry in trunk has 19 extant spotbugs warnings.
+1 💚 shadedclient 14m 19s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 13s the patch passed
+1 💚 compile 8m 20s the patch passed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04
+1 💚 javac 8m 20s the patch passed
+1 💚 compile 8m 44s the patch passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
+1 💚 javac 8m 44s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 0m 20s /results-checkstyle-hadoop-common-project_hadoop-registry.txt hadoop-common-project/hadoop-registry: The patch generated 1 new + 2 unchanged - 0 fixed = 3 total (was 2)
+1 💚 mvnsite 0m 23s the patch passed
-1 ❌ javadoc 0m 23s /results-javadoc-javadoc-hadoop-common-project_hadoop-registry-jdkUbuntu-21.0.7+6-Ubuntu-0ubuntu120.04.txt hadoop-common-project_hadoop-registry-jdkUbuntu-21.0.7+6-Ubuntu-0ubuntu120.04 with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04 generated 1 new + 136 unchanged - 0 fixed = 137 total (was 136)
-1 ❌ javadoc 0m 22s /results-javadoc-javadoc-hadoop-common-project_hadoop-registry-jdkUbuntu-17.0.15+6-Ubuntu-0ubuntu120.04.txt hadoop-common-project_hadoop-registry-jdkUbuntu-17.0.15+6-Ubuntu-0ubuntu120.04 with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04 generated 1 new + 129 unchanged - 0 fixed = 130 total (was 129)
-1 ❌ spotbugs 0m 40s /new-spotbugs-hadoop-common-project_hadoop-registry.html hadoop-common-project/hadoop-registry generated 1 new + 19 unchanged - 0 fixed = 20 total (was 19)
+1 💚 shadedclient 14m 32s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 0m 54s hadoop-registry in the patch passed.
-1 ❌ asflicense 0m 34s /results-asflicense.txt The patch generated 1 ASF License warnings.
95m 0s
Reason Tests
SpotBugs module:hadoop-common-project/hadoop-registry
Exceptional return value of java.util.concurrent.ExecutorService.submit(Callable) ignored in org.apache.hadoop.registry.server.dns.RegistryDNS.serveNIOUDP(DatagramChannel) At RegistryDNS.java:ignored in org.apache.hadoop.registry.server.dns.RegistryDNS.serveNIOUDP(DatagramChannel) At RegistryDNS.java:[line 1027]
Subsystem Report/Notes
Docker ClientAPI=1.52 ServerAPI=1.52 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8106/1/artifact/out/Dockerfile
GITHUB PR #8106
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux b6793247efa2 5.15.0-156-generic #166-Ubuntu SMP Sat Aug 9 00:02:46 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 5d6fa72
Default Java Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
Multi-JDK versions /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8106/1/testReport/
Max. process+thread count 643 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-registry U: hadoop-common-project/hadoop-registry
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8106/1/console
versions git=2.25.1 maven=3.9.11 spotbugs=4.9.7
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants