mirror of https://gitee.com/bigwinds/arangodb
reintroduce check for vm.overcommit_memory setting (#8603)
This commit is contained in:
parent
670f9c662e
commit
0265beeb06
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue