Splunk Search

What is the preference order when using the REST API setpriority?

szelenka
New Member

This document details how to use the REST API to perform actions on a given sid:
http://docs.splunk.com/Documentation/Splunk/6.3.3/RESTREF/RESTsearch#search.2Fjobs.2F.7Bsearch_id.7D...

One of the commands is setpriority which is documented as:

setpriority: Sets the priority of the search process. Arguments: priority=<0-10>

But it's unclear what the different values would do to a search. By default it seems most ad-hoc searches are given a priority value of 5.

If I have a query that I need to run with a higher priority (i.e. given preferential treatment over other searches running at priority level 5), should I set the priority level to 4 or 6? Is a priority level of 0 the most preferred, or is it 10? Or am I mis-interpreting what priority means on a search?

Tags (1)
0 Karma

martin_mueller
SplunkTrust
SplunkTrust

As per http://docs.splunk.com/Documentation/Splunk/6.3.3/RESTREF/RESTsearch#search.2Fjobs a higher number means a higher priority:

priority    An integer between 0-10 that indicates the search priority.
The priority is mapped to the OS process priority. The higher the number the higher the priority. The priority can be changed using action parameter for POST search/jobs/{search_id}/control. For example, for the action parameter, specify priority=5.
Note: In *nix systems, non-privileged users can only reduce the priority of a process. 
0 Karma
Get Updates on the Splunk Community!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...