mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
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>
This commit is contained in:
parent
322fa9bf2d
commit
0865c55e7d
3 changed files with 22 additions and 6 deletions
|
@ -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" ${@}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -25,13 +25,18 @@ module.exports = function (grunt) {
|
|||
return flags;
|
||||
}, []);
|
||||
|
||||
const devEnv = Object.assign(process.env, {
|
||||
NODE_OPTIONS: '--max-old-space-size=1024'
|
||||
});
|
||||
|
||||
return {
|
||||
testServer: {
|
||||
options: {
|
||||
wait: false,
|
||||
ready: /Server running/,
|
||||
quiet: false,
|
||||
failOnError: false
|
||||
failOnError: false,
|
||||
env: devEnv
|
||||
},
|
||||
cmd: binScript,
|
||||
args: [
|
||||
|
@ -46,7 +51,8 @@ module.exports = function (grunt) {
|
|||
wait: false,
|
||||
ready: /Server running/,
|
||||
quiet: false,
|
||||
failOnError: false
|
||||
failOnError: false,
|
||||
env: devEnv
|
||||
},
|
||||
cmd: binScript,
|
||||
args: [
|
||||
|
@ -64,7 +70,8 @@ module.exports = function (grunt) {
|
|||
wait: false,
|
||||
ready: /Server running/,
|
||||
quiet: false,
|
||||
failOnError: false
|
||||
failOnError: false,
|
||||
env: devEnv
|
||||
},
|
||||
cmd: binScript,
|
||||
args: [
|
||||
|
@ -80,7 +87,8 @@ module.exports = function (grunt) {
|
|||
wait: false,
|
||||
ready: /Server running/,
|
||||
quiet: false,
|
||||
failOnError: false
|
||||
failOnError: false,
|
||||
env: devEnv
|
||||
},
|
||||
cmd: binScript,
|
||||
args: [
|
||||
|
@ -148,7 +156,8 @@ module.exports = function (grunt) {
|
|||
options: {
|
||||
wait: false,
|
||||
ready: /Optimization .+ complete/,
|
||||
quiet: true
|
||||
quiet: false,
|
||||
env: devEnv
|
||||
},
|
||||
cmd: './build/kibana/bin/kibana',
|
||||
args: [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue