Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Kibana is an open source ([Apache Licensed](https://github.com/elastic/kibana/bl

- Elasticsearch master
- Kibana binary package
- 512 MB of available RAM
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

512 here? I assume this is because some amount of memory will of course be used that isn't old space

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is correct, it's just a recommendation. We could probably run on lower, but we do have things which are not old space.


## Installation

Expand All @@ -14,7 +15,6 @@ Kibana is an open source ([Apache Licensed](https://github.com/elastic/kibana/bl
* Run `bin/kibana` on unix, or `bin\kibana.bat` on Windows.
* Visit [http://localhost:5601](http://localhost:5601)


## Upgrade from previous version

* Move any custom configurations in your old kibana.yml to your new one
Expand Down
5 changes: 5 additions & 0 deletions bin/kibana
Original file line number Diff line number Diff line change
Expand Up @@ -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" ${@}
4 changes: 3 additions & 1 deletion bin/kibana.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 8 additions & 0 deletions docs/production.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* <<enabling-ssl, Enabling SSL>>
* <<controlling-access, Controlling Access>>
* <<load-balancing, Load Balancing Across Multiple Elasticsearch Nodes>>
* <<memory-management, Memory management>>

How you deploy Kibana largely depends on your use case. If you are the only user,
you can run Kibana on your local machine and configure it to point to whatever
Expand Down Expand Up @@ -132,3 +133,10 @@ cluster.name: "my_cluster"
# The Elasticsearch instance to use for all your queries.
elasticsearch_url: "http://localhost:9200"
--------

[float]
[[memory-management]]

=== Memory management

Kibana is built on Node.js which doesn't tune its heap size based on the amount of memory available. To combat this, we set defaults based on the requirements of Kibana needs, while allowing overhead for additional plugins. These defaults can be overridden at runtime, for example `NODE_OPTIONS="--max-old-space-size=512" bin/kibana`.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rashidkpc, thoughts this verbiage?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

1 change: 1 addition & 0 deletions docs/setup.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ All you need is:

* Elasticsearch {esversion}
* A modern web browser - http://www.elastic.co/subscriptions/matrix#matrix_browsers[Supported Browsers].
* 512 MB of available RAM
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a note about --max-old-space-size and mention that it is set to 256 by default, but that users can expect Kibana to use a bit more? Doesn't need to be added here, but somewhere in the docs

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, will do.

* Information about your Elasticsearch installation:
** URL of the Elasticsearch instance you want to connect to.
** Which Elasticsearch indices you want to search.
Expand Down
19 changes: 14 additions & 5 deletions tasks/config/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,18 @@ module.exports = function (grunt) {
return flags;
}, []);

const devEnv = Object.assign(process.env, {
NODE_OPTIONS: '--max-old-space-size=1024'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you mean to limit to 1024 here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I am over writing the --max-old-space-size which is set in bin/kibana for these tasks.

});

return {
testServer: {
options: {
wait: false,
ready: /Server running/,
quiet: false,
failOnError: false
failOnError: false,
env: devEnv
},
cmd: binScript,
args: [
Expand All @@ -46,7 +51,8 @@ module.exports = function (grunt) {
wait: false,
ready: /Server running/,
quiet: false,
failOnError: false
failOnError: false,
env: devEnv
},
cmd: binScript,
args: [
Expand All @@ -64,7 +70,8 @@ module.exports = function (grunt) {
wait: false,
ready: /Server running/,
quiet: false,
failOnError: false
failOnError: false,
env: devEnv
},
cmd: binScript,
args: [
Expand All @@ -80,7 +87,8 @@ module.exports = function (grunt) {
wait: false,
ready: /Server running/,
quiet: false,
failOnError: false
failOnError: false,
env: devEnv
},
cmd: binScript,
args: [
Expand Down Expand Up @@ -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: [
Expand Down