# Ram\_in\_swap Alert

**URL:** <https://community.netdata.cloud/t/ram-in-swap-alert/118>\
**Category:** Help\
**Tags:** agent\
**Created:** [September 7, 2020, 10:49pm UTC](https://community.netdata.cloud/t/ram-in-swap-alert/118 "2020-09-07T22:49:39Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikebronner](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@mikebronner](https://community.netdata.cloud/u/mikebronner)\
**Post date:** [September 7, 2020, 10:49pm UTC](https://community.netdata.cloud/t/ram-in-swap-alert/118/1 "2020-09-07T22:49:39Z")

</div>

I’m seeing the following alert on my dev server. This is not a custom alert, and its only showing on this server, not on my others. Not sure how to resolve this, or if this is a false warning?

```auto
ram_in_swap
WARNING
the swap memory used, as a percentage of the system RAM
Alarm value  
34.8227097
Alarm configuration
Warning when
$this > (($status >= $WARNING) ? (15) : (20))
Critical when
$this > (($status == $CRITICAL) ? (40) : (50))
Check every
10 seconds
Calculation
$used * 100 / ( $system.ram.used + $system.ram.cached + $system.ram.free )
Execute
/usr/libexec/netdata/plugins.d/alarm-notify.sh
Source
19@/usr/lib/netdata/conf.d/health.d/swap.conf
Role
sysadmin

```

---

<div class="post-metadata">

**Author:** ![abdurrehman](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/abdurrehman/32/541_2.png) [@abdurrehman](https://community.netdata.cloud/u/abdurrehman)\
**Post date:** [March 29, 2021, 6:39pm UTC](https://community.netdata.cloud/t/ram-in-swap-alert/118/2 "2021-03-29T18:39:10Z")

</div>

Hi folks,

I’m also running into this and getting like 250 emails every day and don’t seem to understand this. Here are the notifications that I’m getting.

 ![](https://canada1.discourse-cdn.com/flex029/uploads/netdata2/original/1X/fdb16310c976e40de399d87d715092a3f64c359a.png)

It says that the value is 4.6xxx % but what’s the issue with that? Because on the server, I have 2GB ram and 2GB of swap as well and when I’m checking the admin control panel there I see still plenty of RAM available so this is this critical if so then how? I don’t get it, does anybody had this issue? And how to fix it?

Here are more screenshots that I’m getting as warnings.

 ![](https://canada1.discourse-cdn.com/flex029/uploads/netdata2/original/1X/5c852ff712133e003a27734e3df1f2dcd6a65daa.png)

How to fix this? Any recommendations?

---

<div class="post-metadata">

**Author:** ![ilyam8](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/ilyam8/32/134_2.png) [@ilyam8](https://community.netdata.cloud/u/ilyam8)\
**Post date:** [March 29, 2021, 8:08pm UTC](https://community.netdata.cloud/t/ram-in-swap-alert/118/3 "2021-03-29T20:08:47Z")

</div>

Hi @mikebronner 👋

[we removed](https://github.com/netdata/netdata/pull/10789) `ram_in_swap` alarm recently, from our experience it is quite noisy and usually not that useful.

You are good if [ram\_in\_use](https://github.com/netdata/netdata/blob/4c34788d51646f1f41bcb663e9df5731ee5024cc/health/health.d/ram.conf#L13-L25) and [ram\_available](https://github.com/netdata/netdata/blob/4c34788d51646f1f41bcb663e9df5731ee5024cc/health/health.d/ram.conf#L27-L38) are not active.

* * *

@abdurrehman it seems your server is low on RAM (not swap). The metric is `MemAvailable`, you can find it in `/proc/meminfo`

```auto
test@xxx:~$ cat /proc/meminfo | grep -i avail
MemAvailable: 534248 kB

```

from [man free](https://man7.org/linux/man-pages/man1/free.1.html)

```auto
       available
              Estimation of how much memory is available for starting
              new applications, without swapping. Unlike the data
              provided by the cache or free fields, this field takes
              into account page cache and also that not all reclaimable
              memory slabs will be reclaimed due to items being in use
              (MemAvailable in /proc/meminfo, available on kernels 3.14,
              emulated on kernels 2.6.27+, otherwise the same as free)

```

---

<div class="post-metadata">

**Author:** ![ilyam8](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/ilyam8/32/134_2.png) [@ilyam8](https://community.netdata.cloud/u/ilyam8)\
**Post date:** [March 29, 2021, 8:10pm UTC](https://community.netdata.cloud/t/ram-in-swap-alert/118/4 "2021-03-29T20:10:17Z")

</div>

> [@abdurrehman](#):
>
> I’m also running into this and getting like 250 emails every day

Do you use Netdata Cloud email notifications?

---

<div class="post-metadata">

**Author:** ![ilyam8](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/ilyam8/32/134_2.png) [@ilyam8](https://community.netdata.cloud/u/ilyam8)\
**Post date:** [March 29, 2021, 8:13pm UTC](https://community.netdata.cloud/t/ram-in-swap-alert/118/5 "2021-03-29T20:13:45Z")

</div>

@mikebronner i marked my post as a solution, because `ram_in_swap` no longer exists in the master branch.

---

<div class="post-metadata">

**Author:** ![abdurrehman](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/abdurrehman/32/541_2.png) [@abdurrehman](https://community.netdata.cloud/u/abdurrehman)\
**Post date:** [March 29, 2021, 8:28pm UTC](https://community.netdata.cloud/t/ram-in-swap-alert/118/6 "2021-03-29T20:28:52Z")

</div>

Thanks, 🙂

> [@ilyam8](#):
>
> `cat /proc/meminfo | grep -i avail`

Here’s my output:

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/netdata2/original/1X/2c7c15f4c7aedf4654a8150c0592fe24f4ba86e3.png)

Should I increase this or it’s fine since we have just a couple of sites on the server, not too heavy.

---

<div class="post-metadata">

**Author:** ![abdurrehman](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/abdurrehman/32/541_2.png) [@abdurrehman](https://community.netdata.cloud/u/abdurrehman)\
**Post date:** [March 29, 2021, 8:29pm UTC](https://community.netdata.cloud/t/ram-in-swap-alert/118/7 "2021-03-29T20:29:31Z")

</div>

> [@ilyam8](#):
>
> Do you use Netdata Cloud email notifications?

Yes, I do as have added this there is room to view all the stats there. Easy to manage different servers.

---

<div class="post-metadata">

**Author:** ![abdurrehman](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/abdurrehman/32/541_2.png) [@abdurrehman](https://community.netdata.cloud/u/abdurrehman)\
**Post date:** [March 29, 2021, 8:30pm UTC](https://community.netdata.cloud/t/ram-in-swap-alert/118/8 "2021-03-29T20:30:27Z")

</div>

> [@ilyam8](#):
>
> [we removed](https://github.com/netdata/netdata/pull/10789) `ram_in_swap` alarm recently, from our experience it is quite noisy and usually not that useful.

Indeed it’s quite noisy and annoying. How do I go with this, I mean to disable or remove the notification?

---

<div class="post-metadata">

**Author:** ![ilyam8](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/ilyam8/32/134_2.png) [@ilyam8](https://community.netdata.cloud/u/ilyam8)\
**Post date:** [March 29, 2021, 9:04pm UTC](https://community.netdata.cloud/t/ram-in-swap-alert/118/9 "2021-03-29T21:04:09Z")

</div>

> [@abdurrehman](#):
>
> Yes, I do as have added this there is room to view all the stats there. Easy to manage different servers.

Ok, let me to emphasize on the following - there are 2 different events: an alarm active state (WARN, CRIT) and notification about the alarm is in the active state.

There is [delay](https://learn.netdata.cloud/docs/agent/health/reference#alarm-line-delay) configuration option, we use it to prevent notifications flood - delay sending a notification for N seconds and, perhaps, cancel sending notification at all if the alarm is no longer in the active state after _delay_ period. This option doesn’t work in the Cloud, which is a known issue and the fix is coming. That is why you get so many notifications.

* * *

> Should I increase this or it’s fine since we have just a couple of sites on the server, not too heavy.

Check the chart, the first one under Memory section.

 ![Screenshot 2021-03-29 at 23.58.20](https://canada1.discourse-cdn.com/flex029/uploads/netdata2/original/1X/ab029676f0034cda9deadebf4445b26eabf2fd31.jpeg)

It means that your server has no enough ram and is going to swap soon (swap is relatively slow, you basically write and read to/from disk). Adding some ram would solve the issue.

However, if you have no opportunity/willing to add some RAM to the server you can disable the alarm.

---

<div class="post-metadata">

**Author:** ![abdurrehman](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/abdurrehman/32/541_2.png) [@abdurrehman](https://community.netdata.cloud/u/abdurrehman)\
**Post date:** [March 29, 2021, 9:23pm UTC](https://community.netdata.cloud/t/ram-in-swap-alert/118/10 "2021-03-29T21:23:07Z")

</div>

Thanks for explaining this, sure I’ll add more to resolve this.
