# Swap usage data is now available in the app metrics dashboard

**URL:** <https://community.fly.io/t/swap-usage-data-is-now-available-in-the-app-metrics-dashboard/13449>\
**Category:** Fresh Produce\
**Tags:** metrics\
**Created:** [June 9, 2023, 8:24pm UTC](https://community.fly.io/t/swap-usage-data-is-now-available-in-the-app-metrics-dashboard/13449 "2023-06-09T20:24:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shortdiv](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/shortdiv/32/2518_2.png) [@shortdiv](https://community.fly.io/u/shortdiv)\
**Post date:** [June 9, 2023, 8:24pm UTC](https://community.fly.io/t/swap-usage-data-is-now-available-in-the-app-metrics-dashboard/13449/1 "2023-06-09T20:24:03Z")

</div>

We’ve added a new panel in the metrics page of the apps dashboard to show swap usage. How an app utilizes memory can be tricky to reason about, especially so with swap. We hope that with this added panel, it’ll be easier to see 1. if swap has been enabled on your app and 2. how swap is being used in your app.

## What’s swap

Swap is the virtual space on a disk used when physical RAM is full, and is an incredibly useful method to prevent an OOM. You’ve likely heard us recommend it ALOT in the forums as a way to mitigate OOM issues on apps. It’s a really neat trick to optimizing memory without having to scale up your VM _unless you really have to (which is probably still the better option in many instances)_.

## What does it do?

With this new metric, you can now see how and if swap is being used in your apps. Additionally, we’ve added a handy dandy tooltip so you can configure swap on your own apps if you haven’t already done so and wish to. ✨

---

<div class="post-metadata">

**Author:** ![ignoramous](https://avatars.discourse-cdn.com/v4/letter/i/a9adbd/32.png) [@ignoramous](https://community.fly.io/u/ignoramous)\
**Post date:** [June 9, 2023, 11:15pm UTC](https://community.fly.io/t/swap-usage-data-is-now-available-in-the-app-metrics-dashboard/13449/2 "2023-06-09T23:15:32Z")

</div>

Nice. Reports `swap` usage in OOM emails, too?

Also, we need IO stats, for the ephemeral disk, next; to complete the `sysmon` set.

> [@shortdiv](#):
>
> is an incredibly useful method to prevent an OOM

Or, delay OOMs.

Also, as `swap` starts filling up, the CPU utilisation due to `kswapd` / `madvise` (page faults) starts trending towards 100%, while the [(infamous) load-avg](https://www.brendangregg.com/blog/2017-08-08/linux-load-averages.html) starts shooting over `1` per vCPU. Wouldn’t recommend `swap` for prod apps unless you know what you’re doing.

---

<div class="post-metadata">

**Author:** ![shortdiv](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/shortdiv/32/2518_2.png) [@shortdiv](https://community.fly.io/u/shortdiv)\
**Post date:** [June 12, 2023, 4:14pm UTC](https://community.fly.io/t/swap-usage-data-is-now-available-in-the-app-metrics-dashboard/13449/3 "2023-06-12T16:14:42Z")

</div>

> Also, we need IO stats, for the ephemeral disk, next; to complete the sysmon set.

Oh good idea! Yeah we can definitely work to add that in 😃

> Reports `swap` usage in OOM emails, too?

Ah yes, good point, it could be handy to show this too
