New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GEODE-7341: Provide a way to avoid memory lock if over committed #4210
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these tests need to reset the system properties back to their original values?
It looks like this now allows us to no longer get an exception but rather continue to process without locking memory. What would be the side effects of allowing this to happen? Will it just error out at a later operation?
geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java
Outdated
Show resolved
Hide resolved
geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java
Show resolved
Hide resolved
...-core/src/test/java/org/apache/geode/distributed/internal/InternalDistributedSystemTest.java
Show resolved
Hide resolved
geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java
Show resolved
Hide resolved
Tests use RestoreSystemProperties rule to reset the system properties. This should not cause side effects if not lock memory using the new system property introduced, compared to the unknown side effect if using the original ALLOW_MEMORY_OVERCOMMIT system property setting. |
geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java
Outdated
Show resolved
Hide resolved
geode-core/src/main/java/org/apache/geode/distributed/internal/InternalDistributedSystem.java
Outdated
Show resolved
Hide resolved
"System memory appears to be over committed by {} bytes. Avoid memory lock.", | ||
size - avail); | ||
"System memory appears to be over committed by {} bytes. So memory will not be locked because -D{} is set to true.", | ||
size - avail, AVOID_MEMORY_LOCK_WHEN_OVERCOMMIT); | ||
} else if (allowMemoryLockWhenOvercommitted) { | ||
logger.warn( | ||
"System memory appears to be over committed by {} bytes. You may experience instability, performance issues, or terminated processes due to the Linux OOM killer.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add to this middle message that because of ALLOW_MEMORY_OVERCOMMIT being true it will be locked even though it appears to be over committed. In my previous review I suggested a change. I think this is helpful because the reader of the message may not be the same user that set this sys prop to true and may not realize that they can just set it to false to prevent this warning.
No description provided.