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

David McKenna

  • Hero Member
  • *****
  • Posts: 742
  • Karma: +24/-0
    • 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
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • 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

  • Hero Member
  • *****
  • Posts: 742
  • Karma: +24/-0
    • 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
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • 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
  • *****
  • Posts: 1281
  • Karma: +9/-0
    • 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
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • 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
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • 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
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • 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
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • 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.

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: PCIe - SATA3 card choices?
« Reply #24 on: July 12, 2020, 04:04:46 pm »
Folks!

A quick follow-up on my part regarding this. So I took some time to spot a reasonably priced SATA3 PCI-E add-on card, less than $10. Took a while longer to actully receive it, yup all the way from China..lol.

Anyways, the point is it runs the HighPoint Rocket 620 firmware and it is a Marvell chipset (PCI ID 9125).

In order to get my OS/2 box to even boot I had to remove the following snoopers (nearly everything that was in the SNOOP.LST file):
ipsraid.snip
pcmci.snp
netdet2.snp
parallel.snp
mouse.snp
serial.snp
pcibus.snp

...but at least that got me to a booting OS/2 box where the main drive (boot drive only) was hooked up to that SATA3 card.

So what are the results????

Well, here is a quick BEFORE & AFTER:

1) BEFORE, this is the SATA2 controller on my motherboard
Code: [Select]
Hard disk 2: 255 sides, 30401 cylinders, 63 sectors per track = 238472 MB
Drive cache/bus transfer rate: 119363 k/sec
Data transfer rate on cylinder 0   : -208938 k/sec
Data transfer rate on cylinder 30399: 198222 k/sec
CPU usage by full speed disk transfers: 22%
Average data access time: Disk read error.
Multithreaded disk I/O (4 threads): 113654 k/sec, 28% CPU usage

2) AFTER, this is the SATA3 controller on the adapter card
Code: [Select]
Hard disk 4: 255 sides, 30401 cylinders, 63 sectors per track = 238472 MB
Drive cache/bus transfer rate: 117574 k/sec
Data transfer rate on cylinder 0   : 171576 k/sec
Data transfer rate on cylinder 30399: 167781 k/sec
CPU usage by full speed disk transfers: 3%
Average data access time: Disk read error.
Multithreaded disk I/O (4 threads): 107815 k/sec, 3% CPU usage

So certainly on this hardware alone the built-in stuff is better, even with the 28% CPU utilization on the Multithreaded test (plenty of CPU power here).

OK, that's all, just wanted to give everyone else some real concrete BEFORE & AFTER metrics.

Cheers al!

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: PCIe - SATA3 card choices?
« Reply #25 on: November 18, 2020, 04:29:47 pm »
So I figured a final (most likely) update re: how the underlying hardware platform impacts the final performance. Yeah, I mean we all know and get it, but in my case I have now tested 3 separate hardware solutions so it's kind of neat to see the difference (or lack thereof).

Anyways, without further ado, I now have the MSI 890FXA-GD70 board up and running...ha ha..."upgrade" eh? Well, it's ancient history by today's hardware standard; yes, the Ryzen stuff is still out there, but if you recall I was looking to max out the performance of my Samsung 850 SSD, and it being a SATA3 drive and being held-back by my SATA2 interface on the previous motherboard clearly wasn't allowing me to do so.

So the new board sports a SATA3 interface, it also finally lets me boot my Phenom II X6 CPU with the full 6-cores up and running (separate post on that b/c I'm seeing continuous CPU spikes).

1) SysBench results for the SSD
Code: [Select]
Disk I/O disk 0-2: 238473 MB - WSamsung SSD 850 EVO 250GB
   Avg. data access time :       --.---    milliseconds
   Cache/Bus xfer rate   :      206.859    Megabytes/second
   Track 0 xfer rate fwd :      387.066    Megabytes/second
   Middle trk rate fwds. :      392.029    Megabytes/second
   Last track rate bwds. :      369.462    Megabytes/second
   Average Transfer rate :      382.853    Megabytes/second
   Disk use CPU load     :       14.320    percent
   -----------------------------------------------------------------------
   Total                 :       --.---    Disk I/O-marks

2) diskio results
Code: [Select]
DISKIO - Fixed Disk Benchmark, Version 1.18z
(C) 1994-1998 Kai Uwe Rommel
(C) 2004 madded2

Number of fixed disks: 6
Number of CD-ROM drives: 1

Dhrystone 2.1 C benchmark routines (C) 1988 Reinhold P. Weicker
Dhrystone benchmark for this CPU: 3060618 runs/sec

Hard disk 2: 255 sides, 30401 cylinders, 63 sectors per track = 238472 MB
Drive cache/bus transfer rate: 130038 k/sec
Data transfer rate on cylinder 0   : -105937 k/sec
Data transfer rate on cylinder 30399: -128616 k/sec
CPU usage by full speed disk transfers: 38%
Average data access time: Disk read error.
Multithreaded disk I/O (4 threads): Disk read error.
3 k/sec, 27% CPU usage

So diskio is a little off (problems with the hardware speed I think), but SysBench does show some clear improvement. I think the results are in-line with what one might expect from a SATA2 to SATA3 move for a storage device that is capable of utilizing that speed.
« Last Edit: November 18, 2020, 04:47:37 pm by Dariusz Piatkowski »