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!

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...