Author Topic: PCIe - SATA3 card choices?  (Read 818 times)

David McKenna

  • Full Member
  • ***
  • Thank You
  • -Given: 9
  • -Receive: 10
  • Posts: 224
    • View Profile
Re: PCIe - SATA3 card choices?
« Reply #15 on: April 03, 2020, 09:45:56 pm »
 Try turning OFF NCQ on the SSD drive. I get better SSD drive performance on my machine that way....

Dariusz Piatkowski

  • Hero Member
  • *****
  • Thank You
  • -Given: 14
  • -Receive: 16
  • Posts: 670
    • View Profile
Re: PCIe - SATA3 card choices?
« Reply #16 on: April 06, 2020, 12:17:53 am »
Hi David,

Try turning OFF NCQ on the SSD drive. I get better SSD drive performance on my machine that way....

Thanks for the suggestion. I did try this approach, but the results actually stayed the same, and these roughly match the throughput I was seeing with DANIS506 drivers with only about 15% improvement overall.

I tried a few other things, such as re-routing the SSD to another port on that AHCI adapter, that did not impact the results.

I then went back to some of my old testing results and noticed a following remark I had made in the SysBench output logs:

"Throughput went up with the use of Dani /PF:3 timing controller settings"

STANDARD TIMING
Code: [Select]
Disk I/O disk 1-2: 238473 MB - Samsung SSD 850 EVO 250GB
   Avg. data access time :       --.---    milliseconds
   Cache/Bus xfer rate   :      125.379    Megabytes/second
   Track 0 xfer rate fwd :      228.815    Megabytes/second
   Middle trk rate fwds. :      231.438    Megabytes/second
   Last track rate bwds. :      217.636    Megabytes/second
   Average Transfer rate :      225.963    Megabytes/second
   Disk use CPU load     :        2.830    percent
   -----------------------------------------------------------------------
   Total                 :       --.---    Disk I/O-marks

REDUCED TIMING
Code: [Select]
Disk I/O disk 1-2: 238473 MB - Samsung SSD 850 EVO 250GB
   Avg. data access time :       --.---    milliseconds
   Cache/Bus xfer rate   :      162.474    Megabytes/second
   Track 0 xfer rate fwd :      231.584    Megabytes/second
   Middle trk rate fwds. :      231.628    Megabytes/second
   Last track rate bwds. :      218.996    Megabytes/second
   Average Transfer rate :      227.403    Megabytes/second
   Disk use CPU load     :        2.920    percent
   -----------------------------------------------------------------------
   Total                 :       --.---    Disk I/O-marks

So it is interesting to note that with the IDE DANIS506 driver's reduced timing mode the cache/bux xfer improved by some 29%.

I do not see any such specifications in the OS2AHCI driver though, although there is a reference there to 'Link Speed' and by default this is set to 'maximum'. Grrh...so little explanation in the drivers docs, or the wiki...can't hurt to test it out though I suppose.

David McKenna

  • Full Member
  • ***
  • Thank You
  • -Given: 9
  • -Receive: 10
  • Posts: 224
    • View Profile
Re: PCIe - SATA3 card choices?
« Reply #17 on: April 06, 2020, 12:52:37 am »
 Dariusz,

 I was surprised to get better performance by turning off NCQ when I did it, so who knows?... might as well try different 'Link Speed' settings and see if anything crops up...

Regards,

Dariusz Piatkowski

  • Hero Member
  • *****
  • Thank You
  • -Given: 14
  • -Receive: 16
  • Posts: 670
    • View Profile
Re: PCIe - SATA3 card choices?
« Reply #18 on: April 06, 2020, 03:22:10 pm »
David, everyone...

... might as well try different 'Link Speed' settings and see if anything crops up...
Regards,

So, here is literally the quote from the OS2AHCI driver doc file:

Code: [Select]
/LS                    Set link speed (default = 0):
                         0 = maximum,
                         1 = limit to generation 1
                         2 = limit to generation 2
                         3 = limit to generation 3

So at first I figured OK, 1 = SATA1, 2 = SATA2 and 3 = SATA3, although given where the standard is today I'm not quite sure how to interpret 0 =...???

Given that my motherboard is SATA2 capable only I enabled /LS:2, that resulted in a tiny throughput increase to get me to 158MB/s. I then tried both /LS:1 (which gave me 90MB/s) and /LS:3 (which gave me about 100MB/s).

So much for that theory. Keep in mind, each change required a re-boot, so things are pretty clean coming back up, unless there is some other register setting somewhere that a soft re-boot does not clear, could be...

Meanwhile, the DANIS506 section I'm comparing it to is this:

Code: [Select]
1) Register access delay:
0 : 1000 ns  (default, fixed for all non-PCI systems)
1 :  500 ns
2 :  250 ns
3 : no delay (works on most systems, check out yourself)

I might toss a ticket in for this but I honestly would not expect anything out of it.

Pete

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 38
  • Posts: 899
    • View Profile
Re: PCIe - SATA3 card choices?
« Reply #19 on: April 06, 2020, 08:49:13 pm »
Hi Dariusz

Which build of os2ahci.add are you using? - the "port #3 interrupt error status: 0x40000001; restarting port" is indicative of the flaky v2.03 driver supplied with ArcaOS5.0.1/5.0.2.

