Author Topic: DANIS506 - SATA III capable or not?  (Read 5933 times)

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
DANIS506 - SATA III capable or not?
« on: February 02, 2021, 06:34:37 pm »
Alright...so maybe this whole point I am about to make and therefore this post are pointless, but it is sort of bothering me so I'd like to understand whether the results I'm seeing are due to my specific hardware (which is a bit dated, circa 2010/2011) or are they due to some assumptions our equally dated software holds.

So the big Q: is the DANIS506 driver SATA III (6G/s) aware? Is it 66MHz PCI-bus aware? Is it smart enough to ramp up device timings to max out the usable hardware capabilities?

Why am I asking?

Well, I recently picked up a Samsung 860 Evo 500G on sale ($65 Canuck, man can't go wrong with that price!). I already have the 850 Evo in my rig and the sustained disk xfer rates bumped up to a steady 400M/s once I deployed it in a SATA III capable motherboard (previously in SATA II mode they would max out around 250M/s or thereabouts). Having said that, the cache/bus rates never really got any higher than 200 (based on previous tests) and really for reasons un-known to me today they are about 150-155M/s.

Here is an example of a test run:
Code: [Select]
Disk I/O disk 0-2: 238473 MB - Samsung SSD 850 EVO 250GB
   Avg. data access time :       --.---    milliseconds
   Cache/Bus xfer rate   :      155.318    Megabytes/second
   Track 0 xfer rate fwd :      395.163    Megabytes/second
   Middle trk rate fwds. :      400.412    Megabytes/second
   Last track rate bwds. :      367.077    Megabytes/second
   Average Transfer rate :      387.551    Megabytes/second
   Disk use CPU load     :        3.740    percent
   -----------------------------------------------------------------------
   Total                 :       --.---    Disk I/O-marks

Bottom line being: it feels like the DANIS506 drivers allowed for higher performance when deployed to capable hardware.

Good enough...so off I go to install the new 860 Evo, find a SATA connector, yup, all good.

I boot up and run SysBench, now that shows the following results for my new 860 SSD:
Code: [Select]
Disk I/O disk 1-4: 476938 MB - Samsung SSD 860 EVO 500GB
   Avg. data access time :       --.---    milliseconds
   Cache/Bus xfer rate   :      407.757    Megabytes/second
   Track 0 xfer rate fwd :        8.146    Megabytes/second
   Middle trk rate fwds. :      405.977    Megabytes/second
   Last track rate bwds. :      401.950    Megabytes/second
   Average Transfer rate :      272.024    Megabytes/second
   Disk use CPU load     :        4.060    percent
   -----------------------------------------------------------------------
   Total                 :       --.---    Disk I/O-marks

I'm not complaining, I know the 860 is faster than 850, but boy that cache/bux xfer rate is really a night and day type of a difference.

So off I went digging a little deeper into this.

1) DANIS506 device driver info for the SSD devices

Here is what the boot-up screen reports:
Code: [Select]
R1.8.15      /VLL /LPM:3 /APM:254 /PF:3
            Daniela's Bus Master IDE Driver for OS/2 Version 1.8.15
Controller:0  Port:9000 IRQ:13  Status:OK BusMaster Scatter/Gather
  ATI IXP SATA host (1002:4390 rev:40) on PCI 0:17.0#0
 Unit:0 Status:OK LBA BusMaster no speed BPB
  Model:Samsung SSD 850 EVO 250GB               EMT03B6Q
   OS2:log   phys   BPB/BIOS   IDE:log   phys     Total Sectors
  C  30401  65535                65535  16383   Avail  488397168
  H    255     16        255        16     16   OS2    488392065
  S     63     63         63        63     63   % Used     99.99

and

Code: [Select]
Controller:1  Port:7000 IRQ:13  Status:OK BusMaster Scatter/Gather
  ATI IXP SATA host (1002:4390 rev:40) on PCI 0:17.0#1
 Unit:0 Status:OK LBA BusMaster no speed BIOS
  Model:Samsung SSD 860 EVO 500GB               RVT04B6Q
   OS2:log   phys   BPB/BIOS   IDE:log   phys     Total Sectors
  C  60801  65535                65535  16383   Avail  976773168
  H    255     16        255        16     16   OS2    976768065
  S     63     63         63        63     63   % Used     99.99

...but lo and behold, the driver says "BusMaster no speed BPB", instead of providing some kind of a spec, and I honestly was expecting to see a 6.0GBit/s SATA III listed here.

2) DANIS506 device driver info for one of my traditional HDD devices (WD VelociRaptor)

Code: [Select]
Unit:1 Status:OK SMS:16 LBA NL:126 BusMaster 3.0GBit/s BPB
 Model:WDC WD3000HLFS-01G6U0                   04.04V01
  OS2:log   phys   BPB/BIOS   IDE:log   phys     Total Sectors
 C  36481  65535                65535  16383   Avail  586072368
 H    255     16        255        16     16   OS2    586067265
 S     63     63         63        63     63   % Used     99.99

