I think SSD emulation isn't needed. But yes, if you use ZFS you should always have discard enabled. And remember that you also need to tell the guest OS to use discard.So just to be clear, any vm I put on my zfs-raid mirror tank0 should have discard[x] enabled? and I assume ssd emulation.
Yes, your virtual disks will grow and grow. You can useWhat are the consequences of not doing this, the drive will fill up even if not full, how does one track this?
zfs list
to view the zvols. If a zvol ist way bigger than the guest os is reporting used space, your discard might not be working.fstrim -a
on your host to do a manual discard of all mounted filesystems and look if it frees up stuff. If it works you really should enable discard for all your VMs and create a cronjob to run fstrim -a
once a day. Like aaron already said, if you use ZFS/CEPH or LVMthin you need to manually setup discard everywhere.Is this still needed with normal LVM? I never remember having to do this before, it would just free up the space instantly.Try to run afstrim -a
on your host to do a manual discard of all mounted filesystems and look if it frees up stuff. If it works you really should enable discard for all your VMs and create a cronjob to runfstrim -a
once a day. Like aaron already said, if you use ZFS/CEPH or LVMthin you need to manually setup discard everywhere.
you need fstrim in cron, or "discard" option in /etc/fstab mountpoint to get it instantly.Is this still needed with normal LVM? I never remember having to do this before, it would just free up the space instantly.
I understand that, I’m more concerned about it making the encryption more transparent. If I use discard with LVM will this still be the case, and do I still need to unlock with —allow discards?Its not needed with normal LVM if you got no thin provisioned LV but it would always be a good idea to enable TRIM/discard if you use SSDs because otherwise the garbage collection of the SSDs can't be optimal and it might reduce the life expectation and performance of your SSDs. SSDs work better the more free space they got. If you don't use discard the SSD won't delete stuff instantly.
That is a little worrying but I will see how it goes. Do you have VMs that you use as workstations? Like Remote Desktop sessions (Citrix style)?Using discard will always weaken encryption. If you want a strong encryption you can use LVM without thin LVs and ignore the discard. SSDs will work without it and use garbage collection to manage deleted data but you will see a noticable performance impact. I for example really see that with verascypt on winddows. raid0 of 4 SSDs and I get write speeds of 30-70 MB/s. Without encryption it was way above 1GB/s. At first it was still with encryption fast but the longer I used it, the slower it got.
I'm using 2 Win10 VMs. One for use as a HTPC connected via HDMI to my TV and the other one is for testing and stuff that won't run on linux/unix. But I only got 1 GPU, there are no free PCIe slots and without PCI passthrough of the GPU that Win10 VMs can'T even play a youtube video without stuttering. So I can only use one of the VMs at a time.That is a little worrying but I will see how it goes. Do you have VMs that you use as workstations? Like Remote Desktop sessions (Citrix style)?
Have you considered an external Gfx Card? (eGPU)I'm using 2 Win10 VMs. One for use as a HTPC connected via HDMI to my TV and the other one is for testing and stuff that won't run on linux/unix. But I only got 1 GPU, there are no free PCIe slots and without PCI passthrough of the GPU that Win10 VMs can'T even play a youtube video without stuttering. So I can only use one of the VMs at a time.
The server got no Thunderbolt/USB3.1 and they would be way to expensive anyway. A 19W 20$ GPU would be just fine if you only want some hardware accelerated video decoding or offloading the GUI computation from the CPU. Just stupid that I bought the mATX board with only 3 PCIe slots and not the ATX version with 7 slots. I really could need 6 or 7 PCIe slots.Have you considered an external Gfx Card? (eGPU)
It is apparently not recommended to use the discard option in fstab but better to do periodic trimming using fstrim and cron.you need fstrim in cron, or "discard" option in /etc/fstab mountpoint to get it instantly.
Hi you one of a very few guys that use veracrypt in a proxmox vm.Using discard will always weaken encryption. If you want a strong encryption you can use LVM without thin LVs and ignore the discard. SSDs will work without it and use garbage collection to manage deleted data but you will see a noticable performance impact. I for example really see that with veracrypt on windows. Raid0 of 4 SSDs and I get write speeds of 30-70 MB/s. Without encryption it was way above 1GB/s. At first it was still with encryption fast but the longer I used it, the slower it got.
Did you enable the AES-NI flag in the VMs CPU options so it can make use of the AES accelleration needed for verycrapt?Hi you one of a very few guys that use veracrypt in a proxmox vm.
I have WD Gold HDD (no SSD, no Raid) which is fast as expected when using passthrough (virtio scsi) and no veracrypt.
I also get perfect performance using veracrypt if running on bare metal.
When I encrypt the passthrough disk with veracrypt write performance gets fucking lousy, 20-25 MB/s.
Do you have an idea why this happens?
the combination of veracrypt + passthrough semms not to do well.
This has nothing to do with the discard option.
Yes. The (theoretical) benchmark is awesome.Did you enable the AES-NI flag in the VMs CPU options so it can make use of the AES accelleration needed for verycrapt?