Help me to understand SWAP usage

Status
Not open for further replies.

Jacopx

Patron
Joined
Feb 19, 2016
Messages
367
Buongiorno a tutti!

I’m running FreeNAS since years, in signature you can find the configuration. Nothing is changed since 6 months and yesterday I have noticed that some swap was in use, around 230MB of 8GB.
I can’t figure out what could be the cause! My server runs:
* Plex
* Nextcloud
* Sickrage
* Transmission + VPN
* GitLab

I have cleaned used the script here (https://forums.freenas.org/index.ph...ny-used-swap-to-prevent-kernel-crashes.46206/) and now everything is good.
Can this swap usage generated by a sooner boot failure? Or badly on my RAID?
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
in signature you can find the configuration
Please update to FreeNAS 11.1-U6 unless you have some significant reason not to update.z
There were some memory leak problems in the recent releases of FreeNAS and I think they were finally all fixed in Update 6.
I can’t figure out what could be the cause! My server runs:
* Plex
* Nextcloud
* Sickrage
* Transmission + VPN
* GitLab
That is a good number of, are they jails? It might be that something just needed a bit more memory than your system had at the moment.
 

Jacopx

Patron
Joined
Feb 19, 2016
Messages
367
Please update to FreeNAS 11.1-U6 unless you have some significant reason not to update.z
There were some memory leak problems in the recent releases of FreeNAS and I think they were finally all fixed in Update 6.

The system already was in U6, I have miss to update the signature!

That is a good number of, are they jails? It might be that something just needed a bit more memory than your system had at the moment.

Yes, all old jail solution! I have noticed that some of my tenants have doing something strange with Plex, around 7 concurrent transmission, it could be that!?
Because this jails are running since a lot of months! And only the last day I have noticed the swap...
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
Yes, all old jail solution! I have noticed that some of my tenants have doing something strange with Plex, around 7 concurrent transmission, it could be that!?
It is possible that heavy demand in the Plex jail might cause some swap to be utilized. It might be something to keep a closer eye on.
 

Jacopx

Patron
Joined
Feb 19, 2016
Messages
367
It is possible that heavy demand in the Plex jail might cause some swap to be utilized. It might be something to keep a closer eye on.

I will keep it under control!
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
Simple solution is just to run the script regularly ;)

BUT keep an eye out for actual swap/memory leaks.
 

wblock

Documentation Engineer
Joined
Nov 14, 2014
Messages
1,506
some swap was in use, around 230MB of 8GB
Doing the math, that is less than 3%. FreeBSD can swap rarely-used things out to free up memory that is needed. That is the purpose of swap.

FreeNAS uses mirrored swap to avoid problems with device failure, so that script should not be needed. Using it will cause more RAM to be used, which can cause performance issues.
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
In my view, for a storage appliance, the "purpose of swap" is to save your butt when you haven't put enough RAM in the system to do what you're asking it to.

BUT keep an eye out for actual swap/memory leaks.

It's a neat way to fix the symptom, but ultimately the cause is what needs to be addressed - "insufficient Vespene Gas memory" - in this case, regularly using ~256MB of swap might be best handled by dropping the arc_max value by the same, or otherwise reducing memory pressure by running fewer jails/introducing memory limits on the processes running in them.
 
Status
Not open for further replies.
Top