Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


deomsh

Smartdrive Revisited: Sata drives in MSdos compatibility mode

Recommended Posts

My latest motherboard gives my Sata drives ONLY in MSdos compatibility mode. I have four Sata connectors and one Ide connector. In bios Sata-drives are set in IDE mode.

A fresh Windows 98se install (with setup /p i) gives two conflicting IDE controllers in Device Manager. After disabling during install in safe mode the IDE controller without the IDE-drives, Sata drives are running in MSdos compatibility mode, but slow of cause. Instead of trying RLoew's Sata patch I thougt: let's try Smartdrive...... I was lucky, works great! 

For a few weeks I experimented a lot with Smartdrive-switches, and I'de like to share my findings and ask some questions. Best source of Smartdrive-switches is still an old article from MDGX: 'Outsmart Smartdrive'  http://www.mdgx.com/newtip2.htm

  • Without Smartdrive copying a 500MB-file between two fully defragmented different drives gives copy-speed about 8 MByte per second, with Smartdrive and optimal settings I reached 20 MB/s. Drives are in Sata II mode (In Sata I mode max. 16 2/3 MB/s).
  • Read-speed improvement seems to be even better, but I cannot measure it directly with my stopwatch. According to Chrystal Disk Mark 9x, sequential Read-speed is 388% and write-speed 168%, ratio's with Smartdrive/without.
  • Most important Smartdrive-switch is the read ahead Buffer size. According to MDGX the maximum is 64k, but I cannot reproduce this. Maximal read ahead Buffer size I reached is 32k.
  • Different Windows read ahead buffer sizes doesn't make any difference, even without Smartdrive. 
  • Smartdrive Cache size is a bit of a strange story. There is a trade-off between Smartdrive Cache and Vcache settings. I never realised Vcache is also working on drives running in MSdos compatibility mode. The combination minimal Smartdrive Cache size: 32 (kbyte), and Vcache size: MaxFileCache=131072 (128MB) is roughly equivalent with the combination Smartdrive cache: 256 and minimal Vcache size: MaxFileCache=32 (Kbyte).
  • Smartdrive Cache size above 10240-11264 (10-11MB) gives big problems inside Windows 98se: no Long File Names anymore, problems starting explorer and empty Icons.
  • Smartdrive Cache deminishes the memory reported in Device Manager.
  • Element size is not important for speed, so default value 8192 byte is ok (also maximum I reached, although according to MDGX the maximum Element size is 64k).
  • Smartdrive Write-behind caching is more important, it gives a few MB/s copy-speed improvement, Vcache write-behind caching gives only a small improvement.
  • Small drawback: during copying slow mouse/keyboard behaviour.
  • With Smartdrive SDVXD is not as usual unloaded after boot, according to Bootlog.txt.
  • Also really big speed improvement in safe mode when starting safe mode with 'Win /d:m'

If you like to test, start with: 'Smartdrv /b:32768' in your Autoexec.bat, after path statement.

Some Questions:

  • Can someone explain this speed improvement?
  • Is Windows 98se read ahead buffer not active for drives running in MSdos compatibility mode?
  • What is SDVXD 'doing' (can't find any usefull information)?
  • Are there any risks using Smartdrive inside Windows?
  • Like 1

Share this post


Link to post
Share on other sites

Caching will provide an improvement over not having a Cache, particularly if the same Sectors are being reread.

Since Compatibility Mode uses the Real Mode Mapper to access the Disk, you do not get most support from the Windows 9x subsystems.
Performance will still not be comparable to Full 32-Bit Mode.

Safe Mode puts everything in Compatibility Mode.

There is a design flaw in SmartDrive that limits a Partition to 137GB in DOS or Windows. Corruption can occur on larger Partitions.

Share this post


Link to post
Share on other sites

I wasn't aware of the 137GB limitation, thanks a lot for your info! I am still using <137GB partitions, so I dind't observe any problems in that direction.

About the Windows Read-ahead buffer: for drives in MSDOS-compatibility mode Atto Diskbench gives different read-speed pattterns in the 2KB-8KB range with different sizes of the Read-ahead buffer. For my system 64Kb seems optimal.

Earlier I also tried other MSDOS caching programs, with not much results Or Windows refused to start on my system (in case of Nwcache and Qemm), or there is no speed advantage (LBAcache in combination with normal VCache settings).

Lately I got XHDD (you have to e-mail to get it!). XHDD gives a maximum of 21 MB/sec (copying 500MB between different sata-drives) in MSDOS-compatibility mode, so a bit faster than Smartdrive.

XHDD uses only about 5KB conventional/upper memory.

I think the small read-ahead buffer in XHDD (active with cache-size from 50MB and upward) gives this performance boost, one of its predecessors: UIDE, who has no read-ahead buffer, performs roughly the same as LBAcache.

As XHDD accepts 48-bit LBA, I assume there should be no 137GB barrier.

There is a price for all this: all mainboard-connected drives run in MSDOS-compatibility mode.

This XHDD-program should be used with care. Sometimes it doesn't seem to be compatible with MaxPhysPage settings (first I didn't notice, because I normally use HimemX to cut-off memory to 1024MB, and have no MaxPhysPage setting in System.ini. Only MaxPhysPage=20000 in System.cb for obvious reasons).

