Wasted Storage Space

Status
Not open for further replies.

Jake

Cadet
Joined
Aug 3, 2013
Messages
8
When creating a new striped volume, FreeNAS is not utilizing the maximum drive space available.

I'm expecting FreeNAS to use the full "VMWare Maximum Size" or "VMWare System Size".

I'm also not sure why FreeNAS is reporting different Available Disks Size than VMWare (i.e. 322.1 GB vs 318 or 300). Where is FreeNAS getting 322.1 GB?

(I also have a side question on why the VMWare Maximum Size is different than the System Size).

For example:

FreeNAS
B7UQBSZ.jpg


Drive A
VMWare System Size = 318.0 GB
VMWare Maximum Size = 300 GB
FreeNAS Capacity = 298.00 GiB
kGByChf.jpg


Drive B
VMWare System Size = 35.0 GB
VMWare Maximum Size = 34 GB
FreeNAS Capacity = 32.00 GiB
r23wlqC.jpg


Why?

Windows 7 x64
VMWare Player 7.1.0 build-2496824
FreeNAS 9.3

Thanks,
Jake
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
The 2GB differences you are seeing between VMWare Max Size and FreeNAS Capacity is due to FreeNAS creating a 2 GB swap file on each disk.

The difference is more noticeable on a tiny drive vs a 2 TB+ drive.


Sent from my phone
 
Last edited:

Jake

Cadet
Joined
Aug 3, 2013
Messages
8
Is there a way to avoid having a FreeNAS swap file created for each disk, so not to lose so much storage?
Or why is so much FreeNAS swap file storage necessary?
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
You can adjust the swap size (before creating the pools, it won't have any effect on already created pools) but it's not really recommended. After all it's only 2 GB and even if it was state of the art 20 years ago it's just insignificant today :)
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Is there a way to avoid having a FreeNAS swap file created for each disk, so not to lose so much storage?
Or why is so much FreeNAS swap file storage necessary?

Does it matter? Type 2 hypervisors are good for learning FreeNAS. They are catastrophic if you plan to use the for data storage!

So regardless of that 2GB of swap space, this shouldn't be anymore more than to learn FreeNAS.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
I'll be honest: If you're worried about those 2GB, you're trying to use this thing in some sort of production environment. DO NOT.

And Cyberjock beat me to it.
 

Jake

Cadet
Joined
Aug 3, 2013
Messages
8
What is the swap space used for?
Why is the swap space not created on the system drive in which I have plenty of storage space available?
I have plenty of RAM available, why not use RAM for swap?
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
"What is the swap space used for?" --> It's used when you run out of RAM. Less used pages in RAM are swapped to the swap space (hence the name...) to free some RAM when needed.

"Why is the swap space not created on the system drive in which I have plenty of storage space available?" --> Because the system drive is often a USB stick and they are really slow.

"I have plenty of RAM available, why not use RAM for swap?" --> Well, see the first line of this post :)
 
Last edited:

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
Swap is there for cases when you run out of RAM. Ideally you'd size the RAM so it never used swap. With swap in play performance will tank.

Another use for the swap file comes into play if you need to replace a drive. Say, your original 2TB disk was from vendor A and the new 2TB from vendor B is slightly smaller. Since there was/is a swap file it can be adjusted to allow you to replace a drive.


Sent from my phone
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
BTW, you say that you have plenty of RAM. Did you configure your FreeNAS VM with at least 8GB?


Sent from my phone
 

Jake

Cadet
Joined
Aug 3, 2013
Messages
8
I still don't understand why the swap file has to be on my data drives when it can use RAM + system drive, or allow me to specify a separate swap partition.
 

Jake

Cadet
Joined
Aug 3, 2013
Messages
8
When I look at the System\Advanced\Swap size option, I presume there will be a swap file created for each drive, regardless of RAM or anything else.
y6vSLxg.jpg
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
Yes, that's correct. Did you read my reply about replacing drives?

Regardless of what you see in a graph, you need to give FreeNAS a minimum of 8GB RAM. Otherwise bad things can happen - perhaps even killing your pool.

Please read the docs. You can view the HTML version online or from the webGUI. Or download it as a PDF using the link in my signature.

Whenever I create a FreeNAS VM in ESXi, I follow the guide and give it 8GB RAM.


Sent from my phone
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I still don't understand why the swap file has to be on my data drives when it can use RAM + system drive, or allow me to specify a separate swap partition.
If you think RAM can substitute for swap space, you don't understand the purpose of swap space. The system drive, for most installations, is a USB stick or two, which is singularly unsuitable for swap. As to a separate swap partition, how would that work? Where would it be created, and what would be done with the rest of that device?

Really, with any device that might actually be used for storage in an actual NAS application (i.e., what FreeNAS is designed to do), the 2 GB of space reserved for swap is insignificant. If you want to change it, or remove it entirely, you've found the place to do that, but you really shouldn't do that.
 
Status
Not open for further replies.
Top