Setup Advice

Adam86

Active Member
Jul 11, 2018
19
1
43
Good morning,

I wondered if anyone could give me some input on my Proxmox Setup that I have been running since January. I just want to make sure that I have the best possible configuration for our hardware. This will probably be quite a long post but there are three machines involved, two of them have pretty much the same hardware and setup intentions - well they all do really, just one of them is a proper server with a proper RAID Controller.

Basically my reason for setting up Proxmox was that me and my family all used to use MediaPortal as a full media centre solution. We used a custom build which made the TV side play nicer with Freesat over here in the UK and gave Series Link capability. Unfortunately that plugin stopped working in the new year as it used Sky's EPG feed and they changed something and the creator of the plugin has long moved on. I found an ideal solution which was TVHeadend but this only runs on a Linux environment. We didnt want to run any additional PC hardware, and we already had some KODI boxes that were never used to their potential so now was an opportunity to start using these fully. Initially I tried ESX, but passing the tuner device through into a VM never worked right at all. Hence I came across Proxmox and saw that it could do LXC containers and I could essentially make the tuner device available into that container.

So on all our machines I did the following configuration:

Installed Proxmox onto a SATA HDD
Added an SSD and created an LVM-Thin pool by creating a volume group:
Code:
sgdisk -N 1 /dev/sdb
vcreate --metadatasize 250k -y -ff /dev/sdb1
vgcreate ssd-storage /dev/sdb1
lvcreate -L 110G -T -n ssd-storage ssd-storage
Created a Windows VM and passed through 3TB hard drive directly into the VM - this is because all our data was already on this drive and this is where we store all media and I setup the LXC container to CIFS mount onto this drive for TV Recordings.

This is my current Windows VM configuration:
Code:
agent: 1
bios: ovmf
bootdisk: scsi0
cores: 4
cpu: host
efidisk0: ssd-storage:vm-102-disk-1,size=4M
memory: 6144
name: media-tc
net0: virtio=E2:09:B7:3C:7A:F1,bridge=vmbr0
numa: 0
onboot: 1
ostype: win10
scsi0: ssd-storage:vm-102-disk-2,backup=0,cache=writeback,discard=on,size=40G
scsi2: local-lvm:vm-102-disk-1,backup=0,cache=writeback,discard=on,size=300G
scsihw: virtio-scsi-pci
smbios1: uuid=dd0b3813-b238-475c-a7da-2db1d4e8d080
sockets: 1
startup: order=2,up=60
virtio1: /dev/disk/by-id/ata-HITACHI_HUA723030ALA640_YHHVYUUA,backup=0,cache=writeback,size=2930266584K

I noticed that my LVM-Thin storage was not shrinking when files were deleted on either the ssd-storage or local-lvm - after doing some reading I found that discard=on had to be enabled so the SSD's would trim. I found the space didnt come back on the local-lvm as well, so I enabled discard on that too which appears to be working on both LVM pools now. Is this the right/recommended configuration?

I also found that when the 3TB drive was passed through as a scsi device, Windows recognized it as a thin provisioned drive and no defrag options were available. Presenting it as virtio device Windows recognizes it as a HDD and appears to run a proper defrag. Is this the recommended configuration for passing through a hard drive into a VM?

Two of these machines all drives are just connected via the motherboard SATA ports. What would the recommended cache option be for this? Currently set to writeback as you can see and it does seem to provide best performance, but I am not sure if this is the best option.

Lastly my other machine is a proper server with a hardware RAID Controller with 1GB Cache but I've set it up pretty much the same as above, but the the drives are setup as:

RAID1 SATA HDD Proxmox Install
RAID0 SSD LVM-Thin
RAID5 4x3TB SATA HDD

All VD's currently are set to:

Read Policy: Read Ahead
Write Policy: Write Back
Disck Cache Policy: Enabled

What would the best configuration be for these policies? and what would the best configuration be for the virtual disks on the VM's?

Sorry it's a really long post, but hopefully someone can provide some insight for me as I want to get the best out of the installations I have.

Cheers
Adam
 
Is there really no one who can offer some setup advise for this situation?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!