# How snapshot works and its impact

**URL:** <https://discuss.elastic.co/t/how-snapshot-works-and-its-impact/80157>\
**Category:** Elasticsearch\
**Created:** [March 27, 2017, 3:08pm UTC](https://discuss.elastic.co/t/how-snapshot-works-and-its-impact/80157 "2017-03-27T15:08:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sterchelen](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@sterchelen](https://discuss.elastic.co/u/sterchelen)\
**Post date:** [March 27, 2017, 3:08pm UTC](https://discuss.elastic.co/t/how-snapshot-works-and-its-impact/80157/1 "2017-03-27T15:08:01Z")

</div>

Hi all,

I have multiple question

1. How the snapshot module works ?
2. How it knows where exactly to snapshot when using incremental snapshot ?
3. Is it a simple search query ?
4. The impact in term of cpu ?

Thank you all.

Nicolas.

---

<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:** [March 27, 2017, 3:24pm UTC](https://discuss.elastic.co/t/how-snapshot-works-and-its-impact/80157/2 "2017-03-27T15:24:48Z")

</div>

A bit old but this should explain : [https://www.elastic.co/blog/found-elasticsearch-snapshot-and-restore](https://www.elastic.co/blog/found-elasticsearch-snapshot-and-restore)

---

<div class="post-metadata">

**Author:** ![sterchelen](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@sterchelen](https://discuss.elastic.co/u/sterchelen)\
**Post date:** [March 27, 2017, 3:56pm UTC](https://discuss.elastic.co/t/how-snapshot-works-and-its-impact/80157/3 "2017-03-27T15:56:02Z")

</div>

Thanks David,

The link answers to the first two questions. For the third and the fourth ? Do you have an idea ?

Thanks.

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [March 27, 2017, 4:26pm UTC](https://discuss.elastic.co/t/how-snapshot-works-and-its-impact/80157/4 "2017-03-27T16:26:19Z")

</div>

Lucene is the underlying search engine and it only creates new files - it never updates them.  
The activity of indexing flushes new mini-indexes out to disk as "segment files". Lucene background tasks merge small segments into larger ones as a form of compaction and then delete the newly redundant segments. You can see this process here [1].  
Snapshot is only concerned with copying over the segment files that are created since the last time you ran a snapshot. No queries required - it's just syncing sets of files.

[1] [http://blog.mikemccandless.com/2011/02/visualizing-lucenes-segment-merges.html](http://blog.mikemccandless.com/2011/02/visualizing-lucenes-segment-merges.html)

---

<div class="post-metadata">

**Author:** ![sterchelen](https://avatars.discourse-cdn.com/v4/letter/s/b5a626/32.png) [@sterchelen](https://discuss.elastic.co/u/sterchelen)\
**Post date:** [March 27, 2017, 4:47pm UTC](https://discuss.elastic.co/t/how-snapshot-works-and-its-impact/80157/5 "2017-03-27T16:47:49Z")

</div>

Thanks Mark,

Last question, does the snapshot could impact the search thread pool ?  
All this questions, because I have created a cron that call the snapshot api each hour. And each hour I see the thread pool of the search requests reaching its limit to 1000...

For information I'm on 1.7 version !

Nicolas.

---

<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:** [April 24, 2017, 4:47pm UTC](https://discuss.elastic.co/t/how-snapshot-works-and-its-impact/80157/6 "2017-04-24T16:47:55Z")

</div>

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