# How can we speed up indexing our documents?

**URL:** <https://discuss.elastic.co/t/how-can-we-speed-up-indexing-our-documents/49156>\
**Category:** Elasticsearch\
**Created:** [May 4, 2016, 11:08am UTC](https://discuss.elastic.co/t/how-can-we-speed-up-indexing-our-documents/49156 "2016-05-04T11:08:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![barry1](https://avatars.discourse-cdn.com/v4/letter/b/7bcc69/32.png) [@barry1](https://discuss.elastic.co/u/barry1)\
**Post date:** [May 4, 2016, 11:08am UTC](https://discuss.elastic.co/t/how-can-we-speed-up-indexing-our-documents/49156/1 "2016-05-04T11:08:46Z")

</div>

We currently index our documents in bulk using the PHP client. On average our index times (including travel over network) are:

1,000 documents in 4 seconds  
10,000 documents in 80 seconds

If we index in parralel the index time are much larger, so that does not seem to be a solution.

Details:

Index: 1  
Shard: 1  
Node: 1  
Memory: 1 GB  
Storage: 16GB  
Documents: 2,000,000

Our server is hosted by TransIP (Netherlands) which has a 100 Gb/s network connection. The elastic cluster is cloud based (Ireland).

How can we speed up indexing our documents?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 4, 2016, 11:17am UTC](https://discuss.elastic.co/t/how-can-we-speed-up-indexing-our-documents/49156/2 "2016-05-04T11:17:43Z")

</div>

> [@barry1](#):
>
> Memory: 1 GB

That's pretty small, I would start there.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 4, 2016, 11:27am UTC](https://discuss.elastic.co/t/how-can-we-speed-up-indexing-our-documents/49156/3 "2016-05-04T11:27:20Z")

</div>

Yes!

And/or reduce the bulk size.

---

<div class="post-metadata">

**Author:** ![Loek](https://avatars.discourse-cdn.com/v4/letter/l/a9adbd/32.png) [@Loek](https://discuss.elastic.co/u/Loek)\
**Post date:** [May 4, 2016, 11:58am UTC](https://discuss.elastic.co/t/how-can-we-speed-up-indexing-our-documents/49156/4 "2016-05-04T11:58:57Z")

</div>

This is a follow up from a telephone conversation this morning. The key concept here is that getting a 1GB cluster in the cloud also means that CPU power is very limited. Right now, Marvel is showing the total CPU usage of the machine in the cloud, but a 1GB cluster will only get a small fraction of that power.

My recommendation is to increase the size of the cluster in steps and record the benchmark results. That will give you an idea of how this solution behaves in different cluster sizes. You will be able to pay by the hour, keeping costs very low during this PoC phase.

---

<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:54pm UTC](https://discuss.elastic.co/t/how-can-we-speed-up-indexing-our-documents/49156/5 "2017-07-05T22:54:02Z")

</div>


