diff options
author | Tyler Smalley <tyler.smalley@elastic.co> | 2016-04-08 10:09:20 -0700 |
---|---|---|
committer | Tyler Smalley <tyler.smalley@elastic.co> | 2016-04-26 13:44:42 -0700 |
commit | 0865c55e7d0258f139329470481477ab83bfa3d3 (patch) | |
tree | f53b0e112ed86fe4d57540eba205e387ec633b6a /bin | |
parent | 322fa9bf2da17772cf47745ddb1ec0b9ab11664b (diff) |
Limits memory usage
V8 will not trigger a full mark-sweep & mark-compact until there is memory pressure for the max-old-space-size, which is 1.6GB on a 64bit system. This means that Kibana will, at times, consume over 1.6GB of RSS memory.
Bypassing this can be done by starting with `--dev` or explicitally setting `max-old-space-size`. For example: `NODE_OPTIONS="--max-old-space-size=1024" ./bin/kibana`
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/kibana | 5 | ||||
-rw-r--r-- | bin/kibana.bat | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/bin/kibana b/bin/kibana index 1606ad281..bacfc0c8a 100755 --- a/bin/kibana +++ b/bin/kibana @@ -21,4 +21,9 @@ if [ ! -x "$NODE" ]; then exit 1 fi +# sets V8 defaults while still allowing them to be overridden +if echo "${@}" | grep -qv "\-\-dev"; then + NODE_OPTIONS="--max-old-space-size=256 $NODE_OPTIONS" +fi + exec "${NODE}" $NODE_OPTIONS "${DIR}/src/cli" ${@} diff --git a/bin/kibana.bat b/bin/kibana.bat index 2c39d080b..145a7e08a 100644 --- a/bin/kibana.bat +++ b/bin/kibana.bat @@ -21,8 +21,10 @@ If Not Exist "%NODE%" ( ) ) +echo.%* | findstr /V /C:"--dev" && set NODE_OPTIONS=--max-old-space-size=256 %NODE_OPTIONS% + TITLE Kibana Server -"%NODE%" %NODE_OPTIONS% "%DIR%\src\cli" %* +call "%NODE%" %NODE_OPTIONS% "%DIR%\src\cli" %* :finally |