1.

Solve : Hard Disk performance and Ram Drive?

Answer»

I was wondering if anyone knows why this situation is occuring when I set up a large RAM drive. I have 256 MB of physical memory. I have set up a ram drive of 32Mb. When I use a benchmark program, the RAM test and the Hard Drive meet or excel the manufacturer specifications. I get a hard drive transfer rate of about 40MBps (Manufacturer spec is 33MBps). The SDRAM ALSO shows high transfer too.

However, if I make the RAM Drive any larger than 32768KB (32MB), even by a single KB, the benchmarks drop to around 20-24 MBps for the Hard Disk and the RAM speed drops noticeably as well. Is there some wall that you are forced to lose performance by increasing a RAM drive beyond 32MB? Or could it be the RAM disk driver causing the problem? I use XMSDSK (Frank Uberto) which is touted as the best one you can use, which claims no 32MB limit, yet there seems to be a performance limit anyway. What's going on? I would like to use at least 128MB for a ram drive, because Win 3.11 can run just great on as low as 64MB, but getting stiffed on performance or putting excessive pressure on the hardware to do so is not in my interest either.You said 256 MB?
That is way,way too small.
Try 4 GB an d see.This is a hobby machine from 1997 I use as a DOS box a for old programs. Also for Win 3.x stuff as well that won't run on my 64bit modern PC without emulation.So the machine is an old 1997 that boots in DOS 6.11 or similar?
What CPU is it? Is it at least a 386?
Are  you using EMM386 to get into the upper memory?
What do you have in the autoexec.bat file?


Here is my autoexec.bat - I am using IBMDOS 5

ECHO OFF
LH C:\WINDOWS\MSCDEX.EXE /S /D:MSCD000
LH C:\WINDOWS\mouse.exe /Q
C:\WINDOWS\net start
LH C:\DOS\SHARE.EXE /l:500 /f:5100
LH C:\CRYSTAL\CWDMIX /C=13 /W=13 /L=13 /M=13 /F=13 /X=5
SET BLASTER=A220 I5 D1 T4
SET MOUSE=C:\WINDOWS
SET PATH=C:\WINDOWS;C:\WINZIP;C:\DOS;C:\PICTVIEW;C:\PACKET
SET TEMP=D:\TEMP
SET TMP=D:\TEMP
KEYB UK,,C:\DOS\KEYBOARD.SYS /ID:166
PROMPT $p$g
LH C:\WINDOWS\SMARTDRV.EXE 8192 192 /L /X
MD D:\TEMP
MD D:\CACHE

Here's the config.sys

DEVICE=C:\DOS\HIMEM.SYS /NUMHANDLES=128 /TESTMEM:OFF
REM DEVICE=C:\XMSDSK\SETXMSTO.EXE 131072
DOS=HIGH,UMB
REM DEVICE=C:\DOS\EMM386.EXE X=B900-C7FF I=B000-B7FF RAM M3 A=64 H=128 D=256 AUTO NOTR
DEVICE=C:\UMBPCI\UMBPCI.SYS 'instead of the above - works better saves lower memory - I don't run progs that need expanded memory anyway
DEVICEHIGH=C:\XMSDSK\XMSDSK.EXE 32768 'ramdisk setting
DEVICEHIGH=C:\CRYSTAL\CWDINIT.EXE
DEVICEHIGH=C:\CDROM\GSCDROM.SYS /D:MSCD000
DEVICEHIGH=C:\WINDOWS\IFSHLP.SYS
FILES=30
BUFFERS=11
REM STACKS=9,256
STACKS=0,0
LASTDRIVE=H
DEVICEHIGH=C:\DOS\SETVER.EXE
REM DEVICE=C:\WINDOWS\SMARTDRV.EXE /DOUBLE_BUFFER
SHELL=COMMAND.COM /E:512 /PMy bad. It is in config.sys where you put the EMM386.
Like this:
Code: [Select]DEVICE=C:\HIMEM.SYS
DEVICE=C:\EMM386.EXE RAM
DEVICE=C:\RAMDRIVE.SYS 32767 512 256 /e R:
Or something like that. The above makes R: as the ram drive. The disk sizew is at the max.
Quote

DiskSize
    Specifies how many kilobytes of memory you want to use for the RAM
    drive. For example, to create a 640K RAM drive, specify 640. If you
    don't specify an amount, RAMDrive will create a 64K RAM drive. You can
    specify a value from 4 to 32767. However, you cannot specify more memory
    than your system has available.