VCache settings MUST be static, otherwise there are really bad Fatal C0000006 exceptions during copying inside Windows. I use MaxFileCache=131072 and MinFileCache=131072 (393216 is to much, in between I haven't tested yet).

XHDD has a special switch to reserve XMS-memory for old DOS-programs. With this switch it is possible to use inside Windows Smartdrive up to the maximum cache the system takes when loading Smartdrive (for my system 37408) without the problems I described earlier, of broken LFN etc.

Maximum copy-speed of my optimal combination XHDD (in Config.sys: Device=[path]XHDD.SYS /O /P /R20 /S60) & Smartdrive (in Config.sys: Install=[path]Smartdrv 20240 /B:32768) & VCache (MaxFileCache=131072 AND MinFileCache=131072) is 29 MB/sec !!

In Real Mode my copy-speeds are: Smartdrive 23 MB/sec, XHDD 41 MB/sec. The combination of Smartdrive & XHDD gives about 38 MB/sec.

Maybe a nice spin-off is that the XHDD package comes with RDISK, that has the same R-switch. I can run now, without losing my IDE-drives, Smartdrive inside Windows with maximal cache if I install just before Smartdrive a small RDISK memory-disk (in Config.sys: Installhigh=[path]RDISK.COM /R37 /S2 /:[drive letter] & Install=[path]SMARTDRV 37408 /U /V /B:32768).

Edited by deomsh
Corrections

Share this post


Link to post
Share on other sites
On 26-7-2017 at 7:11 PM, deomsh said:

I wasn't aware of the 137GB limitation, thanks a lot for your info! I am still using <137GB partitions, so I dind't observe any problems in that direction.

About the Windows Read-ahead buffer: for drives in MSDOS-compatibility mode Atto Diskbench gives different read-speed pattterns in the 2KB-8KB range with different sizes of the Read-ahead buffer. For my system 64Kb seems optimal.

Earlier I also tried other MSDOS caching programs, with not much results Or Windows refused to start on my system (in case of Nwcache and Qemm), or there is no speed advantage (LBAcache in combination with normal VCache settings).

Lately I got XHDD (you have to e-mail to get it!). XHDD gives a maximum of 21 MB/sec (copying 500MB between different sata-drives) in MSDOS-compatibility mode, so a bit faster than Smartdrive.

XHDD uses only about 5KB conventional/upper memory.

I think the small read-ahead buffer in XHDD (active with cache-size from 50MB and upward) gives this performance boost, one of its predecessors: UIDE, who has no read-ahead buffer, performs roughly the same as LBAcache.

As XHDD accepts 48-bit LBA, I assume there should be no 137GB barrier.

There is a price for all this: all mainboard-connected drives run in MSDOS-compatibility mode.

This XHDD-program should be used with care. Sometimes it doesn't seem to be compatible with MaxPhysPage settings (first I didn't notice, because I normally use HimemX to cut-off memory to 1024MB, and have no MaxPhysPage setting in System.ini. Only MaxPhysPage=20000 in System.cb for obvious reasons).

