gradle / gradle-native

The home of Gradle's support for natively compiled languages
https://blog.gradle.org/introducing-the-new-cpp-plugins
Apache License 2.0
91 stars 8 forks source link

Gradle deamon get IO Block #1049

Closed FieldWangHD closed 4 years ago

FieldWangHD commented 4 years ago

When I used gradle profile(https://github.com/gradle/gradle-profiler) for performance testing, I found that if gradle deamon is enabled, the build time may increase abnormally(5 times that of head-up) during continuous build. Use top(Ubuntu) to check out CPU/IO usage and found that in the abnormal build, the CPU usage is extremely low (3-5%), and most of the time is in wait IO.

Expected Behavior

When gradle deamon is started for continuous construction, the time taken by the gradle profile(https://github.com/gradle/gradle-profiler) measurement should be stable.

Current Behavior

When gradle deamon is turned on, time-consuming exceptions occur during continuous build.

Context

In the same configuration, when gradle deamon is closed, gradle continuous construction takes time. Once gradle deamon is turned on, the gradle build will have a time-consuming exception.

Your Environment

Turn off gradle deamon build data: benchmark.zip

Turn on gradle deamon build data: benchmark.zip

Infrastructure Operating system Linux 4.15.0-54-generic CPU cores 4 cores Max Gradle workers 4 workers Java runtime Private Build OpenJDK Runtime Environment 1.8.0_222-8u222-b10-1ubuntu1~18.04.1-b10 Java VM Private Build OpenJDK 64-Bit Server VM 25.222-b10 (mixed mode) Max JVM memory heap size 9544 MB