# How much time by the query is spent in Disk I/O?

**URL:** <https://discuss.elastic.co/t/how-much-time-by-the-query-is-spent-in-disk-i-o/324915>\
**Category:** Elasticsearch\
**Created:** [February 7, 2023, 2:12pm UTC](https://discuss.elastic.co/t/how-much-time-by-the-query-is-spent-in-disk-i-o/324915 "2023-02-07T14:12:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sheharyar\_Khalid](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sheharyar_khalid/32/112227_2.png) [@Sheharyar\_Khalid](https://discuss.elastic.co/u/Sheharyar_Khalid)\
**Post date:** [February 7, 2023, 2:12pm UTC](https://discuss.elastic.co/t/how-much-time-by-the-query-is-spent-in-disk-i-o/324915/1 "2023-02-07T14:12:00Z")

</div>

Hello,

I am trying to optimize my hardware for elasticsearch deployment. I am getting inconsistent results on the time by changing the JVM settings. I wanted to know if there is any other measure apart from the **"took**" in the result query to capture the **time the query spends on the hardware.**

**Also, is there a way to capture the time spent by the query in Disk I/O.  
Finally, is there a method of getting detailed time breakdown for the query?**

---

<div class="post-metadata">

**Author:** ![BenB196](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benb196/32/83401_2.png) [@BenB196](https://discuss.elastic.co/u/BenB196)\
**Post date:** [February 7, 2023, 2:17pm UTC](https://discuss.elastic.co/t/how-much-time-by-the-query-is-spent-in-disk-i-o/324915/2 "2023-02-07T14:17:50Z")

</div>

You can use the [Profile API](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-profile.html) to get a detailed breakdown of query performance. I'm not sure if there is a way to see Disk I/O directly related to a query as this becomes a more complex topic when you take into things like filesystem level caching and other things. The only way to really do this would be to use something like [rally](https://github.com/elastic/rally) to run at scale benchmarks and make changes to hardware to see what impacts they have.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 7, 2023, 2:17pm UTC](https://discuss.elastic.co/t/how-much-time-by-the-query-is-spent-in-disk-i-o/324915/3 "2023-03-07T14:17:58Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
