# Set default capacity\_adjustment instance value.

**URL:** <https://forum.ansible.com/t/set-default-capacity-adjustment-instance-value/37305>\
**Category:** AWX Project\
**Created:** [November 4, 2022, 10:28am UTC](https://forum.ansible.com/t/set-default-capacity-adjustment-instance-value/37305 "2022-11-04T10:28:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mickael\_besse](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mickael_besse/32/5343_2.png) [@mickael\_besse](https://forum.ansible.com/u/mickael_besse)\
**Post date:** [November 4, 2022, 10:28am UTC](https://forum.ansible.com/t/set-default-capacity-adjustment-instance-value/37305/1 "2022-11-04T10:28:39Z")

</div>

Hello

Is there a way to set a default value for capacity\_adjustment instance settings. It seems it is set to “1” by default. The idea is to override the default value that will be used for all new instances

Thanks

---

<div class="post-metadata">

**Author:** ![AWX\_Project](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@AWX\_Project](https://forum.ansible.com/u/AWX_Project)\
**Post date:** [November 4, 2022, 5:19pm UTC](https://forum.ansible.com/t/set-default-capacity-adjustment-instance-value/37305/2 "2022-11-04T17:19:47Z")

</div>

Hi!

if you create instances through awx collection or with an API request, you can set the capacity\_adjustment upon creation.

However, through the UI you cannot set the capacity right away, and have to patch the endpoint, or use the UI slider to set capacity\_adjustment.

AWX Team

---

<div class="post-metadata">

**Author:** ![mickael\_besse](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mickael_besse/32/5343_2.png) [@mickael\_besse](https://forum.ansible.com/u/mickael_besse)\
**Post date:** [November 4, 2022, 9:03pm UTC](https://forum.ansible.com/t/set-default-capacity-adjustment-instance-value/37305/3 "2022-11-04T21:03:57Z")

</div>

hi.

In fact, we have several instances because we define several replicas in our AWX CRD object, then the awx operator just updates the kubernetes deployment to add new awx pods.  
As you said, I can update existing instances with the API or use the UI slider to set capacity\_adjustment. If the pods are restarted, the new instances will have the default value capacity\_adjustment set to 1. So, there is no way to change this value for instance created in the kubernetes deployment. ?

---

<div class="post-metadata">

**Author:** ![mani3887](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@mani3887](https://forum.ansible.com/u/mani3887)\
**Post date:** [November 4, 2022, 9:51pm UTC](https://forum.ansible.com/t/set-default-capacity-adjustment-instance-value/37305/4 "2022-11-04T21:51:01Z")

</div>

This can be done by updating the SYSTEM\_TASK\_ABS\_MEM and SYSTEM\_TASK\_ABS\_CPU variables as env variable in awx\_task container in the AWX deployment file or updated in the settings info of AWX config map(restart is required after updating it here). These variables are being used in AWX capacity calculation code(getenv/getattr(settings)). You can also increase the number of forks with this env variable: SYSTEM\_TASK\_FORKS\_CPU.

Hope this helps.

Thanks and Regards,  
Mani
