Splunk Search

What is the effect of maxresultrows for [stats] in limits.conf?

melonman
Motivator

Hi,

My understanding about the configuration parameter "maxresultrows" for [stats] is for limiting the number of stats result up to 50,000 by default.

limits.conf.spec

[stats|sistats]
maxresultrows = <integer>
* Maximum number of result rows to create.
* If not specified, defaults to searchresults::maxresultrows (which is by default 50000).

However, when I run a search, "... | stats count by ipaddress", the result actually exceed far more than 50,000.
Is this maxresultrows for stats table row count or other purpose?

I thought I would see some warning or error message with stats results with more than 50,000.
e.g. stats count by ipaddress, where unique ipaddresses are more than 50,000.

Any comment regarding this parameter is appreciated.
Thank you in advance.

1 Solution

cwl
Contributor

maxresultrows for stats * does not * restrict the number of rows in the result. However, it determines the number of rows present in the memory. If the result size goes over > the maxres and if our memusage > max_mem_usage then splunk save it to disk. 6.0.5 docs mentioned about it.

http://docs.splunk.com/Documentation/Splunk/6.0.5/Admin/Limitsconf
maxresultrows =
* Maximum number of rows allowed in the process memory.
* When the search process exceeds max_mem_usage_mb and maxresultrows, data is spilled out to the disk
* If not specified, defaults to searchresults::maxresultrows (which is by default 50000).

View solution in original post

cwl
Contributor

maxresultrows for stats * does not * restrict the number of rows in the result. However, it determines the number of rows present in the memory. If the result size goes over > the maxres and if our memusage > max_mem_usage then splunk save it to disk. 6.0.5 docs mentioned about it.

http://docs.splunk.com/Documentation/Splunk/6.0.5/Admin/Limitsconf
maxresultrows =
* Maximum number of rows allowed in the process memory.
* When the search process exceeds max_mem_usage_mb and maxresultrows, data is spilled out to the disk
* If not specified, defaults to searchresults::maxresultrows (which is by default 50000).

Splunk_Shinobi
Splunk Employee
Splunk Employee

That is controlling the timing to swap the partial calculation to the disk. it is not limiting the max number of actual rows to be returned.

"When the search process exceeds max_mem_usage_mb and maxresultrows, data is spilled out to the disk"

Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...