Why was the RAM drive removed from Windows 95?


Commenter Travis Owens asks, "Why was the RAM drive removed from Windows 95?"

As with many of these types of accusatory questions, this comes with a false hidden assumption, in this case, that the RAM drive was in Windows 95 to begin with.

Remember that Windows 95 introduced a new driver model, so any RAM drive would have had to be written from scratch. (Well, okay, you could use the old 16-bit RAM drive, but then you'd be going through the real-mode mapper, at which point your performance would go down the tubes.) As you admitted, it was a very niche feature that usually hurts but can sometimes help in very specific circumstances. Which Windows 95 file system feature would you have cut so that the geeks could have their RAM drive? Should we even be showing RAM drives to typical users, who would just turn it on without understanding its consequences, winding up with a computer that ran worse than if it had never been there?

If you want a RAM drive, you can sit down with the DDK and write one. But the Windows 95 folks decided that adding support for SCSI hard drives would be a more effective use of the time and skills of the Windows 95 storage device driver development team—which, as I recall, consisted of three people.

Mind you, if you really want your precious RAM drive, I've heard rumors that it's tucked away on your Windows Server 2003 CD under the names RAMDISK.IN_ and RAMDISK.SY_, and that there is a way to add a RAM drive to your Windows PE disk. (And no, I haven't heard any rumors about Windows Server 2008.)

Comments (59)
  1. Nawak says:

    Wait, aren’t "Windows 95" and "SCSI drive" one the first "Chen Spells" invokable on The Old New Thing?

    IIRC:

    • Windows 95 + SCSI drive: invokes Norman Diamond.
    • Vista: invokes Igor Levicki

    • Explorer: invokes Gripes From Everywhere

    • Nitpicker’s Corner: invokes Nitpickers Lvl 2.

    I only remember the common ones because sometimes only a special combination of approximate words can bring up the most powerful ones!

    But I hear Raymond has recently found a Stone Of Jordan inside an IUnknown::QueryInterface and can now protect himself against those incantions…

    Time will tell… :)

  2. Nawak says:

    And if a rational explanation has to be found, I think that both the words "the" and "a" invoke the dreaded Storm Of Pingbacks.

  3. Nawak says:

    I don’t know what’s wrong with me today but let me at least try to make an on-topic comment:

    Imagine the speed boost of putting the swap-file on a RAM drive!!

    Ok, I failed.

    As as side note, it would be interesting to know the growth of the dev teams since windows 3.1.

    I remember seeing the numbers for NT in http://www.usenix.org/events/usenix-win2000/invitedtalks/lucovsky_html/Lucovsky.ppt and being amazed at how much both the dev and test teams grew.

    Seeing that the "storage device driver" dev team consisted of three people seems to imply relatively small teams in which the spirit must have played a great part.

    PS:

    And oh, in my last post it was "incantations" not "incantions", of course.

  4. Kyle says:

    You sound pretty defensive, Raymond… reading Travis’s original comment, he doesn’t seem to be implying that the feature was removed from Win95, nor does he seem to be harboring any grudge for its non-implementation.

    I think "because resources are finite Win95 was a massive overhaul" very much fits Travis’s allowance for "a great reason".

  5. James Schend says:

    Nawak,

    Maybe you should finish up your coffee and have a bagel before posting, eh?

  6. David Walker says:

    Kyle:  What are YOU smoking?  :-)

    Travis’ question included the sentence "I’m sure there’s a great reason why ram drive was removed around the time Windows 95 shipped, but being DOS based, why was the ramdrive commant removed?".  How can that NOT lead you to think that Travis was complaining that the Ram drive was removed?

    He said "removed" twice, then he landed a triple-lutz by saying "get the axe" in the final sentence.  Obviously, Travis thought the feature was removed, killed, ripped out, eviscerated, deleted …

  7. Ulric says:

    No kyle is right, he does sound needlessly defensive.  The answer to the question was “It needed to be re-written”, but again we need the lecture about priorities and what other features would need to be cut.  That’s typical of how old engineers talk to clients, when that have been working for too long in corporation.  These things should all be edited out, it’s beside the point, you’re not on trial.

    Now the post actually brings more questions to me.  What’s that thing on the Windows Server 2003 CD?  Is it a win32 driver, and if so when what it written, why, and by who?

    [I pull out that same lecture each time, because it’s part of the process known as “writing.” In addition to giving the answer (“It needed to be rewritten”) you have to anticipate the inevitable followup-question: “So why didn’t you rewrite it?” I will try next time to merely incorporate it by reference to make you happy. -Raymond]
  8. Tom says:

    I think the only RAM drive for Windows currently offered by MS is a sample from the DDK which isn’t really suitable for daily use.  (I would love to be proven wrong.)

    So, I’m hoping some fellow geek in this thread will recommend a RAM drive he or she is happy with, because I haven’t found one yet.  And yes, there are legitimate uses for RAM drives that geeks would care about, like storing all of the things that get written to disk during a compile operation.  (There seems to be a surprising amount of room for improvement here over the disk cache.)

  9. Nawak says:

    Ulric:

    Remember, the ‘Tone’ dial on Raymond goes up to ‘Thermonuclear’, so ‘defensive’ is actually not that bad.

    Personally, I didn’t think Raymond was defensive. I always like the extra bits of background Raymond put in his posts.

    I agree though that the fact that the driver was eventually written raises some interesting questions…

  10. Kyle says:

    [I pull out that same lecture each time, because it’s part of the process known as "writing." In addition to giving the answer ("It needed to be rewritten") you have to anticipate the inevitable followup-question: "So why didn’t you rewrite it?" I will try next time to merely incorporate it by reference to make you happy. -Raymond]

    OK, so Travis asks a legitimate question, and instead of simply responding with the simple answer, you take the opportunity to nip the inevitable "why?" in the bud.  Fair enough.

    But that "why?" is a very interesting question.  Your answer makes perfect sense, and it provides context and rationale to a situation that many of us might miss with our noses buried in code all day.  I don’t think that the "inevitable followup" is a bad thing at all.  In fact, I’d be worried if one of my colleagues were satisfied with the simple explanation.

  11. KenW says:

    @Kyle: "I don’t think that the "inevitable followup" is a bad thing at all.  In fact, I’d be worried if one of my colleagues were satisfied with the simple explanation."

    Which is why Raymond provided it = "to anticipate the inevitable follow-up question".  By answering it in the initial entry, he hoped to avoid the deluge of questions here. Which he did, of course.

    He just failed to correctly anticipate the offensiveness and poor reading skills of a couple of posters who complained about his answering the questions. Like you, of course, in your initial post about his being defensive, and Ulrich for his posts agreeing with you and attacking Raymond.

    You should be a little more consistent. Your first post accuses Raymond of being defensive for providing the details behind the decision, and your last agrees that he should provide it because it’s probably necessary information.

    @Raymond: Thanks for the info. I’d thought about this a couple of times previously, but never knew why it was dropped.

  12. Kyle says:

    [Travis’ question included the sentence “I’m sure there’s a great reason why ram drive was removed around the time Windows 95 shipped, but being DOS based, why was the ramdrive commant removed?”.  How can that NOT lead you to think that Travis was complaining that the Ram drive was removed?]

    Removed from Win95, not omitted in general.  Raymond asserted that there was an underlying assumption the ramdrive feature was part of Win95 and was then removed prior to RTM.  I didn’t infer this from Travis’s question.  Rather, I read it like “ramdrive was in WFW 3.11, and not in Win95… do you know why?”.

    [But that’s still assuming that everything in WFW 3.11 was included in Windows 95 by default, and then somebody went in and removed it. -Raymond]
  13. Jefferson says:

    Why would you need a RAM drive given that the filesystem has an in-memory cache that should function very similarly?  Granted, I remember copying games to a RAM drive back in like Windows 3.0 and DOS so that they would load a ton faster, but theoretically shouldn’t the file system cache take care of this?

  14. Kyle says:

    [But that’s still assuming that everything in WFW 3.11 was included in Windows 95 by default, and then somebody went in and removed it. -Raymond]

    I don’t see that, but I think I know where you’re coming from now.  I deal primarily with technical people, who understand that just becuase Product X v2 was preceded by Product X v1 does NOT imply that v2 is simply v1 plus more code.

    External customers and end-users, on the other hand, often don’t understand that the next version of a product doesn’t simply consist of a clone of the previous version with new features, and are susceptible to just the sort of assumption you’re talking about.

    So, for a technical person, an answer along the lines of "A lot of the architectural fundamentals of Product X were reworked for v2" would be enough to describe the base motivation, and then the followup would cover such things as resource allocation, schedule pressures, and cost-benefit analysis.  For a non-technical person, I can see how that misconception of product evolution could influence the tone of the question.

  15. KJK::Hyperion says:

    Jefferson: I keep hearing it, but I never understood the "disk cache" counter-argument. The cache is not addressable. That’s a no-brainer to me: cache and a RAM disk are not the same thing, because the cache is not addressable, much less in filesystem fashion

    Some applications need a writable temporary directory, so you can’t run them from read-only media: what alternative to a RAM disk you propose for that? what could the developers of said applications have done in the first place to avoid using a temporary file?

    What about Windows NT versions up to and including Windows 2000? they really didn’t like running without a page file. Where do you propose we should put one, when booting from read-only media?

    Sometimes I wonder if we all live on the same planet. A RAM disk solves a number of issues that are simply not solvable in any other way

  16. Jefferson says:

    @KJK

    Sorry, I don’t understand what you mean.  The disk cache is an optimization that the OS uses to speed up disk accesses.  Only unlike the RAM drive where the user chose what was fast, with the disk cache, the OS chooses.  You should see the exact same benefits.

    For a writable temporary directory, you would put it in %TEMP%.

    Am I missing something?

  17. Tom says:

    "Why would you need a RAM drive given that the filesystem has an in-memory cache that should function very similarly?"

    Two reasons:

    1) With the RAM drive, you are in absolute control over what’s in the cache.  With the cache, you have almost no control over the contents of the cache.  Copy a large file using Explorer?  Oops, wave goodbye to your carefully constructed cache!

    2) The cache can’t save the world when it comes to writes.  Consider the following recent measurements of a certain C++ app’s warm full-rebuild compile time, all taken with read and write caching enabled (on XP):

    150GB Raptor (read/write): 19 seconds

    128GB OCZ Core SSD (read/write): 59 seconds(!!!)

    SSD (read) + 500GB Hitachi (write): 15 seconds

    SSD (read) + RAM drive (write): ??? (need to test)

    We’re not talking about tons of data here either, probably <50MB of writes.

  18. Kyle says:

    [For a writable temporary directory, you would put it in %TEMP%.

    Am I missing something? -Jefferson]

    Yes… if the volume is read-only, you can’t write to %TEMP%, but you can write to a ramdisk.  There is no write cache on a volume you can’t write to.

  19. Leo Davidson says:

    CreateFile has flags for opening temp files that (memory permitting) never touch the HDD and are deleted on closure. I would say that covers many of the RAM drive scenarios.

    Assuming the filesystem caches well and uses up all spare memory, the only real advantage I can see to RAM disks is that you can choose a particular set of files to be cached no matter what.

    (If that assumption isn’t/wasn’t true then that is/was a much more important thing for the filesystem people to work on than the RAM disk as it benefits everything.)

    I wonder how many situations there are where a RAM disk is useful, and whether it makes more sense for applications to cache the data they need by loading it into memory rather than relying on a RAM filesystem?

    One bad thing about RAM drives is you don’t know which program put the data in them. If a process allocates a huge cache and you find yourself low on memory then you can see what’s behind it via Task Manager. If a process dumps a load of files into a filesystem with no identifying names then it could be difficult to work out what put it there and why.

  20. Leo Davidson says:

    Kyle, it %TEMP% is pointing to a read-only volume then you’ve got far, far bigger problems than access time.

  21. 640k says:

    Disk caching doesn’t cache filesystem metadata writes, only file content.

    Putting the swapfile on ramdrive is a considerable performance boost as long as windows doesn’t run out of memory (which can happen faster than you think). Even a "slow" ramdrive are faster than any physical disk.

  22. spoink says:

    "Putting the swapfile on ramdrive is a considerable performance boost as long as windows doesn’t run out of memory (which can happen faster than you think)."

    I think my head just exploded.  Of course it runs out faster than you think; what do you think the point of the pagefile is?  What you’ve just done is the Rube Goldberg version of turning off the pagefile.

    And define "considerable performance boost."

  23. MC says:

    "But that’s still assuming that everything in WFW 3.11 was included in Windows 95 by default, and then somebody went in and removed it. -Raymond"

    For usual customer, the Win95 is "the successor" for WFW 3.11, so the customer simply presumes (you could not strictly beet him for this), that Win95 contains the functions of its predecessor and "something more" (which makes the new version better and more fun than ever before).

  24. Kyle says:

    [I think my head just exploded.  Of course it runs out faster than you think; what do you think the point of the pagefile is?  What you’ve just done is the Rube Goldberg version of turning off the pagefile.

    And define "considerable performance boost." -spoink]

    Well, if you’re running a version of Windows that does not support disabling the pagefile in an environment with very constant memory requirements, I guess it provides some performance benefit…?

  25. SRS says:

    "I think my head just exploded" – don’t worry, you just configure the system so the swapfile on the ramdrive is paged out to the swapfile on the ramdrive when the memory gets low. Of course, to make this work, you really need two ram drives. In very tight memory conditions, you might even need three ramdrives, with the swapfile configured across all of them (leaving some space to swap to). People often miss this part.

    How do I apply for job with the storage team?

  26. MadQ says:

    A ram drive would be screamingly fast if it were a user-mode driver and used Address Windowing Extensions. I’m not sure if that is possible, but it would be cool. A few years ago I toyed with the idea of connecting to a second PC using SCSI, and using most the second PC’s ram as a drive for the primary PC. Talk about a FAST page file ;-) The only reason I never implemented it is because I’d rather stick a needle into my eye, than write another driver. The only thing more tedious and dull than writing a driver is reading an IBM document.

    I really loved the reset-resistant ram drive of the Amiga OS. Reboot after a guru meditation (system crash) and contents of the ram drive were still there as soon as it was mounted.

    I also liked that T: (equivalent of %TEMP%) was assigned to the normal ram drive. You didn’t get all the clutter buildup in the temporary directories. I have come across quite a few Windows applications that assume their files will still be in %TEMP% after a system restart, which makes it difficult to keep %TEMP% clutter free.

  27. MS says:

    Honestly, if you want a RAM drive, go and buy one, don’t try to store it into memory.  There is a very good one with SATA and supports up to 4GB of DDR.  Don’t try to second guess the OS or waste system RAM on it.  You’re more likely to hurt performance with that.

  28. Xepol says:

    For WIn95, the ram drive would have been more useful to more people than SCSI ever was.  SCSI was at best a FRINGE hardware target at that point, certainly more suitable for servers than desktop OSes, particularilly when you take the price of SCSI hardware at the time.

    It was a bad choice, and defending it now with full hindsight is equally foolish. It was possible, and probably would not have been the huge ordeal you’ve hinted it would be. Certainly, if we could write one, MS with access to the OS developers and the DDK authors could have created it that much easier.

    As for the “why was it removed from”, it was in the previous versions of the OS, so people consider the version it was missing from to be the version it was removed from. Seems straightforward. It was there before, now its gone. You don’t ask why it was removed from somwhere it continues to be.

    [Hm, but if Windows 95 didn’t have SCSI support, Norman Diamond would have had to find something else to complain about! (I still suspect that more people would have shot themselves in the foot with a RAM drive than used it productively.) -Raymond]
  29. Doug says:

    I kind of think there should be a RAM drive or loopback drive of some sort. It doesn’t necessarily need to be exposed to end users, but as a developer, I do have a need for an arbitrarily-sized block device that I can muck around with.

    Quick point of clarification. There are two kinds of "RAM" that you can use for a "RAM drive" — non-paged and paged. If you used non-paged memory, the data on the RAM disk is always in actual RAM, so you’re increasing memory pressure by forcing other data out to swap (you’re telling the OS that the data on the RAM disk must be immediately accessible no matter how infrequently it is used). This might be useful for real-time scenarios, but for the best performance of the overall machine, it is usually a bad idea. The OS usually does a pretty good job of keeping the most frequently accessed data in RAM and kicking out stuff that hasn’t been used for a while, and by creating a non-paged RAM drive, you’re making the RAM unavailable to any other program in the OS, regardless of how rarely the RAM drive is used or how frequently the other program’s data is used. The alternative is to use paged memory, which allows the OS to kick data from the RAM drive to the page file as needed if the data on the RAM drive hasn’t been used for a while. This probably doesn’t provide as much of a performance benefit for the data on the RAM drive, but it does provide the behavior benefits of a RAM drive without as much potential waste. A possible third alternative is to use a file on disk to back  the "RAM" drive, which is essentially the same as using paged memory in terms of performance (the difference is that the memory is "backed" by a file under your control instead of the swap file). This opens up some additional nice possibilities in terms of behavior. Unix has this, and it’s called the loopback file system, and it is really useful.

    So why would I want a RAM disk at all, especially since it probably doesn’t get me much in terms of performance (unless I’m using non-paged memory, in which case my performance gains potentially come at a cost to the rest of the system)?

    • Easy way to play around with block devices, i.e. look at a corrupted disk image (floppy, hard disk, USB drive) when trying to recover data without risking additional damage to the original. (Even better if the image can be mounted directly from a file.)
    • Easy way to create a bunch of temp files and be confident that they’ll be automatically deleted at reboot, or that they’ll never exceed a limit on disk usage. Especially useful when you don’t control the process that creates the temp files.

    • Use your imagination.

    So basically, I’m wishing for a loopback device. Usable as a RAM drive, a testbed, a staging area for creation of media, a way to create floppy disk boot drives for Virtual PC, a way to read from ISO images without having to burn them first (or install some crazy ISO mount tool that comes with AdWare and is associated with breaking copy-protection).

  30. Nawak says:

    "Copy a large file using Explorer?  Oops, wave goodbye to your carefully constructed cache!"

    It’s true that you don’t have control over what is in the cache, but the OS has, and generally this scenario is not sufficient to pollute the cache. OS caches often use a bypass setting so that big transfers are not cached (by the OS! The disk may well cache them)

    About windows 95 and SCSI: I remember buying an SCSI card and an SCSI CD burner for my windows 95 PC because it was almost the only way to avoid making coasters regularly.

    So SCSI was not THAT fringe.

  31. Tom says:

    "generally this scenario is not sufficient to pollute the cache"

    That would make tons of sense, but it’s absolutely not the case for Windows 2000 or XP.  This has been my biggest annoyance with the disk cache in Windows.  And no, I’m not confusing the OS-level disk cache with the cache that resides within the drive itself.

    It’s VERY easy to observe: start some programs repeatedly, notice your disk is quiet and startup time quick on the warm starts.  Now copy some large files.  Start the same programs again.  Slow, and lots of noise from the disk.  You’re pretty much back to cold start.  The effect is amplified when programs are optimized heavily for warm start.  (Gee.  Who would do that?)

  32. Bratch says:

    [… There is a very good one with SATA and supports up to 4GB of DDR …]

    This is what I was thinking, you wouldn’t need it OS supported if you use something like the Gigabyte GC-RAMDISK i-RAM, 4GB, SATA 1.5GB/s.  Be better if it supported more/better RAM and SATA 3GB/s.  Data is transfered through the SATA connector, PCI is for power.  

    Then again, if you had a 64 bit OS and lots of RAM, like 16GB or so, why couldn’t you just use some of that as a RAMDISK?

  33. Frymaster says:

    A couple of us had this discussion with someone on IRC the other day.

    His premise that was since gigabit ethernet can be faster than disk access, by creating a RAM drive (on XP or vista) you could get faster downloads in the case when your gigabit link was maxed out.

    Ignoring the point that on his home network, nothing could _generate_ traffic faster than his drive could write, and that was likely to go double for net traffic (even if he had gigabit internet, which he doesn’t), we tried to hammer in the fact that in that situation you’re better off leaving the RAM available to the OS so it can manage disk caching directly; that way it works on ALL file access and not just that to your ramdisk (which you have to remember to copy to permanent store anyway), and you also get to use the RAM for other things when needed*

    Not sure we got through to him, though

    *Assuming you manage to get a ramdrive that uses physical memory directly anyway and isn’t just using its own virtual memory, which would in intermittent-burst scenarios result in at best no difference.

  34. Duke of New York says:

    I understand Raymond’s frustration, since Travis’s question seems to repeat the tired myth that Windows 95 was a DOS hack rather than the complete operating system it was. Come on folks, it’s been 13 years. The truth is out there.

    I can think of a couple other reasons to leave the RAM drive out of Windows:

    1. It’s a support headache. An unsuspecting user saves a document on the RAM drive, then shuts down the computer (or it crashes). *ring-ring* "Windows lost my document!"

    2. Hard disk sizes took off. Microsoft also "took out" compressed drive support between DOS 6 and Windows 95, even after they got around the Stac patent problem. Hard disks had increased in size to the point that it wasn’t worth the trouble.

  35. Mike Swaim says:

    Actually, some fairly common Sound Blaster cards had SCSI interfaces. The DOS drivers sucked eggs, but under Win95, I could reliably use my sound card to drive a SCSI drive. (I also had a dedicated card, but it could only do 2 of the folowing 3, 8 bit SCSI, 16 bit SCSI, and external, and I had all 3.)

  36. Duke of New York says:

    Another reason would be that Microsoft was under the gun at the time to prove that it could deliver an OS without IBM. Let’s see… secure the future of the company, or spend time on a low-demand feature that could be offloaded to third parties? Tough choice.

  37. Dave says:

    I think the only RAM drive for Windows currently offered by MS is a

    sample from the DDK which isn’t really suitable for daily use.  

    (I would love to be proven wrong.)

    No, you’re right, it’s not suited for daily (or any) use.  It’s meant as an illustrative example/skeleton for developers, not as production code.

    So, I’m hoping some fellow geek in this thread will recommend a RAM drive

    he or she is happy with, because I haven’t found one yet.  

    QSoft RAMdisk, http://www.ramdisk.tk/.  I’ve tried several RAM drives and this one is the only one that’s been consistently reliable and stable.  Unfortunately it’s not free any more, but it’s worth the small registration fee.

    And yes, there are legitimate uses for RAM drives that geeks would care

    about, like storing all of the things that get written to disk during a

    compile operation.

    I point $TEMP at it, as well as the various registry paths that Windows uses to constantly scribble data to the hard drive (e.g. browser cache, temp files, etc).  It’s amazing how much junk is caught up in the RAM drive at the end of each day.

  38. Dave says:

    Kyle, it %TEMP% is pointing to a read-only volume then you’ve got far, far

    bigger problems than access time.

    I’ve had NT4 do that, I was wondering why the machine was so incredibly sluggish and realised that it was trying to write to a CD (not CDRW, just a standard CD) drive.  At some point during the last time the machine was running it had directed a pile of paths to the CD drive).  Amazingly, it still worked, it was just painfully slow.

    (I’ve also had NT4 eat its own boot sector (fixed with a sector editor), trash partitions, and make the monitor on the computer spin 360 degrees and vomit green slime :-).

  39. Puckdropper says:

    Dave, you must be in to robotics. :-)

  40. Stephen Jones says:

    I got my first computer a couple of months after Win 95 came out. I was advised to double the installed memory from 8MB to 16MB. Some time after Win 98 came out I bought my second computer. It came with 32MB and after a month I doubled it to 64MB.

    What consumers would ever have had the memory to make use of a RAM drive.

  41. Tom says:

    Dave: Thanks – I’ll give that one a try!

    Stephen: Before Windows came along, it wasn’t so easy to make use of memory beyond 640KB.  I used to have a full-length ISA card with tons of chips plugged into it that totaled something like 2 or 4MB maybe?  And there was little to do with it other than use it for a RAM drive.  A few games could make use of it, but not very many.

    Nowadays RAM is dirt cheap.  You can get 8GB worth of 2GB sticks for around $150 from Newegg right now.  That’s easily enough to have a fairly beefy RAM drive with plenty left over…

  42. NB says:

    I have found that Microsoft Reader (for LIT files) works much faster if you map "My Library" via a junction to a RAM drive.

    For some reason MS Reader always writes to the disk when you change the page and this also seems to be a non-cached write since it causes a noticeable disk access and delay every time.

    With a RAM drive the problem goes away.

  43. Darren says:

    RAM Drive?  Foo!  I’d take GrabFS (the Screenshot file system) over a RAM drive any day.

  44. Neil says:

    ReadyBoost is of course an example of how to relieve the disk cache by moving data to faster (well, for reads anyway) media.

    I used to have a Windows 95 PC running a SCSI scanner. (We now use a network scanner/printer device.)

    Windows Explorer’s use of the disk cache to copy files can be worked around by using eseutil /y (if you have it) although I can’t find the document that suggested that.

    If you’re on Windows XP then there’s actually an (unsupported) Microsoft driver that will mount ISO images: http://download.microsoft.com/download/7/b/6/7b6abd84-7841-4978-96f5-bd58df02efa2/winxpvirtualcdcontrolpanel_21.exe

    (I also had a dedicated card, but it could only do 2 of the folowing 3, 8 bit SCSI, 16 bit SCSI, and external, and I had all 3.)

    That’s because cables only have two ends. Use 16 to 8 bit adapters for your 8 bit devices.

  45. John says:

    Windows PE based on Server 2008 (maybe Vista too, but I haven’t tried it) doesn’t need a RAM disk the way earlier PE’s did.  PE/Srv2008 has a filesystem filter driver that allows writes to read-only filesystems/media.  For example, it lets you "write" to a DVD.  This means that %TEMP% is now writable by default on PE.  I think this filesystem filter first made an appearance in Windows XP Embedded.

  46. spamalot says:

    any reason you keep the spam pingback (first comment)?

    [Because I missed it when I returned from vacation and had to wade through hundreds of comments. -Raymond]
  47. zzz says:

    CreateFile has flags for opening temp files that (memory permitting) never touch the HDD and are deleted on closure. I would say that covers many of the RAM drive scenarios.

    Never say never. Either those flags don’t work or more likely there is some very strict limit on "memory permitting".

    I recently tested that and with 2 GB of free memory and a 300 MB file created with those two flags, it all went straight to disk. As disk must be avoided in this particular scenario I have another way to do this it’s just a pain in the * learning curve in order to implement.

  48. zzz says:

    ramdisks:

    I would LOVE TO see a benchmark of VS2008 compiling a medium size ~(1000 .cpp 1000 .h files) project with /CLR switch where one was the standard config and another used ramdisk for all the IO.

    There is absolute ton of UNNECESSARY disk IO during this type of compilation when the whole project (20 MB) should fit in memory (4 GB) and all you want is the resulting single .exe on the god damn DISK. Why is it putting all temporary crap on the disk during compilation?

    (death threat deleted)

  49. Dean Harding says:

    "Why is it putting all temporary crap on the disk during compilation?"

    I thought that was obvious… to avoid compiling every single .cpp files the next time you hit "Compile" and you’ve only modified one file. Pretty much every compiler on the planet does the same…

  50. Ulric says:

    you have to anticipate the inevitable followup-question: "So why didn’t you rewrite it?"

    one doesn’t have to anticipate and reply to that question. It worse to answer it with the classic ‘corporate engineer apology’ (explanation of priorities/threats of which feature would have to be cut/blame lack of resources). We also interact with a large user base on a daily basis.  All the technical stuff is interesting discussion points, by experience I’d just leave out the apologies.  

    I will try next time to merely incorporate it by reference to make you happy

    No, no, no matter.  

  51. David Walker says:

    Writing to a read-only DVD is a neat trick.

  52. Nico says:

    Hu ?

    No ramdrive in Windows 95 ?

    It is strange because I remember using RAMDRIVE.sys.

    And it seem that i am not alone:

    http://www.lagmonster.org/docs/DOS7/v-ramdrive-sys.html

  53. Igor Levicki says:

    Has someone mentioned Vista? :-)

  54. me says:

    It is strange because I remember using RAMDRIVE.sys.

    From the article:

    (Well, okay, you could use the old 16-bit RAM drive, but then you’d be going through the real-mode mapper, at which point your performance would go down the tubes.)

  55. Michiel says:

    Can’t believe that nobody mentioned it yet. Linux actually has a better solution than a RAM disk. It allows you to have files in the file cache without a backing store. There’s still a quota so you don’t eat up all RAM. But this is a quotum, not a reservation. Eg. a 1GB RAM disk takes away 1GB of RAM from the file cache. A 1GB quotum on non-backed files, 50% used only takes away 512MB from the file cache.

    But I’d like the PAE idea. It could allow the full use of 4GB RAM on a 32 bit machine. Many existing applications would need no change to use a 512MB ramdisk.

  56. Dave says:

    I recently tested that and with 2 GB of free memory and a 300 MB file created with those two flags, it all

    went straight to disk. As disk must be avoided in this particular scenario I have another way to do this

    it’s just a pain in the * learning curve in order to implement.

    You’re running the wrong test, if you try it with lots of short-lived small files they shouldn’t be written to disk.  Note that you’ll see them with a ‘dir’, but that doesn’t necessarily mean that they’ve been committed to disk from the in-memory cache.

    (I don’t know what the exact heuristics are for handling these files and they probably change over time as the FS code gets tuned, but the contract seems to be that genuinely temporary files, short-lived scratch files and the like, are less likely to get written to disk than ones without the flag set.  A 300MB file wouldn’t fit the bill for "short-lived scratch file").

  57. Dave says:

    "Why is it putting all temporary crap on the disk during compilation?"

    I thought that was obvious… to avoid compiling every single .cpp files the next time you hit

    "Compile" and you’ve only modified one file. Pretty much every compiler on the planet does the same…

    No, you’re thinking of the wrong thing.  VC++ is a command-line compiler, VS is the GUI front-end.  When VS builds an object file from source it simply passes the build command to the multi-pass command-line back end.  Since it’s multi-pass each pass scribbles its output to disk, to be deleted again almost immediately when the next pass reads it back in.

    This is why you need a RAM drive.

  58. Dave says:

    Writing to a read-only DVD is a neat trick.

    Quite possible under Unix with UnionFS, and going from John’s post recent copies of Windows PE as well.

Comments are closed.