# Lower CMSInitiatingOccupancyFraction on write-heavy clusters?

**URL:** <https://discuss.elastic.co/t/lower-cmsinitiatingoccupancyfraction-on-write-heavy-clusters/14894>\
**Category:** Elasticsearch\
**Created:** [December 16, 2013, 6:04pm UTC](https://discuss.elastic.co/t/lower-cmsinitiatingoccupancyfraction-on-write-heavy-clusters/14894 "2013-12-16T18:04:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ben\_Hundley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ben_hundley/32/1853_2.png) [@Ben\_Hundley](https://discuss.elastic.co/u/Ben_Hundley)\
**Post date:** [December 16, 2013, 6:04pm UTC](https://discuss.elastic.co/t/lower-cmsinitiatingoccupancyfraction-on-write-heavy-clusters/14894/1 "2013-12-16T18:04:06Z")

</div>

Hey everyone, while I'm extremely familiar with Elasticsearch and use it daily, I was hoping some of you that are more familiar with JVM tuning could help me out.

I setup clusters constantly (on Ubuntu 12.04 if it matters), and find that using the default value for CMSInitiatingOccupancyFraction (75% I think) in my elasticsearch init file usually works just fine. However, there's a particular cluster I've just set up that has a super high write/read ratio. ~1k logs are dumped per minute across two m1.smalls and rarely searched (maybe a few times an hour max). The hardware selection is obviously not optimal, but budget restricts moving to a bigger box size or adding more nodes.

With this cluster, I've ran into several OutOfMemory scenarios that require a restart of the process. Heap used is perpetually around 90%. I'm aware that there's generally nothing you can do to alleviate OutOfMemory exceptions when you're using such low-end hardware, but is there any chance that lowering **CMSInitiatingOccupancyFraction** to around 30-50 would help?

The GC MarkSweep duration is already 8-12s, so I guess I'm just worried that increasing the number/duration of GC cycles will result in poorer performance. But, considering how often hard restarts of the cluster are required now, a slight performance loss in favor of keeping the cluster alive is preferred.

Thanks in advanced.

---

<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, 2:00am UTC](https://discuss.elastic.co/t/lower-cmsinitiatingoccupancyfraction-on-write-heavy-clusters/14894/2 "2017-07-06T02:00:52Z")

</div>


