Swap space for FreeNAS

Status
Not open for further replies.

CLV

Dabbler
Joined
Jun 5, 2014
Messages
11
Executive summary:

I've tripled the RAM in my FreeNAS box and suddenly I'm getting swap space issues. I don't understand this but I would like to solve it.


Full story:

After my boot USB failed I decided to switch to a small SSD as boot device, and while I had my hands in the box I added 16GB to the existing 8GB of memory. Once I had reclosed the chest cavity I installed the 9.3 software and uploaded my config file.

All looked great, so I scrubbed the storage. Part way through the web UI stopped responding, so I switched to the console, and lo, the machine was complaining about swap space. After the scrub completed the web UI stayed down so I did an orderly restart, voila, it's alive. Good.

But I don't want to have this happening. The machine is presently a 24GB system with an AMD Bulldozer CPU, a 30GB SSD for boot and 6 4TB drives in a RaidZ2 configuration in a single pool. The default 12GB (2 per drive) of swap is allocated.


So the questions:

- Any idea why this started happening AFTER I added RAM?
- Does the move to 9.3 have any bearing?
- Should I have more swap?


Proposed solution:

Would it work if I added a drive, made it a single drive vdev in a new pool, and set the swap per drive for that pool to be some huge value? For instance I have some slightly pre-loved SSDs (another 30, and a 120) that I could use for this, or I also have some reasonably fast HDDs of around 1TB capacity I could use this way.

- Can I in effect essentially dedicate a drive/vdev/pool to being swap by doing this?
- Would it help?
- Would it be recommended for or against?
- If I have a dedicated swap pool, would it be safe to rebuild the main storage pool with no swap?
 

krikboh

Patron
Joined
Sep 21, 2013
Messages
209
Do you have any tuneables or auto tune enabled?


Sent from my iPhone using Tapatalk
 

CLV

Dabbler
Joined
Jun 5, 2014
Messages
11
Do you have any tuneables or auto tune enabled?

I do not have any tuneables or autotune enabled.

I do have CIFS enabled and I have BTSync and Plex running as plugins with default settings from the pre-9.3 config file I saved and imported. I believe Plex may have decided it was time to re-index part way through the scrub, but I'd like for that sort of thing to be tolerated by the NAS.
 

CLV

Dabbler
Joined
Jun 5, 2014
Messages
11
One other thing I should mention is that after the reboot I went into the reporting part of the UI and fished around a bit. I discovered that the system never reported less than 4.3GB of memory free, and that there was a brief spike in swap space use, followed by a complete lack of swap use. This was about the time the web UI was closed. The system never shows any swap used after this.
 

krikboh

Patron
Joined
Sep 21, 2013
Messages
209
Are you on the latest version of Plex? I remember a Plex bug that was similar.


Sent from my iPhone using Tapatalk
 

CLV

Dabbler
Joined
Jun 5, 2014
Messages
11
Are you on the latest version of Plex? I remember a Plex bug that was similar.

I found those threads and updated Plex, but I've not been home to check yet.

The odd thing is that it was fine before I added RAM and updated to FreeNAS 9.3, but that could be coincidence I suppose.
 

krikboh

Patron
Joined
Sep 21, 2013
Messages
209
Run top to identify what is using the memory. FreeNAS should never touch swap.


Sent from my iPhone using Tapatalk
 

pschatz100

Guru
Joined
Mar 30, 2014
Messages
1,184
Since you didn't provide any hardware details, it's difficult to offer much in the way of advice. You changed several things at once. A couple of thoughts:

1) If you think the problem is related to Plex, then turn it off and see if there is any difference. Easy enough to do.
2) Are you certain the new RAM is good? Try removing it and see if the problem goes away (or changes.) If this makes any difference, then you should run a memory test on the new RAM just to be certain. Put the RAM back in one stick at a time.
 

CLV

Dabbler
Joined
Jun 5, 2014
Messages
11
The problem reoccurred once, so I patched to the latest 9.3, removed all the plugins that came from the 9.2.x -> 9.3 upgrade, and reinstalled Plex, S3, and BTSync in shiny new jails. No issues so far but I will keep you posted.
 

CLV

Dabbler
Joined
Jun 5, 2014
Messages
11
Still problem free, I have no idea what the root cause was but I suspect an issue with migration of the jails from 9.2 to 9.3
 

CLV

Dabbler
Joined
Jun 5, 2014
Messages
11
I'm declaring this gone, after removing and reinstalling the plugins the issue has not resurfaced, thanks to all who helped.
 
Status
Not open for further replies.
Top