Jump to content
XPEnology Community
  • 0

Passing-Through SATA Controller


gadreel

Question

@flyride@Peter Suh

Hi, I have Unraid which comes with KVM. I have an HBA with 8 SATA ports and the motherboard has 4 additional SATA ports.

 

At the moment I do not pass-through either the HBA nor the Motherboard SATA Controller.

 

I have a DS918+ with 2x 6TB WD Red and 2x 1TB 970 EVO SSDs and I am passing-through the entire drives to a virtual SATA controller(s). Recently I came to the possession of a X550 10Gbe and I realize that the SATA paravirtualization is rubbish. The write speeds especially for the SSDs are very slow 130/150 MB/s.

 

1) I was wondering if I pass-through the Motherboard SATA controller will I get better write speeds?

2) If the above is correct, when I build a new loader with the MB SATA Controller the DSM will ask me to reformat the drives or continue as it was? (I know always keep backup but in theory will it work?)

3) I am missing something else?

Edited by gadreel
Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0

970 EVO is a NVMe SSD, not SATA.  So I don't understand how passing through a motherboard SATA controller will be helpful.  There is no way to physically connect a NVMe disk to a SATA controller. The question of whether the drives will need to be reformatted is therefore irrelevant.

 

I'm not sure how Unraid works, but with ESXi, publishing an NVMe drive via RDM can emulate whatever is needed - attaching it via virtual SATA controller works and it will perform at rated speed.  Maybe that is essentially what you are doing with Unraid.  If so maybe consider ESXi as an alternative, purely for performance reasons.

Link to comment
Share on other sites

  • 0

@flyride Apologies. It's 1TB 870 QVO :)

 

Neither do I understand how KVM works all I know is that with the KVM virtual SATA Controller and passing-trough the drives they are slow.

 

The way it works now is that the drives are visible in Unraid OS and I am passing through individual drives to DSM. If I pass-through the Motherboard SATA controller then the drives wont be visible in Unraid ('it's not a problem). The SMART values etc will be handled by DSM. In theory since I am passing-through the SATA controller not a Virtio SATA controller the speeds should be the rated one.

 

Well I can give it a go later tonight... for me it's important to know how the DSM will react with the new SATA Controller? It will boot up and report both volumes as corrupted?

For example if you had a DS918+ with 4 drives inside and you moved the drives to another DS918+ or DS3622xs+ how the DSM handle them? They will appear as corrupted? It will ask you to migrate or if the array is valid they will just work?

 

 

Edited by gadreel
Link to comment
Share on other sites

  • 0

Ok, so you are indeed describing attaching physical drives to a virtual controller, then presenting the same drives connected to a passthrough SATA>

 

I would expect the individual drives to be recognized with no issue. The only reason that it would not be the case is if the virtualization translated the disk in some way (i.e. a virtualization wrapper or size change).

 

Migration prompt occurs with the version/SN/loader does not match the last boot.  Moving the drives from one functional controller to another won't prompt a migration.  It should just boot.

Link to comment
Share on other sites

  • 0
37 minutes ago, flyride said:

Ok, so you are indeed describing attaching physical drives to a virtual controller, then presenting the same drives connected to a passthrough SATA>

 

I would expect the individual drives to be recognized with no issue. The only reason that it would not be the case is if the virtualization translated the disk in some way (i.e. a virtualization wrapper or size change).

 

Migration prompt occurs with the version/SN/loader does not match the last boot.  Moving the drives from one functional controller to another won't prompt a migration.  It should just boot.

The visualisation wrapper I think is the one I have now. Because in DSM the Disks appear as QEMU HARD DISK...  and not the actual hard disk names. Unless this not what you mean. 

 

Now if I pass the physical SATA controller I should see the actual HD names.

 

Thank you @flyride for the helpful information.

Link to comment
Share on other sites

  • 0

If the drives are accessible to the hypervisor as backing storage, you format them within the hypervisor, create a filesystem, then a virtual disk file within that, then finally assign that virtual disk to a virtual controller - that is not a drive passthrough.  It is just a virtual disk you have attached to a VM.  That will not survive moving to a physical SATA controller passthrough.

Link to comment
Share on other sites

  • 0

No no no.

 

As you can see from the image below, this is how the drives look in Unraid.

The Unraid Drives have nothing to do with DSM and I wont bored you with the details.

At the bottom we have the "Unassigned Drives", by the name you understand that are drives that are not assigned to Unraid at them moment.

 

The next image is how you pass-through those Unassigned Physical Drives into a VM.

 

You just write the Physical Disk ID from the Unraid OS/Linux. The "vDisk Bus: SATA" is the SATA Virtual Controller that I currently use I have the option for "Virtio, ISCSI and SATA". Then these drives on DSM will appear as QEMU HARD DISKS...

 

