# Restarts take forever, even with shard allocation disabled, when node hasn't been restarted recently

**URL:** <https://discuss.elastic.co/t/restarts-take-forever-even-with-shard-allocation-disabled-when-node-hasnt-been-restarted-recently/9327>\
**Category:** Elasticsearch\
**Created:** [October 11, 2012, 7:21pm UTC](https://discuss.elastic.co/t/restarts-take-forever-even-with-shard-allocation-disabled-when-node-hasnt-been-restarted-recently/9327 "2012-10-11T19:21:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim\_J](https://avatars.discourse-cdn.com/v4/letter/t/f17d59/32.png) [@Tim\_J](https://discuss.elastic.co/u/Tim_J)\
**Post date:** [October 11, 2012, 7:21pm UTC](https://discuss.elastic.co/t/restarts-take-forever-even-with-shard-allocation-disabled-when-node-hasnt-been-restarted-recently/9327/1 "2012-10-11T19:21:10Z")

</div>

Hey folks,  
Not a bug, but something I'd definitely like to understand. I've noticed  
that when I restart nodes, even with shard allocation disabled, the amount  
of time it takes to initialize all shards again seems to be somehow related  
to the amount of time since the last restart. The more time since the last  
restart, the longer it takes to initialize all shards. What's going on?  
Is there some log that's being checked? Is there any way to make this  
process faster by doing something before restarting? If it makes a  
difference I'm on a 15 node cluster with ~2k (3 replicas) with between 2k  
and 20m docs per shard. Restarts are done with the service wrapper.

Thanks!  
-Tim

--

---

<div class="post-metadata">

**Author:** ![otisg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/otisg/32/492_2.png) [@otisg](https://discuss.elastic.co/u/otisg)\
**Post date:** [October 12, 2012, 3:52am UTC](https://discuss.elastic.co/t/restarts-take-forever-even-with-shard-allocation-disabled-when-node-hasnt-been-restarted-recently/9327/2 "2012-10-12T03:52:12Z")

</div>

Hi,

Please check the ML archives - I asked a similar question several months  
ago. Nothing related to time between restarts, but related to preventing  
ES from moving nodes around after restart. You can tell it not to do that  
and avoid having nodes being shuffled around, which will speed things up.  
You don't mention shard shuffling, I'm just assuming that's what's going  
on. If you grab SPM for ES you'll see a timeseries graph that shows this  
sort of stuff, so you will see how many shards are in what state and for  
how long, which may be enlightening here.

## Otis

Search Analytics - [Cloud Monitoring Tools & Services | Sematext](http://sematext.com/search-analytics/index.html)  
Performance Monitoring - [Sematext Monitoring | Infrastructure Monitoring Service](http://sematext.com/spm/index.html)

On Thursday, October 11, 2012 3:21:10 PM UTC-4, Tim J wrote:

> Hey folks,  
> Not a bug, but something I'd definitely like to understand. I've  
> noticed that when I restart nodes, even with shard allocation disabled, the  
> amount of time it takes to initialize all shards again seems to be somehow  
> related to the amount of time since the last restart. The more time since  
> the last restart, the longer it takes to initialize all shards. What's  
> going on? Is there some log that's being checked? Is there any way to  
> make this process faster by doing something before restarting? If it makes  
> a difference I'm on a 15 node cluster with ~2k (3 replicas) with between 2k  
> and 20m docs per shard. Restarts are done with the service wrapper.
> 
> Thanks!  
> -Tim

--

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [October 12, 2012, 9:30am UTC](https://discuss.elastic.co/t/restarts-take-forever-even-with-shard-allocation-disabled-when-node-hasnt-been-restarted-recently/9327/3 "2012-10-12T09:30:48Z")

</div>

Hiya

> Nothing related to time between restarts, but related to preventing  
> ES from moving nodes around after restart. You can tell it not to do  
> that and avoid having nodes being shuffled around, which will speed  
> things up. You don't mention shard shuffling, I'm just assuming  
> that's what's going on.

Actually, he did mention disabling shard allocation.

Tim, yes - the restarted nodes are copying across newer segments from  
the running nodes. So the longer the time between shutdown and restart,  
the more segment copying has to take place.

clint

--

---

<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 6, 2017, 3:09am UTC](https://discuss.elastic.co/t/restarts-take-forever-even-with-shard-allocation-disabled-when-node-hasnt-been-restarted-recently/9327/4 "2017-07-06T03:09:06Z")

</div>


