Accelerate Splunk Searches with Data Model Acceleration: Enable, Configure, and Use tstats
Learn how to enable Splunk data model acceleration, set up a summary index, query it with tstats, and avoid common pitfalls. A practical guide with configuration snippets, verification steps, and limits for real‑world deployments.
25 Nov 2025, 00:40 UTC

Why Accelerate a Splunk Data Model?
When you enable acceleration for a data model, Splunk builds a summary index that pre‑aggregates the objects defined in the model. Queries that use the tstats command can then read from this compact index instead of scanning every raw event, cutting search time from minutes to seconds for large time ranges.
Step 1 – Enable Acceleration
Acceleration can be turned on either through Splunk Web or by editing datamodels.conf. The key setting is acceleration = true and you must define a summaryIndex and an accelerationWindow (the number of days of data kept in the summary).
Using Splunk Web
- Navigate to Settings → Data Models.
- Choose the model you want to accelerate and click Edit.
- Check the Acceleration box, set the Window (e.g., 7d) and select or create a Summary Index (e.g.,
summary_app_state). - Save and click Rebuild Acceleration to start the initial build.
Using datamodels.conf
[ApplicationState]
acceleration = true
summaryIndex = summary_app_state
accelerationWindow = 7d
Place this stanza in the appropriate datamodels.conf file on the indexer or search head cluster, then reload the configuration or restart Splunk to apply.
Step 2 – Verify Acceleration Is Active
After rebuilding, confirm that the summary index contains data and that acceleration status is “Active”.
- Via Splunk Web: Go to Settings → Data Models → Acceleration and look for the status column.
- Via REST API:
curl -k -u admin:changeme https://localhost:8089/services/data/model/acceleration/ApplicationState– the JSON response will containstatus: "Active". - Check the size of the summary index:
| tstats count FROM datamodel=ApplicationState– the count should be high and the query runs quickly.
Step 3 – Query with tstats
The tstats command reads from the accelerated summary index. A typical query aggregates event counts by hour for a specific node in the model.
| tstats count
FROM datamodel=ApplicationState
WHERE nodename=ApplicationState.Transaction AND status=success
BY _time span=1h
| rename _time as hour
| table hour, count
Replace status=success with any field defined in the model’s objects. Because the data is pre‑aggregated, this query will finish in a fraction of a second even over a week of data.
Limitations and Common Pitfalls
- Field Scope: Only fields that appear in the model’s objects are summarized. If you reference a field that isn’t part of the model,
tstatswill fall back to raw events, negating the speed benefit. - Acceleration Window: Data older than the window is purged from the summary index. Queries that need historical data beyond the window will be slow or return incomplete results. Increase
accelerationWindowif you need longer retention, but be aware of disk usage. - Rebuilding After Model Changes: Adding or removing objects from the model does not automatically update the summary index. You must click Rebuild Acceleration or run the REST endpoint
/services/data/model/acceleration//rebuildto refresh. - Disk Space: A large acceleration window on a busy model can consume gigabytes of storage. Monitor
$SPLUNK_HOME/var/lib/splunk/summaryand set index retention policies accordingly. - Permission Requirements: Only users with the
adminrole or those granted thedata_model_accelerationcapability can enable or rebuild acceleration.
Practical Check: Confirm tstats Uses the Summary Index
To ensure that tstats is pulling from the accelerated index, compare the searchMode in the search job details.
- Run a
tstatsquery and open the Job Inspector. - Look for the
searchMode: "accelerated"entry. If it sayssearchMode: "raw", the query is not using the acceleration.
Alternatively, run:
| tstats count FROM datamodel=ApplicationState
| where _time > relative_time(now(), "-1h@h")
| eventstats sum(count) as total
| where total > 0
If the job completes in ~0.1s versus ~10s for a raw search, acceleration is working.
When to Use Acceleration vs. Raw Searches
- Use acceleration when you need fast, repeated aggregations over large time spans and the queried fields are defined in the model.
- For ad‑hoc searches that reference many raw fields or need very recent data beyond the window, raw searches (or the
searchcommand) are still appropriate.
Conclusion
Data model acceleration is a powerful tool for speeding up Splunk searches that fit the model’s structure. Enable it carefully, monitor disk usage, rebuild after model changes, and always verify that tstats is hitting the accelerated summary index. With these practices, you’ll see search times drop dramatically while maintaining accurate, up‑to‑date analytics.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.