nyshubin commented on a change in pull request #8503:
URL: https://github.com/apache/ignite/pull/8503#discussion_r549232650
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/suggestions/OsConfigurationSuggestions.java
##########
@@ -74,28 +74,28 @@
(dwcParamFlag && decParamFlag ? " and " : ""),
(decParamFlag ? "vm." + DIRTY_EXPIRE_CENTISECS : ""),
(dwcParamFlag && decParamFlag ? "s" : ""),
- expected));
+ exp));
- if ((value = readVmParam(SWAPPINESS)) != null) {
+ if ((val = readVmParam(SWAPPINESS)) != null) {
try {
- double maxSwappiness = 10.0;
+ int maxSwappiness = 10;
- if (Float.parseFloat(value) > maxSwappiness)
- suggestions.add(String.format("Reduce pages swapping
ratio (set vm.%s=%f or less)", SWAPPINESS,
+ if (Integer.parseInt(val) > maxSwappiness)
+ suggestions.add(String.format("Reduce pages swapping
ratio (set vm.%s=%d 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"))
+ if ((val = readVmParam(ZONE_RECLAIM_MODE)) != null &&
!val.equals(exp = "0"))
suggestions.add(String.format("Disable NUMA memory reclaim
(set vm.%s=%s)", ZONE_RECLAIM_MODE,
- expected));
+ exp));
- if ((value = readVmParam(EXTRA_FREE_KBYTES)) != null &&
!value.equals(expected = "1240000"))
+ if ((val = readVmParam(EXTRA_FREE_KBYTES)) != null &&
!val.equals(exp = "1240000"))
Review comment:
replaced this check with int comparison, but did not remove it
completely, because gridgain doc suggests:
To work around the effects caused by page memory reclamation on Linux, add
extra bytes between wmark_min and wmark_low with /proc/sys/vm/extra_free_kbytes
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]