Announcement

Collapse
No announcement yet.

OSFMount: RAM Disk's memory allocation.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • OSFMount: RAM Disk's memory allocation.

    Hello,

    I've just started using your software to create a RAM-DIsk and was wondering if you could consider adding an option for the memory allocation to be performed dynamically as needed instead of allocating the whole disk size in one go?


    Best regards.


  • #2
    Probably not.
    This would either result in,

    1) Periodic freezes in the operation of the RAM drive. As when new RAM would be allocated / deallocated, the contents of the old buffer would need to be copied into the new buffer and during this period no reading or writing could be done. Having inconsistent performance from a RAM drive removes the main motivation for having a RAM drive. Also peak memory usage would be around double what it is now. So to have a 8GB RAM drive, up to 16GB+ of RAM would be required (as two buffers would be required during the expansion process).

    or

    2) Non linear memory access, which is more efficient in terms of RAM usage, but results in the contents of the RAM drive being split across multiple different blocks. So a lookup table would be required for each read / write operation. e.g. what memory range contains block 50,000 of the disk? Also if you do a disk read that crosses the memory range. multiple internal copy operations need to be computed and performed. So there would be a performance impact and it adds a lot of complexity.

    Easier solution might just be to create two RAM drives. Or just buy more RAM (16GB is now only $50)

    Comment


    • #3
      Thanks for your prompt and detailed reply.

      Well, for the past years i have been using ImDIsk on Windows 8.1 and it does work that way allocating the needed memory on-demand only, last week i brought a new laptop with Windows 11 and looking for a replacement i found OSFMount that was stated to be the faster solution around (or that was said in some random article that was comparing several programs to create RAMDisks), i am now certain it's the faster because it does allocates the whole disk size in one go - which is fine and desirable overall.

      However, some of us may don't mind about a performance degradation here if instead of 12GB/s we may get ~9GB/s then with such an option enabled, it will be the user choice (i.e. i am not asking to replace the current approach, only asking to add an option to let the user decide)

      I do have 32GB of RAM and would like a RAM-Disk with ~20GB so it's just i do find odd Windows does report memory is almost exhausted when it really is not.

      Would you consider adding such option if i do sponsor it?

      Best regards.

      Comment


      • #4
        If ImDisk does what you want (but is slower) why not just stick with that tool?

        The difference between high end PCIe SSDs and RAM drives is now fairly small (at least compared to what it was 10 years ago). So the raison d'être of RAM drives is disappearing. Lowering the performance further reduces the need for a RAM drive as a SSD could be used instead. The market RAM drives is rather small. The market for slow RAM drives is very small indeed.

        RAM drives (emulating hard drives) require a device driver. Device drivers are hard to code, hard to debug and hard to get code signed and working on all versions of Windows. So even very minor changes can take days of effort to get it tested and released. So yes, if someone was willing to drop a very large bucket of money on us, we could have a look at this. But I am not seeing the demand otherwise. I think this is the 1st request for this feature in 12 years of developing the tool.

        Comment


        • #5
          ImDisk cannot work on Windows 11 (or so i heard, didn't attempted to install it to prevent messing the system just in case), so... that is why

          Alright, I do understand this might not be trivial to do (although ImDisk is open source under a WTFPL license, at least it won't be doing it from scratch), in any case i am a single person (not a company), so i cannot drop a large bucket here, feel free to send me an email if you want to discuss further.

          Best regards, and thanks for your time.

          Comment


          • #6
            Originally posted by David (PassMark) View Post
            If ImDisk does what you want (but is slower) why not just stick with that tool?

            The difference between high end PCIe SSDs and RAM drives is now fairly small (at least compared to what it was 10 years ago). So the raison d'être of RAM drives is disappearing. Lowering the performance further reduces the need for a RAM drive as a SSD could be used instead. The market RAM drives is rather small. The market for slow RAM drives is very small indeed.

            RAM drives (emulating hard drives) require a device driver. Device drivers are hard to code, hard to debug and hard to get code signed and working on all versions of Windows. So even very minor changes can take days of effort to get it tested and released. So yes, if someone was willing to drop a very large bucket of money on us, we could have a look at this. But I am not seeing the demand otherwise. I think this is the 1st request for this feature in 12 years of developing the tool.
            Well there is still a good use case/raison d'être for RamDrives: avoiding killing the SSD TBW by navigators. In just a few months mine is already 34TBW, and when I check, with all the adds in the browsers and cache, browser are spending most of their time caching stuff. And reducing cache size doesn't help, since is is just increasing the cache rotation speed. Offloading all this to ramdrives stop this TBW killing. This also speed up browsing as disk write is still (yet) much slower than memory.
            Some ramdrives products (Ultra Ramdisk for example) even now propose to directly offload browsers caches to ramdrives.
            As usual, the more memory/speed/CPU we have, the more speedy they are, softwares doesn't make any huge effort to be reasonable in resources consumption.
            So this is not the end of the story, yet

            Comment


            • #7
              You don't get to 34TBW from browser ads. Most of the stuff browsers cache is written once and read many times.
              If each ad was 20KB in size, then to get to 34TB you would need to download 1.7Billion ads. If you looked at 1000 ads a day, it would take you 1.7million days of browsing to get to 34TB of ads.

              This also speed up browsing as disk write is still (yet) much slower than memory.
              Unfortunately no. Your internet speed is much slower than both RAM and local SSD. This combined with the latency to the web server & DNS is most of the bottle neck. (and slow CPUs on some machines)

              And the RAM drive's content are not stored across a machine reboot (unless you write them to disk and thus remove the claimed benefit of not writing to disk). So if you reboot the machine you have no cache and need to download it all again from the internet. Making browsing much slower as you won't have anything cached again for a while.

              Further for many people, creating a RAM drive will reduce the available RAM for disk caching. Or even if they have ample RAM, then it won't be any faster than using the built in Windows disk cache.

              Better strategy is to just run an ad blocker in your browser.

              Ultra Ramdisk is a commercial product so it is strongly in their interests to cherry pick the claimed benefits of RAM Drives. OSFMount is free so we can be more balanced in it's claimed benefits.


              Comment


              • #8
                Ok I don't say Firefox is the only one who ate those 34TBW, of course.
                But you don't have the whole picture: I always have plenty of windows/tabs opened at the same time, all the time (yes, MY bad , and Firefox is most of the time the first in disk activity !!! 20 to 50 writing processes at the same time, all the time. Small size of course not VM xfer. But it also keeps all it's cache SQLite DB, one per site, written on disk. Some pages are very long and adds keeps changing all the time, you can have 50 adds a page. We are far from really light pages those days, and it get worst every day. Plenty of sites caches are more than 100MB ! Sure I can reduce cache size, but as you similarily said, then this is more reconsuming on the fiber when rotation is done.
                I have no doubt FF is really consuming to manage all that disk + memory. I fully agree Internet is also adding extra cycles.
                I partly have some ad-blocker, but then more and more sites are complaining this is not fair and most refusing access then. I cannot really blame then of course. But I can reassess this more in details, you are right.
                Anyhow I just migrated this morning all those disk activity on RAM disk, and FF is more fluent now (This was the week-end topic study, hence my presence on this nice forum).
                There are options to flush from time to time RAM disk to image/directories or during shutdown, hence this allows keeping everything after a reboot but at lower cost than immediate direct to disk, done deal
                Next step would be most tmp stuff.
                I have 80 gigs of RAM now, so taking 4 for FF cache is no problem

                Tks.

                Comment


                • #9
                  Screen shot of disk activity from Chrome with around 15 tabs open.

                  Average over 60sec was around 0.1MB/sec of writing. If you did this non stop for 8 hours per day, it would take 32 years to get to 34TBW. So I am far from convinced it is a problem that needs solving.

                  Also a good chunk of the writing isn't to the resource cache. It is to log files. So moving just the cache to a RAM disk doesn't remove all the writing.

                  Click image for larger version

Name:	Browser-Disk-Usage.png
Views:	527
Size:	370.1 KB
ID:	53738


                  Comment


                  • #10
                    Re Firefox browser, RamDisk not needed for cache. See: browser.cache.memory.enable​

                    https://kb.mozillazine.org/Browser.cache.memory.enable

                    Comment

                    Working...
                    X