Netdata Community

Ram_in_swap Alert

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?

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

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.

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.

How to fix this? Any recommendations?

Hi @mikebronner :wave:

we removed ram_in_swap alarm recently, from our experience it is quite noisy and usually not that useful.

You are good if ram_in_use and ram_available 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

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

from man free

       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)

Do you use Netdata Cloud email notifications?

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

Thanks, :slight_smile:

Here’s my output:

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

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

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

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 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.

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.

1 Like

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

1 Like