Here you can clearly see the device being recognized as a BusMaster capable 3.0GBit/s drive.

Alright, so I went to DiskInfo utility and ran 'diskinfo 0m cviI' to pull the numbers for both devices, here is the kicker:

1) 850 Evo
Code: [Select]
0/m: Samsung SSD 850 EVO 250GB                EMT03B6QR S3PZNF0JB03446T
Port 9000/8002, Irq 19, SATA, Busmaster, PIO4, Ultra DMA6

ATA device, with non-removable media
        Model Number:       Samsung SSD 850 EVO 250GB
        Serial Number:      S3PZNF0JB03446T
        Firmware Revision:  EMT03B6Q
        Transport:          Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5
Standards:
        Used: unknown (minor revision code 0x0039)
        Supported: 9 8 7 6 5
        Likely used: 9

Capabilities:
        LBA, IORDY(can be disabled)
        Queue depth: 32
        Standby timer values: spec'd by Standard, no device specific minimum
        R/W multiple sector transfer: Max = 1   Current = 1
        DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
             Cycle time: min=120ns recommended=120ns
        PIO: pio0 pio1 pio2 pio3 pio4
             Cycle time: no flow control=120ns  IORDY flow control=120ns

Commands/features:
        Enabled Supported:

           (bunch of stuff deleted)

           *    SATA-I signaling speed (1.5Gb/s)
           *    SATA-II signaling speed (3.0Gb/s)
           *    unknown 76[3]
           *    Native Command Queueing (NCQ)
           *    Phy event counters
           *    unknown 76[15]

2) 860 Evo
Code: [Select]
1/m: Samsung SSD 860 EVO 500GB                RVT04B6QR S598NJ0NA33886X
Port 7000/6002, Irq 19, SATA, Busmaster, PIO4, Ultra DMA6

ATA device, with non-removable media
        Model Number:       Samsung SSD 860 EVO 500GB
        Serial Number:      S598NJ0NA33886X
        Firmware Revision:  RVT04B6Q
        Transport:          Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5
Standards:
        Used: unknown (minor revision code 0x005e)
        Supported: 11 8 7 6 5
        Likely used: 11

Capabilities:
        LBA, IORDY(can be disabled)
        Queue depth: 32
        Standby timer values: spec'd by Standard, no device specific minimum
        R/W multiple sector transfer: Max = 1   Current = 1
        DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
             Cycle time: min=120ns recommended=120ns
        PIO: pio0 pio1 pio2 pio3 pio4
             Cycle time: no flow control=120ns  IORDY flow control=120ns

Commands/features:
        Enabled Supported:

           (bunch of stuff deleted)

           *    SATA-I signaling speed (1.5Gb/s)
           *    SATA-II signaling speed (3.0Gb/s)
           *    unknown 76[3]
           *    Native Command Queueing (NCQ)
           *    Phy event counters
           *    unknown 76[15]

Both drives appear to be ONLY recognized as SATA-II, although both show "unknown 76[3]", which I suspect may in fact indicate a SATA-III capability.

And that is only part of the story.

Daniela wrote a pretty awesome device driver, and the DOCs she published were equally impressive. So I went looking at what may be causing this result. Eventually I focused on the PCI bus clock rate where the driver README has a pretty extensive section dealing with some adjustability. Back in the day the standard PCI clock was 33MHz, but some chipsets differed, so the /PCI parameter provides a way to deal with this.

Now with PCI 2.1 a 66MHz bus-clock was introduced, and your hardware will announce this to the driver if need be. In fact, runng PCI scan here produces the following stats for the SATA controller:

Code: [Select]
Bus 0 (PCI Express), Device Number 17, Device Function 0
Vendor 1002h Advanced Micro Devices, Inc. [AMD/ATI]
Device 4390h SB7x0/SB8x0/SB9x0 SATA Controller [IDE mode]
Command 0107h (I/O Access, Memory Access, BusMaster, System Errors)
Status 0230h (Has Capabilities List, Supports 66MHz, Medium Timing)
Revision 40h, Header Type 00h, Bus Latency Timer 40h
Self test 00h (Self test not supported)
Cache line size 64 Bytes (16 DWords)
PCI Class Storage, type IDE (ATA)
PCI EIDE Controller Features :
  BusMaster EIDE is supported
  Primary   Channel is in native mode at Addresses 0 & 1
  Secondary Channel is in native mode at Addresses 2 & 3
