Best disk-performance for high-workload database VM

SnoppyFloppy

Explorer
Joined
Jun 17, 2021
Messages
77
Hi

I'm about to deploy a VM dedicated to a database and I want to know how to get the best disk-performance.

Unfortunately I don't have a spare ssd at the moment that I can pass-through so I'm thinking that an iSCSI-share on one of my ssd zpools (raid10-equivalent) seems like the best option.

But I would like a second opinion before I go about with it.

Thanks in advance.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
Generally Databases want lots of IOPS for their logs (and to a lesser extent for the DB itself).

SSDs are far superior to HDDs for IOPS.

If you are running the VM on TrueNAS, why wouldn't you add the disk as a ZVOL directly to the VM rather than iSCSI?
 

hescominsoon

Patron
Joined
Jul 27, 2016
Messages
456
I have a clinet where i have zvols exposed over ISCSI to a hyper-v host directly. The iscsi extents are used for a server 2016 vm, a windows nav 2016 nav vm, and a mssql VM. Performance works very well and is rock stable.
 

ChrisRJ

Wizard
Joined
Oct 23, 2020
Messages
1,919
I'm about to deploy a VM dedicated to a database and I want to know how to get the best disk-performance.
What does that mean in absolute figures? People have vastly(!) different ideas here, so that statement alone does not help much ;-)
 

SnoppyFloppy

Explorer
Joined
Jun 17, 2021
Messages
77
If you are running the VM on TrueNAS, why wouldn't you add the disk as a ZVOL directly to the VM rather than iSCSI?

My thinking is that if I create a dataset rather than a zvol I can adjust the record size to 16K to match the default page size of the DB which afaik can't be done on a zvol. So as I see it, there's basicly three options and I don't know which performes best for a DB:
1) optimized dataset + iSCSI
2) optimized dataset + NFS
3) un-optimized zvol + mount

What does that mean in absolute figures?

I cant tell you. I just want to get the pest possible performance out the hardware at hand.
 

fahadshery

Contributor
Joined
Sep 29, 2017
Messages
179
My thinking is that if I create a dataset rather than a zvol I can adjust the record size to 16K to match the default page size of the DB which afaik can't be done on a zvol. So as I see it, there's basicly three options and I don't know which performes best for a DB:
1) optimized dataset + iSCSI
2) optimized dataset + NFS
3) un-optimized zvol + mount



I cant tell you. I just want to get the pest possible performance out the hardware at hand.
you can try phoronix-test-suite benchmarks
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
My thinking is that if I create a dataset rather than a zvol I can adjust the record size to 16K to match the default page size of the DB which afaik can't be done on a zvol.
When you create a ZVOL, you have the option to select the block size... I wouldn't call that "can't be done".

Of course a block device is then formatted with its own filesystem which may match (or not) that block size, so you need to think about that based on the filesystem chosen.
 
Last edited:
Top