Leaving SSD space unassigned when creating VMs?


Recommended Posts

I am wondering if it is necessary to leave any space unallocated on a SSD when creating VMs to allow the drive to do its housekeeping or not?

 

My situation is that I intend to have a group of WD Red 3Tb spinners as single parity and data, a SATA Samsung 850PRO 256Gb SSD as cache and an NVMe Samsung 960PRO 1Tb shared between a pair of gaming VMs. The array is only responsible for serving a single 1080p stream via PLEX to a single user and the pair of VMs would be used one at a time. The Linux VM would be used as a daily driver and for those games which Steam offered as Linux. The Windows 10 VM would only be used for the Steam Windows games. I would hibernate each VM when changing to the other as I have a single GPU at the moment.

 

Now, when assigning the space on the 1Tb NVMe device, would you advise allocating all of it to the two VMs or leaving a bit of headroom for the device to perform maintenance? If I was going to set it up as dual boot with partitions I would have allocated all of it of course because the unused parts would be empty but for a VM under unRAID, does it work the same way or does it fill the device at the time of allocation?

Link to comment

The one thing you have to be a bit careful of is that unRAID will initially create the vdisk files as ‘sparse’ files so they do not occupy all the space initially that they are defined as using.    This means that you will find you can create vdisk files whose total size appears to exceed the physical space on the SSD.    This can later cause VMs to crash as their vdisks occupy more space (up to their defined maximum) as the VM is run and uses more of its vdisk space if the free space on the SSD runs out.

 

As to whether space should be left for SSD level housekeeping I have no idea.

Link to comment

If it's generally advised to leave a portion of an SSD unallocated. The VMs are, however, allocated as sparse files, so the space is not actually allocated. I've had trouble, however, with sparse files taking forever and even failing when trying to backup and restore, and as a result mine are no longer sparse.

 

I'd suggest leaving some room unallocated. You can grow the disks as needed, and maybe you'll need more space in one versus the other anyway.

 

Start with a generous allocation for each (250-350G?) and then add space if/when needed. But I'd probably look to keep 50G-100G unallocated.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.