Why is swap usage growing ?

Status
Not open for further replies.
Joined
Oct 7, 2016
Messages
29
Hi,
I updated to 11.1-u4 last weekend and noticed my swap use is growing even faster than it was on -u3:
generate


generate



I have about 10 iocage jails running but no VMs.
Any idea how to find the cause for this swap usage ?

NB I was able to clear it using swapoff+swapon so nothing seems to really need it:
Code:
root@freenas:~ # swapinfo
Device		  1K-blocks	 Used	Avail Capacity
/dev/mirror/swap0.eli   2097152   735728  1361424	35%
root@freenas:~ # swapoff /dev/mirror/swap0.eli
root@freenas:~ # swapon /dev/mirror/swap0.eli
root@freenas:~ # swapinfo
Device		  1K-blocks	 Used	Avail Capacity
/dev/mirror/swap0.eli   2097152		0  2097152	 0%

System is an Asrock C2550 with 16 GB ECC memory.
Main pool is raidz2 ( 6* WD RED 4TB)
Extra pool is 2 WD Black 1TB in mirror.
 
Last edited:

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
System is an Asrock C2550 with 16 GB ECC memory.
Main pool is raidz2 ( 6* WD RED 4TB)
Extra pool is 2 WD Black 1TB in mirror.
It isn't a lot, but you tried to tell us about your hardware, thanks.
16 GB of memory and 10 jails.
I have about 10 iocage jails running but no VMs.
Jails are very efficient on resources, but I would say that with 10 of them, you should have more memory. After all, 8GB is the bare minimum...
Now, I know that the requirements listed here: http://www.freenas.org/hardware-requirements/
Say that 16GB is enough for a Home Media Server, but I feel certain they were not expecting you to run 10 jails based on that recommendation.
How much memory you might need would depend on what you are doing, different applications will have different demands.
IF you can can give more details about your setup, someone might be able to give you a suggestion or two.

Also, your image attachment didn't work, not for me. Did you upload that to the forum? You can you know. It is actually better than putting the image somewhere else and trying to link to it.
 
Joined
Oct 7, 2016
Messages
29
It isn't a lot, but you tried to tell us about your hardware, thanks.
16 GB of memory and 10 jails.

Jails are very efficient on resources, but I would say that with 10 of them, you should have more memory. After all, 8GB is the bare minimum...
Now, I know that the requirements listed here: http://www.freenas.org/hardware-requirements/
Say that 16GB is enough for a Home Media Server, but I feel certain they were not expecting you to run 10 jails based on that recommendation.
How much memory you might need would depend on what you are doing, different applications will have different demands.
IF you can can give more details about your setup, someone might be able to give you a suggestion or two.

Also, your image attachment didn't work, not for me. Did you upload that to the forum? You can you know. It is actually better than putting the image somewhere else and trying to link to it.

Most of the jails are relatively idle. System is my home NAS with no external users.
The Plex zone is probably the heaviest.

The image issue is strange, if I view the posting in the browser where I posted it I see the images.
If I look on my iPad I see 2 texts.

I just copied and pasted them in Safari.. Trying it again using Upload a File button.
generate-1.png
generate-1.png
 

Attachments

  • generate.png
    generate.png
    13.3 KB · Views: 244
Joined
Oct 7, 2016
Messages
29
Hm After Upload a File it shows the same image twice while I uploaded 2 different files.
Looks like something strange is happening in the forum software.
 
Joined
Apr 9, 2015
Messages
1,258
Being idle does not matter if the jails are started they are loading something and using memory. Some stuff has to be in memory even if it's not being used. Clearing the swap out is just forcing the stuff into main memory and then it's being flushed back again. The problem is you are then losing something for the swap to be turned off you just don't know what it is until you try and use the system. But if you start using the system you may end up crashing it in a bad way. Just get some more ram or put in another drive to hold the swap if it has been an issue.

As far as the forums they have had some issues over the last couple weeks. Just have to deal with it till the problem is found.
 

MrToddsFriends

Documentation Browser
Joined
Jan 12, 2015
Messages
1,338
While there are some reports of users that criticize excess swap usage of FreeNAS since version 9.10 your diagrams seem to tell another story and I'm with @Chris Moore. Use fewer jails and see what happens (or add more memory).

And yes, the forum software is sluggish at times. This problem is known and the forums admins / IT group is working on it.
 
Last edited:
Joined
Oct 7, 2016
Messages
29
I ran into the FreeBSD bug that ate kernel memory on 11.1 ( fixed in -u1) so I am a bit apprehensive about increased memory and swap use.
It would be nice if there was a way to find out what each page in swap is used for but I guess that would be something for the FreeBSD project to do...

Will keep an eye on swap usage and see how it progresses over time.

Paul
 
Status
Not open for further replies.
Top