ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dpav...@apache.org
Subject ignite git commit: IGNITE-8141 Acknowledge SWAPPINESS reduction using a range (<= 10). - Fixes #3727.
Date Thu, 12 Apr 2018 17:19:44 GMT
Repository: ignite
Updated Branches:
  refs/heads/master b93595cbe -> 47ca3e0da


IGNITE-8141 Acknowledge SWAPPINESS reduction using a range (<= 10). - Fixes #3727.

Signed-off-by: dpavlov <dpavlov@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/47ca3e0d
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/47ca3e0d
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/47ca3e0d

Branch: refs/heads/master
Commit: 47ca3e0da7fd7468d7ea96ff512c3d1f3ed5bf81
Parents: b93595c
Author: Reed Sandberg <reed.sandberg@drawbridge.com>
Authored: Thu Apr 12 20:18:10 2018 +0300
Committer: dpavlov <dpavlov@apache.org>
Committed: Thu Apr 12 20:18:10 2018 +0300

----------------------------------------------------------------------
 .../suggestions/OsConfigurationSuggestions.java       | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/47ca3e0d/modules/core/src/main/java/org/apache/ignite/internal/suggestions/OsConfigurationSuggestions.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/suggestions/OsConfigurationSuggestions.java
b/modules/core/src/main/java/org/apache/ignite/internal/suggestions/OsConfigurationSuggestions.java
index e5b4c12..695b423 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/suggestions/OsConfigurationSuggestions.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/suggestions/OsConfigurationSuggestions.java
@@ -76,8 +76,18 @@ public class OsConfigurationSuggestions {
                     (dwcParamFlag && decParamFlag ? "s" : ""),
                     expected));
 
-            if ((value = readVmParam(SWAPPINESS)) != null && !value.equals(expected
= "10"))
-                suggestions.add(String.format("Reduce pages swapping ratio (set vm.%s=%s)",
SWAPPINESS, expected));
+            if ((value = readVmParam(SWAPPINESS)) != null) {
+                try {
+                    double maxSwappiness = 10.0;
+
+                    if (Float.parseFloat(value) > maxSwappiness)
+                        suggestions.add(String.format("Reduce pages swapping ratio (set vm.%s=%f
or less)", SWAPPINESS,
+                                                      maxSwappiness));
+                }
+                catch (NumberFormatException ignored) {
+                    // OS param not parsable as a number
+                }
+            }
 
             if ((value = readVmParam(ZONE_RECLAIM_MODE)) != null && !value.equals(expected
= "0"))
                 suggestions.add(String.format("Disable NUMA memory reclaim (set vm.%s=%s)",
ZONE_RECLAIM_MODE,


Mime
View raw message