# Low avail\_pct - is it dangerous?

**URL:** <https://discuss.aerospike.com/t/low-avail-pct-is-it-dangerous/1380>\
**Category:** General Discussion\
**Created:** [June 15, 2015, 3:18pm UTC](https://discuss.aerospike.com/t/low-avail-pct-is-it-dangerous/1380 "2015-06-15T15:18:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![onokonem](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/onokonem/32/219_2.png) [@onokonem](https://discuss.aerospike.com/u/onokonem)\
**Post date:** [June 15, 2015, 3:18pm UTC](https://discuss.aerospike.com/t/low-avail-pct-is-it-dangerous/1380/1 "2015-06-15T15:18:25Z")

</div>

Hi,

We have a 10 nodes cluster. Actually this cluster was extended by 2 nodes recently.

Disk used is about 75% on all the nodes. But avail\_pct is not the same on all the nodes and is not (100% - used).

it is about 25% on the new nodes, about 10% on the old nodes and about 6% on one of them.

The question is: is it ok?

what can I do to recover some space not used nor available?

Thank you.

With best regards, Daniel Podolsky

---

<div class="post-metadata">

**Author:** ![kporter](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/kporter/32/515_2.png) [@kporter](https://discuss.aerospike.com/u/kporter)\
**Post date:** [June 16, 2015, 7:46pm UTC](https://discuss.aerospike.com/t/low-avail-pct-is-it-dangerous/1380/3 "2015-06-16T19:46:22Z")

</div>

> [@onokonem](#):
>
> The question is: is it ok?

Not for long. When Available percent dips below 5 percent, the node will enter stop writes.

> [@onokonem](#):
>
> what can I do to recover some space not used nor available?

Since version 3.3.17 of Aerospike (what version are you one?), the defrag tuning has been reduced to two important parameters.

- [defrag-sleep](http://www.aerospike.com/docs/reference/configuration/#defrag-sleep) parameter defines how many micro-seconds defrag should sleep between each defragged write-block. By default this is set to 1000 micro-seconds (1ms).
- [defrag-lwm-pct](http://www.aerospike.com/docs/reference/configuration/#defrag-lwm-pct) defines the maximum wblock usage a must be before it is placed on the defrag-queue. By default this is 50%, you could raise this up to 60%, but be aware that this setting has a non-linear impact to write load that increases with this value.

---

<div class="post-metadata">

**Author:** ![Mnemaudsyne](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/mnemaudsyne/32/200_2.png) [@Mnemaudsyne](https://discuss.aerospike.com/u/Mnemaudsyne)\
**Post date:** [June 17, 2015, 10:29pm UTC](https://discuss.aerospike.com/t/low-avail-pct-is-it-dangerous/1380/4 "2015-06-17T22:29:56Z")

</div>

@onokonem,

There is an earlier community article that we can refer you to [here](https://discuss.aerospike.com/t/recovering-from-available-percent-zero/715) about available percent (avail\_pct).

A possible cause of the higher avail\_pct on the new node could be that it does not yet have enough data.

Another cause could be that migrations are occurring, causing the differences between nodes. In steady state (no migrations), avail\_pct should have a balanced value across all nodes.

---

<div class="post-metadata">

**Author:** ![onokonem](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/onokonem/32/219_2.png) [@onokonem](https://discuss.aerospike.com/u/onokonem)\
**Post date:** [June 17, 2015, 10:45pm UTC](https://discuss.aerospike.com/t/low-avail-pct-is-it-dangerous/1380/5 "2015-06-17T22:45:28Z")

</div>

finally we’ve fixed the problem with

```auto
for node in $listOfNodes
  do
  asinfo -v "set-config:context=namespace;id=storebig;defrag-lwm-pct=90" -h $node
  asinfo -v "set-config:context=namespace;id=storebig;defrag-sleep=500" -h $node
  done

```

`defrag-lwm-pct` was 99 on all the nodes for unknown reason (it is not specified in config)

---

<div class="post-metadata">

**Author:** ![kporter](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/kporter/32/515_2.png) [@kporter](https://discuss.aerospike.com/u/kporter)\
**Post date:** [June 18, 2015, 12:46am UTC](https://discuss.aerospike.com/t/low-avail-pct-is-it-dangerous/1380/6 "2015-06-18T00:46:51Z")

</div>

> [@onokonem](#):
>
> defrag-lwm-pct=90

😨

> [@kporter](#):
>
> By default this is 50%, you could raise this up to 60%, but be aware that this setting has a non-linear impact to write load that increases with this value.

Let me stress the **non-linear impact** , as you approach 100% the write amplification approaches infinity. At 50% there is a 2x write amplification and 75% would be 4x.

I would recommend that you try 50 or 60% instead

Also the following will apply the config change dynamically across the cluster:

```auto
asadm -e "asinfo -v 'set-config:context=namespace;id=storebig;defrag-lwm-pct=50'"

```

But you will still need to update the static config file.