Subsystem ID 76401462h Unknown
Subsystem Vendor 1462h Micro-Star International Co., Ltd. [MSI]
Address 0 is an I/O Port : 9000h..9007h
Address 1 is an I/O Port : 8000h..8003h
Address 2 is an I/O Port : 7000h..7007h
Address 3 is an I/O Port : 6000h..6003h
Address 4 is an I/O Port : 5000h..5007h
Address 5 is a Memory Address (0-4GiB) : FE4FF000h..FE4FF3FFh
System IRQ 19, INT# A
New Capabilities List Present:
  Message Signalled Interrupt Capability
    MSI is disabled
    MSI function can generate 64-bit addresses
  Unknown Capability (Code 12h)!!
  Unknown Capability (Code 13h)!!

The interesting part in the above is: "Status 0230h (Has Capabilities List, Supports 66MHz, Medium Timing)".

My interpretation of this says that the SATA controller is capable of executing at 66MHz PCI bus clock.

As such this begs the question: does the DANIS506 driver know anything about this capability, and if so, does it do anything with it? After all, if the hardware capability is there I sure want to use it.

Tying this back to my main point at the start of the post: is DANIS506 driver smart enough to adjust to the faster SATA-III and/or 66MHz bus timings?

Further on, has anyone else experimented with different /PCI values to account for the faster PCI bus clocks?

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: DANIS506 - SATA III capable or not?
« Reply #1 on: February 02, 2021, 08:36:29 pm »
The DANI driver was written for IDE, and while extended for some types of SATA, I wouldn't expect it to handle SATA III properly.
That is why we have an AHCI driver, which should work much better, especially when setup correctly for queuing and such.
On my MB, probably about the same age, I don't even bother with the DANI driver as everything is SATA.

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
Re: DANIS506 - SATA III capable or not?
« Reply #2 on: February 02, 2021, 10:54:17 pm »
I'm with Dave. If the controller is SATA capable, and it actually supports SATA in AHCI mode (some very old ones don't), use the AHCI driver. Why would you would even consider doing otherwise?

Just add the OS2AHCI driver to config.sys (before the Dani driver), then go to BIOS, and set it to use AHCI. I use the "/N /F" parameters, on every SATA capable machine (including VBox), but you may want to see if it works before adding parameters.

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: DANIS506 - SATA III capable or not?
« Reply #3 on: February 03, 2021, 02:21:52 pm »
Dave and Doug,

The two of you made some excellent points, so here is my take on this.

1) AHCI benefits are
- NCQ, this is a BIG ONE, probably less important with the SSD, although the literature out there suggests this still applies
- ease of system configuration, meaning my BIOS SATA1..2..3 connectors readily map to HD1, HD2, HD3, etc...
- auto configuration of the device timings, so whatever SATA-1, 2 or 3 level device you have, this is left up to the hardware (controller itself) to negotiate, it is no longer the device driver's responsibility

2) AHCI disadvantages (specific to our platform and my hardware)
- AOS clearly states that in cases where DANI drivers correctly recognize the controller hardware they will provide better performance, this is the case here as my throughput is actually higher with DANI drivers while the CPU utilization is lower, as in 3-4% vs 18-20%
- NCQ functionality is broken on my hardware, there are sporadic hangs of the whole system, eventually the machine just locks up, the minute I disable NCQ this goes away

I could log an issue for the NCQ problem, but AOS policy is that the system configuration needs to be of an approved type, meaning a full AOS install. That is simply not the case for me, nor is it about to change, so that approach seems like a dead-end.

You know, for what it's worth I should toss this one into their mix. The benefit being that even if they do not work on my specific issue it'll at least be a record of such a problem, which hopefully makes it easier should someone else encounter the very same symptom.

In the meantime I think I'm going to go back to DANI and see what the /PCI parameter provides as far as adjustability to the newer hardware.

Thanks guys!
« Last Edit: February 03, 2021, 05:44:32 pm by Dariusz Piatkowski »

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4786
  • Karma: +99/-1
    • View Profile
Re: DANIS506 - SATA III capable or not?
« Reply #4 on: February 03, 2021, 04:34:32 pm »
Interesting that AOS recommends Danis's drivers if possible, I missed that.
For testing, why don't you create another proper install, test on that and consider opening an issue using that install. It is basically what I do if opening an issue as while my usual installs are not using anything they shouldn't, they're messy and crufty.
As a tester you should be doing something similar anyways, install a beta, do a bit of setup, spend an hour or whatever testing, then back to your usual customized install.

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: DANIS506 - SATA III capable or not?
« Reply #5 on: February 03, 2021, 05:48:48 pm »
Dave,

...For testing, why don't you create another proper install, test on that and consider opening an issue using that install. It is basically what I do if opening an issue as while my usual installs are not using anything they shouldn't, they're messy and crufty...

You are right on the money there. This is something that's been in my plans for a while, especially since the component specific testing can only cover so much. I suppose one can consider that an acceptable amount of overhead given that the overall solution (that being a full AOS release) brings so much more value to out platform.

Now that I'm going to free up a drive soon I will have the ability to actually dedicate something to a true hardware testing platform, which on it's own is kind of exciting anyways!  ;)