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!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...