If I am right it could be worth trying either a later driver or the 1.32 build from eCS.


Regards

Pete

Dariusz Piatkowski

  • Hero Member
  • *****
  • Thank You
  • -Given: 14
  • -Receive: 16
  • Posts: 670
    • View Profile
Re: PCIe - SATA3 card choices?
« Reply #20 on: April 06, 2020, 10:45:08 pm »
Hey Pete,

...Which build of os2ahci.add are you using? - the "port #3 interrupt error status: 0x40000001; restarting port" is indicative of the flaky v2.03 driver supplied with ArcaOS5.0.1/5.0.2...
Pete

2.07 from the AOS d/l section.

Doug Bissett

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 52
  • Posts: 1295
    • View Profile
Re: PCIe - SATA3 card choices?
« Reply #21 on: April 06, 2020, 11:01:17 pm »
Quote
Which build of os2ahci.add are you using? - the "port #3 interrupt error status: 0x40000001; restarting port" is indicative of the flaky v2.03 driver supplied with ArcaOS5.0.1/5.0.2.

The latest available (with Arca Noae subscription) is v2.07. The "port #3 interrupt error status: 0x40000001; restarting port" is not an indication of a flaky driver. It is an indication of cheap hardware, that takes it's time initializing. Ignore that. It only happens at boot time.

Quote
So at first I figured OK, 1 = SATA1, 2 = SATA2 and 3 = SATA3, although given where the standard is today I'm not quite sure how to interpret 0 =...???

0 is exactly what it says "fastest" that the hardware is capable of. If your machine supports SATA2, that is probably as fast as it will go. You would only use the other numbers if you have a flaky disk, or a flaky controller. Remember that this is the speed that data flows between the controller, and the device. The device should have a cache, so that is where the data goes, waiting for the hardware to put it to the "disk". An SSD introduces a bunch of variables, that can affect device speed especially when writing (search for the SSD Wiki). Reading is a whole different thing. I don't know if the disk cache is actually used for read.

Os2ahci has two parameters, that I use. One is /n (NCQ), which is useful when the drive needs to move heads to get to data. I don't have a SSD, but I would expect that this setting would not be appropriate for an SSD. The other is /f which enables the device cache (with a whole bunch of words around it). I would think that you would want to use /f. You may want to set these for individual drives, if you have spinning disks, as well as the SSD.

Also, remember that the software cache can affect measurements.

Dariusz Piatkowski

  • Hero Member
  • *****
  • Thank You
  • -Given: 14
  • -Receive: 16
  • Posts: 670
    • View Profile
Re: PCIe - SATA3 card choices?
« Reply #22 on: April 07, 2020, 05:27:15 pm »
Hey Doug!

The latest available (with Arca Noae subscription) is v2.07. The "port #3 interrupt error status: 0x40000001; restarting port" is not an indication of a flaky driver. It is an indication of cheap hardware, that takes it's time initializing. Ignore that. It only happens at boot time.

When I had the DVD drive hooked up to the AHCI port I saw these messages getting posted to the log. In other words, executing multiple 'copy os2ahci$ ahci.log' caused new warnings to show up. Anyways, as I stated earlier on in this thread the issue is resolved by moving the DVD off of the AHCI port.

Quote
So at first I figured OK, 1 = SATA1, 2 = SATA2 and 3 = SATA3, although given where the standard is today I'm not quite sure how to interpret 0 =...???

0 is exactly what it says "fastest" that the hardware is capable of. If your machine supports SATA2, that is probably as fast as it will go...An SSD introduces a bunch of variables, that can affect device speed especially when writing (search for the SSD Wiki)...

So as I previously posted, the problem I have here is that the AHCI controller results are poorer than the comparable IDE results. That appears to be at least partially driven by different optimization/settings the AHCI driver settles on. In this case the default '0 = maximum' setting is clearly slower than the matching DANIS506 settings on that very same device. Which means that the device/bus interface itself is capable of higher throughput BUT with AHCI drivers it is unable to achieve this result.

...Os2ahci has two parameters, that I use. One is /n (NCQ), which is useful when the drive needs to move heads to get to data. I don't have a SSD, but I would expect that this setting would not be appropriate for an SSD...

I do in fact use that on my SSD, the reason being that with SSDs in particular this allows the SSD controller to figure out the best command distribution for the various read/write requests. Without the NCQ being enabled this is strictly driven by the sequential nature of the commands being passed to the SSD from the OS, and in that case our poor ol' OS knows nothing about SSD capabilities.

Doug Bissett

  • Hero Member
  • *****
  • Thank You
  • -Given: 1
  • -Receive: 52
  • Posts: 1295
    • View Profile
Re: PCIe - SATA3 card choices?
« Reply #23 on: April 07, 2020, 05:59:24 pm »
Quote
So as I previously posted, the problem I have here is that the AHCI controller results are poorer than the comparable IDE results. That appears to be at least partially driven by different optimization/settings the AHCI driver settles on. In this case the default '0 = maximum' setting is clearly slower than the matching DANIS506 settings on that very same device. Which means that the device/bus interface itself is capable of higher throughput BUT with AHCI drivers it is unable to achieve this result.

You may have an AHCI controller, that is going south (or isn't SSD friendly). If IDE is better, use it.