# Indexing on SSD vs HDD hardisk

**URL:** <https://discuss.elastic.co/t/indexing-on-ssd-vs-hdd-hardisk/136620>\
**Category:** Elasticsearch\
**Created:** [June 20, 2018, 6:51am UTC](https://discuss.elastic.co/t/indexing-on-ssd-vs-hdd-hardisk/136620 "2018-06-20T06:51:10Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tahir\_Ahmad](https://avatars.discourse-cdn.com/v4/letter/t/439d5e/32.png) [@Tahir\_Ahmad](https://discuss.elastic.co/u/Tahir_Ahmad)\
**Post date:** [June 20, 2018, 6:51am UTC](https://discuss.elastic.co/t/indexing-on-ssd-vs-hdd-hardisk/136620/1 "2018-06-20T06:51:10Z")

</div>

I am indexing a csv file on a Dell system(Ubuntu 16) with HDD hardisk and it takes 3 hours to index it. However I also indexed the same csv file on Macpro with SSD hardisk and it took 15 minutes to index the same. Is this the expected behaviour in performance with respect to SSD vs HDD. or Do the need to tune HDD machine further?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 20, 2018, 6:54am UTC](https://discuss.elastic.co/t/indexing-on-ssd-vs-hdd-hardisk/136620/2 "2018-06-20T06:54:03Z")

</div>

That probably depends on how you are indexing and what type of HDD it is. Are you letting Elasticsearch automatically assign document IDs? Do the machines have the same amount of CPU and RAM? Is there any other load, e.g. queries, while indexing is going on? How much data are you indexing and how many shards are you indexing into? Is the indexing process running on the same machine?

---

<div class="post-metadata">

**Author:** ![Tahir\_Ahmad](https://avatars.discourse-cdn.com/v4/letter/t/439d5e/32.png) [@Tahir\_Ahmad](https://discuss.elastic.co/u/Tahir_Ahmad)\
**Post date:** [June 20, 2018, 6:57am UTC](https://discuss.elastic.co/t/indexing-on-ssd-vs-hdd-hardisk/136620/3 "2018-06-20T06:57:26Z")

</div>

I assign the document IDs when I loop over the csv file(increment the ID by 1 each time over the loop) RAM is 8 GB in both and CPU is 4 core in both. The only difference I see between two machines is Harddisk (SSD vs HDD).

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 20, 2018, 7:07am UTC](https://discuss.elastic.co/t/indexing-on-ssd-vs-hdd-hardisk/136620/4 "2018-06-20T07:07:46Z")

</div>

If you assign the document ID, each insert is really an update as Elasticsearch first have to check if the document already exists. I would expect an SSD to handle this better than a HDD, especially for larger indices/shards. You should probably see less of a difference if you tried a run allowing Elasticsearch to assign the IDs.

---

<div class="post-metadata">

**Author:** ![Tahir\_Ahmad](https://avatars.discourse-cdn.com/v4/letter/t/439d5e/32.png) [@Tahir\_Ahmad](https://discuss.elastic.co/u/Tahir_Ahmad)\
**Post date:** [June 20, 2018, 7:34am UTC](https://discuss.elastic.co/t/indexing-on-ssd-vs-hdd-hardisk/136620/6 "2018-06-20T07:34:29Z")

</div>

I removed the id parameter and I see Elasticsearch assigns ID itself something like \_id": "3zMYHGQBFtlWsnaQ4ymB", However by this I don't see any performance boost.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 20, 2018, 10:03am UTC](https://discuss.elastic.co/t/indexing-on-ssd-vs-hdd-hardisk/136620/7 "2018-06-20T10:03:09Z")

</div>

Have you followed the advice given [here](https://www.elastic.co/guide/en/elasticsearch/reference/6.3/tune-for-indexing-speed.html)? What type of HDD are you using?

---

<div class="post-metadata">

**Author:** ![Tahir\_Ahmad](https://avatars.discourse-cdn.com/v4/letter/t/439d5e/32.png) [@Tahir\_Ahmad](https://discuss.elastic.co/u/Tahir_Ahmad)\
**Post date:** [June 20, 2018, 10:58am UTC](https://discuss.elastic.co/t/indexing-on-ssd-vs-hdd-hardisk/136620/8 "2018-06-20T10:58:53Z")

</div>

I am looking how I can configure these tuning methods on ES.

Harddisk : I am using Dell Latitude 5480 laptop which has 1TB , Hybrid, OPAL SED options hard drive

---

<div class="post-metadata">

**Author:** ![rcowart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rcowart/32/88091_2.png) [@rcowart](https://discuss.elastic.co/u/rcowart)\
**Post date:** [June 20, 2018, 2:20pm UTC](https://discuss.elastic.co/t/indexing-on-ssd-vs-hdd-hardisk/136620/9 "2018-06-20T14:20:02Z")

</div>

The numbers you are seeing make sense. That hybrid hard drive will only make write bursts faster. Sustained writes cause the drive to bypass the SSD portion and you are basically left with a spinning disk... even worse a 5400 RPM disk. ☹

With a 5400 RPM disk, you are looking at a 50-75 write IOPS max. Even the cheapest consumers SSDs will do over 10,000 sustained write IOPS, and the higher quality drives such as in the Macbook Pro can sustain over 20,000 write IOPS for longer periods.

So yes... the storage can have that large of an impact.

---

<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:** [July 18, 2018, 2:20pm UTC](https://discuss.elastic.co/t/indexing-on-ssd-vs-hdd-hardisk/136620/10 "2018-07-18T14:20:04Z")

</div>

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