http://2dos.homepage.dk/batutil/help/RAMDRI_S.HTM

That should answer your question.

Nope. It doesn't answer my question at all. Please re-read it. I do appreciate the effort you made, but I know how to set-up ramdrive.sys and know of its limitation of 32Mb.

As you can see from my config.sys I posted, I am using a UTILITY called xmsdsk.exe to create the ramdrive. It allows a ramdrive greater than 32mb. Also, I don't want to use EMM386.EXE because I prefer to use EXTENDED memory than EXPANDED memory. There is only one program (and I rarely if ever use it)  that demands expanded memory, so I don't need an expanded memory manager. But I keep the line under a REM, just in case I ever need it with parameters suitable for my system. from my config.sys above:

REM DEVICE=C:\DOS\EMM386.EXE X=B900-C7FF I=B000-B7FF RAM M3 A=64 H=128 D=256 AUTO NOTR

Also, I find it odd you would suggest installing the expanded memory manager (EMM386.EXE) and yet your configuration suggestion uses the EXTENDED memory switch for configuring the RAMDRIVE.SYS driver. Also, you suggest using the bare default EMM386.EXE with no parameters except a RAM call for UMBs which really doesn't make any sense, especially without considering the "noems" parameter. Kinda reckless, don't you think? I use a utility called UMBPCI instead to release locked UMBs for shadow ram and uses LESS low memory - but this has little to with the Ram Drive except for allowing the environment to create it. Your config suggestion:

DEVICE=C:\HIMEM.SYS
DEVICE=C:\EMM386.EXE RAM
DEVICE=C:\RAMDRIVE.SYS 32767 512 256 /e R:

Thanks for your help anyway...Sorry I was of no help.   Well, in a way you did. You got me thinking about the configuration of the UMBs and the utility I was using.

UMBPCI.SYS is very particular about what chipset it will work with.

I realized something I had forgotten about. My Chipset.

My Chipset in the old PC is i430TX which allows for 256MB of physical RAM, BUT (and it's a big one) only allows 64MB to be cacheable at a time.

Having a 32 MB Ram drive is just fine and I still remain with the 64MB cache, because DOS was designed to allow this using RAMDRIVE.SYS, but by using a third party utility that breaks the rules of that barrier, I am forcing my system to read all those unused registers every time it has to access the RAMDRIVE. In effect, the system no longer treats it like a normal RAMDRIVE, but as another PHYSICAL drive. However, this drive is using RAM, and that RAM is suddenly unallocated properly and uncached.  I realized from wading through some documentation, that if I go beyond that limit even just by 1 KB, the allocations for the 64MB cache go haywire. Which explains why SMARTDRV cannot properly cache the "real" physical disk and the now "unrecognized as such" RAMDRIVE. I am still reading more about this, but that sounds sort of like the issue that I have figured out from the technical mumbo jumbo I have slogged through so far.Ram being "Cacheable" via the chipset means that it can be stored in the L1/L2 Caches. Generally it is an Address range that can be cached in the L1/L2 cache and is a limitation of the Memory controller, which until a few generations ago, was a COMPONENT of the chipset.

In your case As you've discovered the use of the RAM Drive larger than 32MB likely pushes the actually memory being used over that Cacheable range. This results in accesses to that non-cacheable range always fetching directly from system memory, without the benefit of the cache maintained by the memory controller, which is quite a bit slower in comparison.

smartdrv uses a memory cache but is not really nrelated to the cacheable range. I don't know why it wouldn't work but it may be a incompatibility between the RAM disk driver and smartdrv. Either that or the attempt to load it into the UMB FAILS because the RAM Drive already uses it up.Fro those coming in late... This thread is about the MS-DOS RAM disk utility and its third-party cousins.  As mentioned in  the post, the limit is 32 MB  for best performance.
But wait! There is more to the story. The idea is now come around. Thais time as an alternative to SSD. Newer software for a virtual drive offers benefitrs for Windows 7 systems.
Look at this 2012  item from LifeHacker:
Add a RAM Disk to Your Computer for Faster-than-SSD Performance
Quote
There are, however, some disadvantages to using RAM disks that you should know ... Still, for those of us without an SSD, this is a cheaper upgrade ...
Worth a look. 


Discussion

No Comment Found