Swap space

Status
Not open for further replies.

KG4PAD

Cadet
Joined
Oct 27, 2018
Messages
2
I'm getting the swap_pager_getswapspace() failed message. I'm running 11.1-U5. I've seen similar questions and the general response has been "Install more RAM". Well, I've got 128G of RAM, so I don't think that's the problem. I am running a few VMs, but the total memory assigned to them is about 36G.

Currently I have about 10G of swap space and the reporting tool says 9.8G is being used. As for memory, it says 55.9G is "wired", 55.2G is "inactive", 6.5G is "active", 5.6G is "laundry" and 1.4G is "free".

I don't know about FreeBSD, but Linux will throw seldom used parts of running processes out to swap to make more room for disk caching. I kind of suspect this is what is happening with FreeNAS since I usually see these messages when I'm moving a large amount of data from one dataset to another. It has also happened when I'm sending backups of datasets to a backup drive.

I haven't actually seen it cause a problem... just log the message to the console / messages file. But maybe it's nuking some memory in a VM and I just haven't noticed.

I've got a spare 240G SSD drive. I'm going to attempt to add it as a swap device if I can figure out how. Going for overkill...

Let me know if anyone has any thoughts on this.

- Tim
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
If you're assigning about 36GB of RAM to VMs on the FreeNAS host, have you also reduced the arc_max value by that same amount?

ARC will automatically shrink itself under memory pressure, but your VMs under bhyve won't. Give them some breathing space by shrinking your ARC by 10G or so to start and see where that gets you.
 

KG4PAD

Cadet
Joined
Oct 27, 2018
Messages
2
Thanks for the tip! My arc_max was set at 123624000000 by autotune. I changed it to 100000000000. I'll see if I notice any problems.

An update to my first post: I shut down the VMs and it only changed the swap slightly. The reporting chart showed about 45G went from "inactive" to "free". The "wired" stayed the same (I'm actually not sure what "wired" is...). Then I did a shutdown. It took a long time as it apparently went from each 2G swap partition sequentially swapping the data back in before "destroying" the device for shutdown. That makes me wonder if there's a memory leak for some process and it was having to swap it all back in before freeing the memory. I know there was some sort of leak in early versions of 11.x, but I think I read that was fixed.

- Tim
 
Status
Not open for further replies.
Top