<commit_before>---
title: Scaling an App Using cf scale
owner: CAPI
---



Factors such as user load, or the number and nature of tasks performed by an app, can change the disk space and memory the app uses.
For many apps, increasing the available disk space or memory can improve
overall performance.
Similarly, running additional instances of an app can allow the
app to handle increases in user load and concurrent requests.
These adjustments are called **scaling** an app.

Use [cf scale](http://cli.cloudfoundry.org/en-US/cf/scale.html) to scale your app up or down to meet changes in traffic
or demand.

<%=vars.autoscaler_note_dev_guide%>

## <a id="horizontal"></a>Scaling Horizontally ##

Horizontally scaling an app creates or destroys instances of your app.

Incoming requests to your app are automatically load balanced across all
instances of your app, and each instance handles tasks in parallel with
every other instance.
Adding more instances allows your app to handle increased traffic and
demand.

Use `cf scale APP -i INSTANCES` to horizontally scale your app.
Cloud Foundry will increase or decrease the number of instances of your app to match `INSTANCES`.

<pre class='terminal'>
$ cf scale myApp -i 5
</pre>

## <a id="vertical"></a>Scaling Vertically ##

Vertically scaling an app changes the disk space limit or memory limit
that Cloud Foundry applies to all instances of the app.

Use `cf scale APP -k DISK` to change the disk space limit applied to all
instances of your app.
`DISK` must be an integer followed by either an **M**, for megabytes, or **G**,
for gigabytes.

<pre class='terminal'>
$ cf scale myApp -k 512M
</pre>

Use `cf scale APP -m MEMORY` to change the memory limit applied to all instances<commit_msg>adds process note[#162493079]<commit_after>---
title: Scaling an App Using cf scale
owner: CAPI
---



Factors such as user load, or the number and nature of tasks performed by an app, can change the disk space and memory the app uses.
For many apps, increasing the available disk space or memory can improve
overall performance.
Similarly, running additional instances of an app can allow the
app to handle increases in user load and concurrent requests.
These adjustments are called **scaling** an app.

Use [cf scale](http://cli.cloudfoundry.org/en-US/cf/scale.html) to scale your app up or down to meet changes in traffic
or demand.

<%=vars.autoscaler_note_dev_guide%>

## <a id="horizontal"></a>Scaling Horizontally ##

Horizontally scaling an app creates or destroys instances of your app.

Incoming requests to your app are automatically load balanced across all
instances of your app, and each instance handles tasks in parallel with
every other instance.
Adding more instances allows your app to handle increased traffic and
demand.

Use `cf scale APP -i INSTANCES` to horizontally scale your app.
Cloud Foundry will increase or decrease the number of instances of your app to match `INSTANCES`.

<pre class='terminal'>
$ cf scale myApp -i 5
</pre>

<p class="note"><strong>Note</strong>: In cf CLI v7, you can also use <code>--process</code> with <code>cf scale</code> to scale specific processes of your app.</p>

## <a id="vertical"></a>Scaling Vertically ##

Vertically scaling an app changes the disk space limit or memory limit
that Cloud Foundry applies to all instances of the app.

Use `cf scale APP -k DISK` to change the disk space limit applied to all
instances of your app.
`DISK` must be an integer followed by either an **M**, for megabytes, or **G**,
for gigabytes.

<pre class='terminal'>
$ cf scale myApp -k 512M
</pre>

Use `cf scale APP -m MEMORY` to change the memory limit applied to all instances
{'fraction_non_alphanumeric': 0.07426550598476606, 'fraction_numerical': 0.004896626768226333, 'mean_word_length': 4.4073529411764705, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1663745', 'n_tokens_mistral': 1045, 'n_tokens_neox': 986, 'n_words': 552}