Skip to content
Open
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 config/startup.options
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ LS_GC_LOG_FILE=/var/log/logstash/gc.log
LS_OPEN_FILES=16384

# Nice level
LS_NICE=19
LS_NICE=0

# Change these to have the init script named and described differently
# This is useful when running multiple instances of Logstash on the same
Expand Down
8 changes: 7 additions & 1 deletion docs/reference/performance-troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,13 @@ You may be tempted to jump ahead and change settings like `pipeline.workers` (`-
* Set the minimum (Xms) and maximum (Xmx) heap allocation size to the same value to prevent the heap from resizing at runtime, which is a very costly process.
* You can make more accurate measurements of the JVM heap by using either the `jmap` command line utility distributed with Java or by using VisualVM. For more info, see [Profiling the heap](/reference/tuning-logstash.md#profiling-the-heap).

4. **Tune Logstash pipeline settings:**
4. **Adjust process `nice` value to `0`:**

* Logstash historically defaulted to a `nice` value of `19` in order to not interfere with normal operation of services and applications it runs alongside. This causes Logstash to run at **the lowest priority** possible.
* For **RPM/DEB** installations, Logstash's systemd unit file is located at `/usr/lib/systemd/system/logstash.service`.
* For **Tarball** installations, Logstash instead uses `$LS_SETTINGS_DIR/config/startup.options` if it was installed with `bin/system-install`. Running directly from the directory (i.e. `./bin/logstash`) is unaffected.

5. **Tune Logstash pipeline settings:**

* Continue on to [Tuning and profiling logstash pipeline performance](/reference/tuning-logstash.md) to learn about tuning individual pipelines.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ EnvironmentFile=-/etc/sysconfig/logstash
ExecStart=/usr/share/logstash/bin/logstash "--path.settings" "/etc/logstash"
Restart=always
WorkingDirectory=/
Nice=19
Nice=0
LimitNOFILE=16384

# When stopping, how long to wait before giving up and sending SIGKILL?
Expand Down
2 changes: 1 addition & 1 deletion pkg/service_templates/sysv/etc/default/logstash
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ LS_USER="logstash"
LS_GROUP="logstash"
LS_GC_LOG_FILE="/var/log/logstash/gc.log"
LS_OPEN_FILES="16384"
LS_NICE="19"
LS_NICE="0"
SERVICE_NAME="logstash"
SERVICE_DESCRIPTION="logstash"
2 changes: 1 addition & 1 deletion pkg/service_templates/sysv/etc/init.d/logstash
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ user="logstash"
group="logstash"
chroot="/"
chdir="/"
nice="19"
nice="0"
limit_open_files="16384"


Expand Down
Loading