Splunk Search Concurrency Limit (max_concurrent_searches) latency spikes under concurrent request patterns
0 reputation · 05 Dec 2024, 17:17 UTC
0 reputation · 05 Dec 2024, 17:17 UTC
Splunk’s Search Concurrency Limit (max_concurrent_searches) is intended to cap the number of simultaneous search jobs, yet latency spikes are observed only when multiple searches run concurrently.
The exact point at which the internal search pipeline begins queuing or throttling jobs, causing increased response time, is not documented, leaving the trigger mechanism unclear.
What internal scheduling logic determines when a search is placed in a queue versus being delayed, and how does this affect latency under concurrent request patterns?
Is the latency solely due to throttling by the concurrency limit or also due to indexer queue depth metrics while multiple searches run simultaneously?
37275 reputation · 06 Dec 2024, 00:43 UTC
The concurrency cap can add wait time, but it is not the only cause of the spike. When running searches reach max_concurrent_searches, the search head scheduler queues or defers additional jobs, so response time includes dispatch wait before the search pipeline starts. The remaining latency usually comes from search-head and indexer resource contention—CPU, memory, and disk I/O—not from the indexer indexing queue itself.
| Item | Status | Detail |
|---|---|---|
max_concurrent_searches in limits.conf [search] |
Confirmed | Caps simultaneous search jobs on a search head; default is often derived from CPU count and varies by release and hardware. |
| Scheduler queue versus defer trigger | Not publicly documented | Exact admission point varies by Splunk version; Job Inspector shows wait time but not the internal algorithm. |
Role quotas srchJobsQuota, srchDiskQuota |
Confirmed | Can throttle or reject jobs independently of the global concurrency limit. |
Indexer metrics.log group=queue |
Confirmed, but unrelated to search throttling | Measures data ingestion queues, not search execution. |
Likely explanation: latency under concurrent requests is a combination of scheduler queue wait and resource contention. A step increase in response time at the configured cap points to throttling; a gradual rise as concurrency climbs points to search-head or indexer saturation.
splunk btool limits.conf list --debug | grep -A2 "max_concurrent_searches"
Also review [scheduler] settings in the same output.
scheduler.log and search.log for queued, deferred, or dispatch messages.metrics.log group=queue.max_concurrent_searches without baseline monitoring can move latency from queuing to search-head or indexer saturation.One missing diagnostic detail that changes the recommendation: are the affected searches scheduled or ad-hoc, and which role runs them? Role quotas may be the actual throttle, not the global concurrency limit.
Use comments to ask for clarification. Post a solution as an answer.
37,275 reputation · 06 Dec 2024, 03:21 UTC
The global max_concurrent_searches is not the only gate. Each role's srchJobsQuota (and rtSrchJobsQuota for real-time) is enforced first; a user hits their personal cap and queues even when the search head has free slots. This often explains why latency spikes appear below the documented global ceiling.
When the active count reaches the applicable limit, new searches enter a FIFO queue scoped to the requesting user/role/app. The Job Inspector shows dispatchState=queued with a timestamp; the gap between that timestamp and dispatchState=running is pure scheduler wait. Execution time after running reflects indexer CPU/disk contention, not queue depth.
srchJobsQuota for the affected roles via btool authorize.conf list./services/search/jobs?dispatchState=queued to see current queue depth per context.queued→running latency vs running→done latency to separate scheduler wait from indexer saturation.