FreeNAS swap_pager_getswapspace: failed (No VMs, Jails)

Status
Not open for further replies.

junior466

Explorer
Joined
Mar 26, 2018
Messages
79
Hey all,

Today I logged in to FreeNAS and was greeted with a ton of these messages in log:

freenas swap_pager_getswapspace: failed

I started doing some research and it appears that most people that have these issues are running either jails or Virtual machines. I am not running neither and simply have some shares mounted on a few virtual machines on a couple ESXi hosts.

Here's a screenshot of the memory section of the reporting tab:

Screen Shot 2018-10-24 at 6.45.55 PM.png

My system specs:

Build FreeNAS-11.1-U6
Platform Intel(R) Xeon(R) CPU E5-2403 0 @ 1.80GHz
Memory 16GB

Any help would be greatly appreciated.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
It'd be helpful if you posted a lot more information about your system and setup. NFS? iSCSI? Pool config? Etc.?

In general, 16GB is a bit shy for block storage.
 

junior466

Explorer
Joined
Mar 26, 2018
Messages
79
It'd be helpful if you posted a lot more information about your system and setup. NFS? iSCSI? Pool config? Etc.?

In general, 16GB is a bit shy for block storage.
I apologize for being so vague. I am running a mirror pool and the majority of the shares are SMB. I am not serving iSCSI for the ESXi hosts.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Ah, I misread your initial post as "mounted for a few virtual machines."

I'll let someone else ponder SMB issues. It looks like something momentarily maxxed out your system's memory. It would be worthwhile to review the logs for clues as to whether something launched right at the time swap usage started to skyrocket.
 

junior466

Explorer
Joined
Mar 26, 2018
Messages
79
Ah, I misread your initial post as "mounted for a few virtual machines."

I'll let someone else ponder SMB issues. It looks like something momentarily maxxed out your system's memory. It would be worthwhile to review the logs for clues as to whether something launched right at the time swap usage started to skyrocket.

@jgreco - It happened again and after further investigation, I was greeted with this in the log:

Code:
PID 86297 (smbd) , uid 1002, was killed: out of swap space


Is it safe to assume that I maxed out the smbd service and need to consider adding more memory? I have a few servers that heavily depend on the smbd service.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
@jgreco - It happened again and after further investigation, I was greeted with this in the log:

Code:
PID 86297 (smbd) , uid 1002, was killed: out of swap space


Is it safe to assume that I maxed out the smbd service and need to consider adding more memory? I have a few servers that heavily depend on the smbd service.

No, it means the system ran out of memory, swapped a bunch of stuff to swap, and then was still (maybe later, eventually, etc) out of memory. When that happens, FreeBSD will kill semi-arbitrary processes, not necessarily the one actually causing the problem.

Therefore it is not safe to assume that it was smbd causing the problem. It would be nice to know what the problem is, and you might want to consider setting up a little shell script cron to periodically snapshot the process list, so that you can look back. This would be the "best" path forward.

Adding more memory is likely to either reduce the frequency or eliminate the issue, depending on whether you are experiencing some sort of memory leak, insufficient amount of memory to begin with, etc. Without knowing the offender it is hard to provide any answer that is more accurate than just tossing darts at a dartboard.
 

junior466

Explorer
Joined
Mar 26, 2018
Messages
79
No, it means the system ran out of memory, swapped a bunch of stuff to swap, and then was still (maybe later, eventually, etc) out of memory. When that happens, FreeBSD will kill semi-arbitrary processes, not necessarily the one actually causing the problem.

Therefore it is not safe to assume that it was smbd causing the problem. It would be nice to know what the problem is, and you might want to consider setting up a little shell script cron to periodically snapshot the process list, so that you can look back. This would be the "best" path forward.

Adding more memory is likely to either reduce the frequency or eliminate the issue, depending on whether you are experiencing some sort of memory leak, insufficient amount of memory to begin with, etc. Without knowing the offender it is hard to provide any answer that is more accurate than just tossing darts at a dartboard.
Thanks for your reply. That makes sense. I've noticed my Nextcloud server acting up recently so I suspect it may have something to do with it since it uses one of the shares through smbd.

I will keep an eye on it but unfortunately I don't have the skills necessary to setup a script as you suggested.

Again, thanks for the prompt reply.
 

hervon

Patron
Joined
Apr 23, 2012
Messages
353
Last edited:

Silvan Burch

Explorer
Joined
May 1, 2016
Messages
65

hervon

Patron
Joined
Apr 23, 2012
Messages
353
I don't have nextcloud. Might be a jail/plugin issue nonetheless. Only occurred once so far for me. No idea what is the cause.
 

junior466

Explorer
Joined
Mar 26, 2018
Messages
79
Just posting an update as this happened again yesterday. I went over the logs over and over and don't see anything that gives any clue as to what may have happened. I see a series of messages

freenas swap_pager_getswapspace(32): failed

followed by

freenas kernel: pid 50269 (smbd), uid 1003, was killed: out of swap space

I also noticed that it also kills the python service

(python3.6), uid 0, was killed: out of swap space
 
Last edited:
Status
Not open for further replies.
Top