VCache settings MUST be static, otherwise there are really bad Fatal C0000006 exceptions during copying inside Windows. I use MaxFileCache=131072 and MinFileCache=131072 (393216 is to much, in between I haven't tested yet).

XHDD has a special switch to reserve XMS-memory for old DOS-programs. With this switch it is possible to use inside Windows Smartdrive up to the maximum cache the system takes when loading Smartdrive (for my system 37408) without the problems I described earlier, of broken LFN etc.

Maximum copy-speed of my optimal combination XHDD (in Config.sys: Device=[path]XHDD.SYS /O /P /R20 /S60) & Smartdrive (in Config.sys: Install=[path]Smartdrv 20240 /B:32768) & VCache (MaxFileCache=131072 AND MinFileCache=131072) is 29 MB/sec !!

In Real Mode my copy-speeds are: Smartdrive 23 MB/sec, XHDD 41 MB/sec. The combination of Smartdrive & XHDD gives about 38 MB/sec.

Maybe a nice spin-off is that the XHDD package comes with RDISK, that has the same R-switch. I can run now, without losing my IDE-drives, Smartdrive inside Windows with maximal cache if I install just before Smartdrive a small RDISK memory-disk (in Config.sys: Installhigh=[path]RDISK.COM /R37 /S2 /:[drive letter] & Install=[path]SMARTDRV 37408 /U /V /B:32768).

I solved my all-drives-in-MS-DOS-compatabiility-mode-problem with XHDD.SYS by adding this driver to the IOS.INI SafeList. No other switches are necessary. No problems with my IDE-devices anymore, they are no longer running in MS-DOS compatibility mode!

  • Upvote 1

Share this post


Link to post
Share on other sites

After a whole day of defragmenting my hard-drives I have run some new tests. I didn't test XHDD /B earlier.

  • XHDD /R20 /B in combination with SMARTDRV 20480 /U /V /B:32768 inside Windows is about 1 MB/sec slower than the combination with XHDD /R20 /S60 /O /P.
  •  Standalone XHDD /R20 /B inside Windows is about 5 MB/sec slower than standalone XHDD /R20 /S60 /O /P.

Don't forget: during all my tests above, Sata-drives are ALWAYS in IDE-mode. This according to the Readme-file that comes with XHDD.
 

Share this post


Link to post
Share on other sites
3 hours ago, deomsh said:

Don't forget: during all my tests above, Sata-drives are ALWAYS in IDE-mode. This according to the Readme-file that comes with XHDD.
 

This may not be possible with some of the newest Motherboards.

Share this post


Link to post
Share on other sites
On 8/21/2017 at 3:39 AM, deomsh said:

I solved my all-drives-in-MS-DOS-compatabiility-mode-problem with XHDD.SYS by adding this driver to the IOS.INI SafeList. No other switches are necessary. No problems with my IDE-devices anymore, they are no longer running in MS-DOS compatibility mode!

You only added this line to solve the compat. nag?

Keep the experiments going...  Always interesting to see what else can be done.

Share this post


Link to post
Share on other sites
19 hours ago, rloew said:

This may not be possible with some of the newest Motherboards.

Yes, I took a look at the ASRock H110M-DVS R3.0 manual.

I will try AHCI later.

18 hours ago, 98SE said:

You only added this line to solve the compat. nag?

Keep the experiments going...  Always interesting to see what else can be done.

My motherboard has four Sata ports and one IDE. IDE is installed by the Windows Setup as usual, with Protected-Mode driver (ESDI_506.PDR). The Sata driver has to use one of the shared interrupts. This is not compatible with PM-drivers coming with Windows 98SE, but Windows Setup tries to install a second Hard Disk controller, visible in Device Manager.

Setting only this second Hard Disk controller to "No drives" during Setup (in between booting in Safe mode) gives Sata-drives running in MS-DOS compatability mode.

XHDD.SYS is a Real-Mode driver and as such blocks PM-drivers of ALL drives. IDE Hard Disks will still running, of course in MS-DOS compatability mode. IDE DVD drives are not capable of this, unless using extra RM-drivers, but losing the ASPI-Layer means losing all Windows CD/DVD programs. :crazy:

During my holiday I remembered IOS.INI from my Windows 95 OSR1 days, experimenting with MS-DOS USB-drivers. 

At home, adding XHDD.SYS to the SafeList in IOS.INI did the trick, coexistance of IDE PM-driver and UDMA RM-driver.

I saw SMARTDRV.EXE is by default on the SafeList, so thats why I didn't run in problems earlier.

IOS.INI manual is in KB138899 or Q138899. Its hosted here: http://www.c-bit.biz/Q/138899/EN-US/ :D

This old technology is ONLY of interest when using RM-drivers inside Windows 9x. 

Thanks for your interest, I wil continue experimenting after making a good test installation. For the moment I am testing on my almost filled up data&backup-drives. Much to risky. Once I got 800 chk-files with Scandisk when trying my old VT6421A PCI Sata card, another time Windows 10 (my dual boot companion) gave me 10 000 more!

Does someone know a Win9x-compatible copy-speed test program?

ATTO Disk Benchmark and Chrystal DiskMark are of no use for my experiments :unsure:

Share this post


Link to post
Share on other sites

The use of shared interrupts is one of the issues my SATA Patch has to resolve. The standard Windows setup does not distinguish between Legacy (separate interrupts) and Native (shared interrupts) mode Controllers.

Share this post


Link to post
Share on other sites
15 hours ago, deomsh said:

Yes, I took a look at the ASRock H110M-DVS R3.0 manual.

I will try AHCI later.

My motherboard has four Sata ports and one IDE. IDE is installed by the Windows Setup as usual, with Protected-Mode driver (ESDI_506.PDR). The Sata driver has to use one of the shared interrupts. This is not compatible with PM-drivers coming with Windows 98SE, but Windows Setup tries to install a second Hard Disk controller, visible in Device Manager.

Setting only this second Hard Disk controller to "No drives" during Setup (in between booting in Safe mode) gives Sata-drives running in MS-DOS compatability mode.

XHDD.SYS is a Real-Mode driver and as such blocks PM-drivers of ALL drives. IDE Hard Disks will still running, of course in MS-DOS compatability mode. IDE DVD drives are not capable of this, unless using extra RM-drivers, but losing the ASPI-Layer means losing all Windows CD/DVD programs. :crazy:

During my holiday I remembered IOS.INI from my Windows 95 OSR1 days, experimenting with MS-DOS USB-drivers. 

At home, adding XHDD.SYS to the SafeList in IOS.INI did the trick, coexistance of IDE PM-driver and UDMA RM-driver.

I saw SMARTDRV.EXE is by default on the SafeList, so thats why I didn't run in problems earlier.

IOS.INI manual is in KB138899 or Q138899. Its hosted here: http://www.c-bit.biz/Q/138899/EN-US/ :D

This old technology is ONLY of interest when using RM-drivers inside Windows 9x. 

Thanks for your interest, I wil continue experimenting after making a good test installation. For the moment I am testing on my almost filled up data&backup-drives. Much to risky. Once I got 800 chk-files with Scandisk when trying my old VT6421A PCI Sata card, another time Windows 10 (my dual boot companion) gave me 10 000 more!

Does someone know a Win9x-compatible copy-speed test program?

ATTO Disk Benchmark and Chrystal DiskMark are of no use for my experiments :unsure:

How were you able to isolate what was causing your "MS-DOS compatability mode" to pop up for your drives if you using a clean config that wasn't caused by drivers?

Did you try booting 98SE off a USB and doing the same tests?  Did MS-DOS compatibility mode pop up?

 

Share this post


Link to post
Share on other sites
5 hours ago, 98SE said:

How were you able to isolate what was causing your "MS-DOS compatability mode" to pop up for your drives if you using a clean config that wasn't caused by drivers?

Did you try booting 98SE off a USB and doing the same tests?  Did MS-DOS compatibility mode pop up?

 

When only SOME drives run in MS-DOS Compatibility mode, Device Manager shows one or more yellow exclamation marks for the appropiate disk controllers, AND on the last tab Device Manager will show which drive letters are going through compatibility mode.

When ALL drives run in MS-DOS compatibility mode, ALL disk controllers will show yellow exclamation marks AND the last tab will show which driver caused all this. In my case XHDD of course. :blink:

Edited by deomsh
Corrections

Share this post


Link to post
Share on other sites
Posted (edited)

Some updates FYI, regarding:

SMARTDRIVE 137GB barrier:

Actually 137GB is 128GiB. Many programs give the GiB-size as GB, including Explorer and many Partition programs.

SMARTDRIVE  Maximum Cache Size:

I found some "new" old information on Github. Thank you Jeff Parsons! :hello:

Formula for Maximum Cache Size gives 36522 (KB) with ElementSize 8192 (Byte). Tested, in Windows only possible in combination with RDISK.COM or XHDD.SYS /R-switch (as mentioned earlier in this thread). http://jeffpar.github.io/kbarchive/kb/095/Q95531/

Note that SMARTDRIVE takes 64 KB with Maximum Cache Size, so Read Ahead Buffer MUST be loaded low with SMARTDRV /L

SMARTDRIVE  Maximum BufferSize:

With (maximum!!) ElementSize 8192 the maximum BufferSize is 57344 (Byte). Tested: relation between Read-Ahead buffer size and copy speed still holds, the higher the better. http://jeffpar.github.io/kbarchive/kb/094/Q94604/

XHDD.SYS:

There are many new versions (last update today - I will test soon), direct download from http://optimizr.dyndns.org/dos/drivers.html

By accident I found that XHDD.SYS is not compatible with Windows protected mode floppy-driver HSFLOP.PDR (all two versions I know). Solution: disable Floppy-controller in Device Manager. Small price: Diskcopy is not possible with floppy station in MS-DOS compatibility mode. BTW: I have no other motherboard to test, so this holds at least for Asrock 960GM-GS3.





 

Edited by deomsh
Reformatting

Share this post


Link to post
Share on other sites

Lately I tested two identical 32GB SATA-II SSD's in MS-DOS compatibility mode. The results were a bit disappointing, but interesting.
For the sake of comparison I partitioned the ssd's with 32k clustersize. The ssd's were optimized for speed (partitions starting at 1 MB).

Benchmark:
- In Windows 10 copy-speed with my 500MB testfile was 60MB/sec, between ssd's.

Highest copy-speeds in MS-DOS were:
- 37 MB/sec. with BUFFERS=20
- 17 MB/sec. with SMARTDRV 4096 /B:57344 and BUFFERS=4,0
- 56 MB/sec. with XHDD.SYS /S50 /H /O /P and BUFFERS=4,0
- 28 MB/sec. with XHDD in combination with Smartdrive and 4 Buffers

So, in MS-DOS Smartdrive is outperformed by Buffers only! Apparently Smartdrives read-ahead buffer has little use in case of flash memory. XHDD did a magnificient job. Thank you Jack Ellis. :thumbup

Highest copy-speeds in WINDOWS (with static 128 MB VCACHE and NO MaxPhysPage!) were:
-   4 MB/sec. with BUFFERS=20 
- 17 MB/sec. with SMARTDRV 4096 /B:57344 and BUFFERS=4,0
-   5 MB/sec. with XHDD.SYS /R25 /S50 /H /O /P and BUFFERS=4,0
- 22 MB/sec. with XHDD in combination with Smartdrive (4 Buffers)

In Windows Buffers and XHDD were really slow, Smartdrive performed the same as in MS-DOS. The combination of XHDD and Smartdrive had a better performance, but still less than copy-speeds on SATA-II Hard Drives I reported earlier. Copying from a ssd to a 128G(i)B partition on my 'new' 500GB Hard drive gave 31 MB/sec!

Using XMGR.SYS with XHDD.SYS /R1024 /H /O /P /G to limit memory to 1GB, instead of HimemX (with /MAX=1048576), was about 5% slower. With HIMEM.SYS instead of XMGR: 9% slower than HIMEMX.
 

BTW: with the XHDD /G-switch to limit memory, the maximum Smartdrive cache is about 4096KB. Although XHDD's cache is loaded above the value of the /R-switch, Smartdrive's cache is loaded below the /R-switch - inside the memory available to Windows.

Posted with Opera 12.02

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×