What I believe is, if I pass-through the Physical SATA Controller then these drives will not appear in the "Unassigned Devices" and also in the VM I will NOT set the IDs I will just pass through the PCI ID of the SATA Controller and then Tiny Core will detect the AHCI with the connected 4 drives.

 

I hope now is more clear. :)

 

Unraid.thumb.png.36b34a74b73bc7a61ba2cb3d5680e3e0.png

 

 

xml.thumb.png.ebc9fa9a7706149f3a2e5ff41db8059d.png

Edited by gadreel
Link to comment
Share on other sites

  • 0

That looks equivalent to ESXi's RDM (raw device mapping) service.

Based on what you have posted, I would expect DSM not to see any difference for the 870 QVO drives when connected to a passthrough physical SATA controller.

 

14 minutes ago, gadreel said:

What I believe is, if I pass-through the Physical SATA Controller then these drives will not appear in the "Unassigned Devices" and also in the VM I will NOT set the IDs I will just pass through the PCI ID of the SATA Controller and then Tiny Core will detect the AHCI with the connected 4 drives.

 

Agreed.

Link to comment
Share on other sites

  • 0

@flyride

I do not know what is going on. The same results :(

 

Look at this pathetic speeds. I have no idea what is going on, even though now the SSDs are pass-through the Physical SATA controller.

 

Any ideas? :( Is this related to RAID1? DSM trying to write the data on both drives?

 

 

image.png.f4255fcce2c430f529e529bc561bdfad.png

 

image.thumb.png.ccc786f5390912f1d98c7ba1e0572b1c.png

Edited by gadreel
Link to comment
Share on other sites

  • 0

What are you copying from?  Many small files will not get a drive up to rated speed.

Are you sure you are supplying from 10GBe?

 

Check the raw read on the device first, hdparm -t /dev/sdX

 

Then maybe look at a disk to disk copy from the command line without using the network.

Link to comment
Share on other sites

  • 0
53 minutes ago, flyride said:

What are you copying from?  Many small files will not get a drive up to rated speed.

Are you sure you are supplying from 10GBe?

 

Check the raw read on the device first, hdparm -t /dev/sdX

 

Then maybe look at a disk to disk copy from the command line without using the network.

 

I am copying really big files like 45GB 4k movies. Definitely the connection is 10GBe. In the network interface I see 10000 duplex.

I am transferring through SMB from my PC to the NAS. Some times it starts like 530MB/s and then drops to 80MB/s.

 

I do not know if a disk to disk copy will help since I have 4 drives. 2 mechanical and 2 SSDs. The mechanical drives wont reach speeds over 120/140Mb/s. If I had another SSD I could try...

 

With iPerf3 I get 5Gigabits...

 

I think the sdg and sdh are the SSDs since they are drives 7 and 8.

 

root@DS918Plus:~# hdparm -t /dev/sdg

/dev/sdg:
 Timing buffered disk reads: 876 MB in  3.00 seconds = 291.70 MB/sec
root@DS918Plus:~# hdparm -t /dev/sdh

/dev/sdh:
 Timing buffered disk reads: 984 MB in  3.01 seconds = 326.96 MB/sec
root@DS918Plus:~# hdparm -t /dev/sdi

/dev/sdi:
 Timing buffered disk reads: 488 MB in  3.00 seconds = 162.52 MB/sec
root@DS918Plus:~# hdparm -t /dev/sdj

/dev/sdj:
 Timing buffered disk reads: 484 MB in  3.00 seconds = 161.29 MB/sec

 

Edited by gadreel
Link to comment
Share on other sites

  • 0
38 minutes ago, gadreel said:

Some times it starts like 530MB/s and then drops to 80MB/s.

 

You didn't mention that part.  The write penalty on a QLC NAND drive is very high.

 

https://www.firstpost.com/tech/news-analysis/samsung-870-qvo-sata-ssd-review-possibly-the-best-qlc-drive-you-can-get-but-it-isnt-for-everyone-9145371.html#:~:text=The Samsung 870 QVO is a QLC NAND SSD with,within that 42 GB cache.

 

"The Samsung 870 QVO is a QLC NAND SSD with a SATA interface. The unit I received is the 1 TB variant. It has a 1 GB of DRAM cache and about 42 GB of SLC cache. Samsung rates the read/write speeds of the drive at around 550 MB/s, but neglects to mention that you’ll only get these speeds within that 42 GB cache. Once the cache is saturated, speeds drop to about 50 MBps for mixed data, and 110 MB/s for large files"

  • Like 1
Link to comment
Share on other sites

  • 0

I see... I think for me it drops before the 42GB cache but I believe it makes sense now.

 

The only happy part of this journey is that now I divided my Unraid drives to the HBA card and the DS918+ drives to the Motherboard Sata Controller.

I hope now that DSM has control over those 4 drives the HDD hibernation might work to save some energy :D.

 

Thank you @flyride for your support.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   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.

×
×
  • Create New...