1
0
Fork 0

reintroduce check for vm.overcommit_memory setting (#8603)

This commit is contained in:
Jan 2019-03-28 12:49:57 +01:00 committed by GitHub
parent 670f9c662e
commit 0265beeb06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 0 deletions

View File

@ -1,6 +1,10 @@
devel
-----
* show startup warning in case kernel setting `vm.overcommit_memory` is set
to a value of 2 and the jemalloc memory allocator is in use. This combination
does not play well together.
* added AQL functions CRC32 and FNV64 for hashing data
* renamed attribute key `openssl-version` in server/client tool version

View File

@ -110,3 +110,10 @@ output was renamed to `openssl-version-compile-time`.
This change affects the output produced when starting one of the ArangoDB
executables (e.g. arangod, arangosh) with the `--version` command. It also
changes the attribute name in the detailed response of the `/_api/version` REST API.
### Overcommit settings
On Linux, ArangoDB will now show a startup warning in case the kernel setting
`vm.overcommit_memory` is set to a value of 2 and the jemalloc memory allocator
is in use. This combination does not play well together, and may lead to the
kernel denying arangod's memory allocation requests in more cases than necessary.

View File

@ -81,6 +81,14 @@ void EnvironmentFeature::prepare() {
uint64_t v = basics::StringUtils::uint64(value);
if (v == 2) {
#ifdef ARANGODB_HAVE_JEMALLOC
LOG_TOPIC("fadc5", WARN, arangodb::Logger::MEMORY)
<< "/proc/sys/vm/overcommit_memory is set to a value of 2. this setting has been found to be problematic";
LOG_TOPIC("d08d6", WARN, Logger::MEMORY)
<< "execute 'sudo bash -c \"echo 0 > "
<< "/proc/sys/vm/overcommit_memory\"'";
#endif
// from https://www.kernel.org/doc/Documentation/sysctl/vm.txt:
//
// When this flag is 0, the kernel attempts to estimate the amount