Splunk Search

Why are the default values of max_searches_per_cpu and base_max_searches in limits.conf lowered in 5.x?

mchang_splunk
Splunk Employee
Splunk Employee

After upgrading to 5.0, I find the default value of max_searches_per_cpu and base_max_searches in /etc/system/default/limits.conf have been changed.

In $SPLUNK_HOME/etc/system/default/limits.conf:

4.x:

# the maximum number of concurrent searches per CPU
max_searches_per_cpu = 4

# the base number of concurrent searches
base_max_searches = 4

5.x:

# the maximum number of concurrent searches per CPU
max_searches_per_cpu = 1

# the base number of concurrent searches
base_max_searches = 6

This means that on a server with 4 CPU cores, Splunk 5.x will limit the number of concurrent searches to 10 (6 + 4 * 1) where the limit would have been 20 (4 + 4 * 4) with Splunk 4.x.

Why was this change made?

1 Solution

mchang_splunk
Splunk Employee
Splunk Employee

These values were changed because in 5.x and beyond, search jobs started from the UI can now be queued when the search concurrency limit is reached instead of being refused. The back-end (splunkd) had this capability since 4.2, but the UI can only handle queued jobs since 5.0.

The bottom line is that in 5.x, the maximum number of concurrent searches has been lowered but it should be compensated by the full implementation of search job queueing. Overall, the goal is to improve the search experience on systems with high search concurrency: your search might get queued up for a bit (ideally, no more than a few seconds) but it should run faster when launched as there will be fewer searches contending for the same resources (most notably, disk I/O).

Further reading on this topic:

View solution in original post

mchang_splunk
Splunk Employee
Splunk Employee

These values were changed because in 5.x and beyond, search jobs started from the UI can now be queued when the search concurrency limit is reached instead of being refused. The back-end (splunkd) had this capability since 4.2, but the UI can only handle queued jobs since 5.0.

The bottom line is that in 5.x, the maximum number of concurrent searches has been lowered but it should be compensated by the full implementation of search job queueing. Overall, the goal is to improve the search experience on systems with high search concurrency: your search might get queued up for a bit (ideally, no more than a few seconds) but it should run faster when launched as there will be fewer searches contending for the same resources (most notably, disk I/O).

Further reading on this topic:

Get Updates on the Splunk Community!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...