# Striping--just to be clear I am not missing something

**URL:** <https://discuss.elastic.co/t/striping-just-to-be-clear-i-am-not-missing-something/56514>\
**Category:** Elasticsearch\
**Created:** [July 27, 2016, 12:18pm UTC](https://discuss.elastic.co/t/striping-just-to-be-clear-i-am-not-missing-something/56514 "2016-07-27T12:18:55Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![hokiegeek2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hokiegeek2/32/11076_2.png) [@hokiegeek2](https://discuss.elastic.co/u/hokiegeek2)\
**Post date:** [July 27, 2016, 12:18pm UTC](https://discuss.elastic.co/t/striping-just-to-be-clear-i-am-not-missing-something/56514/1 "2016-07-27T12:18:55Z")

</div>

Hi Everyone,

In this great writeup regarding indexing performance @ [https://www.elastic.co/guide/en/elasticsearch/guide/current/indexing-performance.html](https://www.elastic.co/guide/en/elasticsearch/guide/current/indexing-performance.html) there are the following sentences regarding multiple data directories:

Use RAID 0. Striped RAID will increase disk I/O, at the obvious expense of  
potential failure if a drive dies. Don’t use mirrored or parity RAIDS since  
replicas provide that functionality.

Alternatively, use multiple drives and allow Elasticsearch to stripe data across  
them via multiple path.data directories.

The following is probably a silly question, newbie question, but I need to ask it nonetheless. 🙂 if I configure an ES node with multiple data directories, does it write shards in their entirety to separate data directories, or does it spread segments of shards across multiple data directories a la RAID 0? I am guessing it's the former, but the use of the verb "...stripe data across them..." makes me thinks its possibly the latter.

Please confirm, thanks!

--John

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [July 27, 2016, 12:50pm UTC](https://discuss.elastic.co/t/striping-just-to-be-clear-i-am-not-missing-something/56514/2 "2016-07-27T12:50:58Z")

</div>

Hi John,

we don't spread segments across paths. See [docs](https://www.elastic.co/guide/en/elasticsearch/reference/master/important-settings.html#path-settings):

> The path.data settings can be set to multiple paths, in which case all paths will be used to store data (although the files belonging to a single shard will all be stored on the same data path).

Daniel

---

<div class="post-metadata">

**Author:** ![hokiegeek2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hokiegeek2/32/11076_2.png) [@hokiegeek2](https://discuss.elastic.co/u/hokiegeek2)\
**Post date:** [July 27, 2016, 1:01pm UTC](https://discuss.elastic.co/t/striping-just-to-be-clear-i-am-not-missing-something/56514/3 "2016-07-27T13:01:55Z")

</div>

Ah, perfect, thanks Daniel! Linking this and my other question I posed to this forum yesterday ([http://bit.ly/2au1TSS](http://bit.ly/2au1TSS)), if there are multiple shards for the same index on an ES node, does ES parallelize a query on that index and, if so, does ES put the shards in different data directories to maximize I/O?

Thanks

--John

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [July 27, 2016, 1:03pm UTC](https://discuss.elastic.co/t/striping-just-to-be-clear-i-am-not-missing-something/56514/4 "2016-07-27T13:03:19Z")

</div>

> [@hokiegeek2](#):
>
> does ES parallelize a query on that index

Yes.

> [@hokiegeek2](#):
>
> does ES put the shards in different data directories to maximize I/O?

I don't believe it has something for that. IIRC it tries to balanced used disk space but I'll check.

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [July 27, 2016, 1:25pm UTC](https://discuss.elastic.co/t/striping-just-to-be-clear-i-am-not-missing-something/56514/5 "2016-07-27T13:25:30Z")

</div>

> [@nik9000](#):
>
> but I'll check.

It [tries to balance disk space usage](https://github.com/elastic/elasticsearch/blob/master/core/src/main/java/org/elasticsearch/index/shard/ShardPath.java#L164-L209) though it makes some funny assumptions.

---

<div class="post-metadata">

**Author:** ![hokiegeek2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hokiegeek2/32/11076_2.png) [@hokiegeek2](https://discuss.elastic.co/u/hokiegeek2)\
**Post date:** [July 27, 2016, 1:55pm UTC](https://discuss.elastic.co/t/striping-just-to-be-clear-i-am-not-missing-something/56514/6 "2016-07-27T13:55:27Z")

</div>

Cool, thanks! I really appreciate your time.

--John

---

<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 5, 2017, 10:32pm UTC](https://discuss.elastic.co/t/striping-just-to-be-clear-i-am-not-missing-something/56514/7 "2017-07-05T22:32:31Z")

</div>


