Hi
I want to work on next bug https://issues.apache.org/jira/browse/IGNITE-2092?jql=project%20%3D%20IGNITE%20AND%20labels%20in%20%28newbie%29%20and%20status%20%3D%20OPEN Can somebody assign me on it? I've investigated this issue and looks like this bug is on JVM side and OpenJDK community fixed it only in Java 9 [1]. It's can be fixed fast inside GridLocalMetrics#getAvailableProcessors but looks like other modules don't use it and detect available CPUs by calling Runtime.getRuntime().*availableProcessors* [2]. Should I also replace this #getRuntime calls with using GridLocalMetrics? [1] https://bugs.openjdk.java.net/browse/JDK-8140793 [2] https://github.com/apache/ignite/search?p=4&q=availableProcessors&type=Code&utf8=%E2%9C%93 -- Best regards, Eduard Y. |
I've added you to contributors list in Jira, feel free to assign the issue
to yourself. Sergi 2016-08-26 13:42 GMT+03:00 Eduard Yuzlikeev <[hidden email]>: > Hi > I want to work on next bug > https://issues.apache.org/jira/browse/IGNITE-2092?jql= > project%20%3D%20IGNITE%20AND%20labels%20in%20%28newbie%29% > 20and%20status%20%3D%20OPEN > Can somebody assign me on it? > > I've investigated this issue and looks like this bug is on JVM side and > OpenJDK community fixed it only in Java 9 [1]. > It's can be fixed fast inside GridLocalMetrics#getAvailableProcessors but > looks like other modules don't use it and detect available CPUs by calling > Runtime.getRuntime().*availableProcessors* [2]. > Should I also replace this #getRuntime calls with using GridLocalMetrics? > > [1] https://bugs.openjdk.java.net/browse/JDK-8140793 > [2] > https://github.com/apache/ignite/search?p=4&q= > availableProcessors&type=Code&utf8=%E2%9C%93 > -- > Best regards, Eduard Y. > |
In reply to this post by Eduard Yuzlikeev
Eduard,
I think if it is known bug it should be properly fixed by creating some utility class (for example, IgniteRuntimeUtils) that could be used all over Ignite code base. I do not think it is a good idea to "this #getRuntime calls with using GridLocalMetrics". On Fri, Aug 26, 2016 at 5:42 PM, Eduard Yuzlikeev < [hidden email]> wrote: > Hi > I want to work on next bug > https://issues.apache.org/jira/browse/IGNITE-2092?jql= > project%20%3D%20IGNITE%20AND%20labels%20in%20%28newbie%29% > 20and%20status%20%3D%20OPEN > Can somebody assign me on it? > > I've investigated this issue and looks like this bug is on JVM side and > OpenJDK community fixed it only in Java 9 [1]. > It's can be fixed fast inside GridLocalMetrics#getAvailableProcessors but > looks like other modules don't use it and detect available CPUs by calling > Runtime.getRuntime().*availableProcessors* [2]. > Should I also replace this #getRuntime calls with using GridLocalMetrics? > > [1] https://bugs.openjdk.java.net/browse/JDK-8140793 > [2] > https://github.com/apache/ignite/search?p=4&q= > availableProcessors&type=Code&utf8=%E2%9C%93 > -- > Best regards, Eduard Y. > -- Alexey Kuznetsov GridGain Systems www.gridgain.com |
Alexey,
Actually I think about next steps to solve problem: 1. Add method IgniteUtils#isCgroupsLimited which will detect JVM inside container (dockerl, lxc, etc); 2. Call IgniteUtils#isCgroupsLimited inside GridLocalMetrics#getAvailableProcessors and detect available CPUs by calling "nproc" in cases when container was detected; 3. Replace all calls of Runtime#getAvailableProcessors with GridLocalMetrics#getAvailableProcessors; What is the reason to create a new utility class like IgniteRuntimeUtils? On Aug 26, 2016 2:21 PM, "Alexey Kuznetsov" <[hidden email]> wrote: > Eduard, > > I think if it is known bug it should be properly fixed by creating some > utility class (for example, IgniteRuntimeUtils) that could be used all over > Ignite code base. > I do not think it is a good idea to "this #getRuntime calls with using > GridLocalMetrics". > > > On Fri, Aug 26, 2016 at 5:42 PM, Eduard Yuzlikeev < > [hidden email]> wrote: > > > Hi > > I want to work on next bug > > https://issues.apache.org/jira/browse/IGNITE-2092?jql= > > project%20%3D%20IGNITE%20AND%20labels%20in%20%28newbie%29% > > 20and%20status%20%3D%20OPEN > > Can somebody assign me on it? > > > > I've investigated this issue and looks like this bug is on JVM side and > > OpenJDK community fixed it only in Java 9 [1]. > > It's can be fixed fast inside GridLocalMetrics#getAvailableProcessors > but > > looks like other modules don't use it and detect available CPUs by > calling > > Runtime.getRuntime().*availableProcessors* [2]. > > Should I also replace this #getRuntime calls with using GridLocalMetrics? > > > > [1] https://bugs.openjdk.java.net/browse/JDK-8140793 > > [2] > > https://github.com/apache/ignite/search?p=4&q= > > availableProcessors&type=Code&utf8=%E2%9C%93 > > -- > > Best regards, Eduard Y. > > > > > > -- > Alexey Kuznetsov > GridGain Systems > www.gridgain.com > |
Free forum by Nabble | Edit this page |