Jump to content











Photo
- - - - -

Is 512MB the default size for an ImDisk ramdisk?


  • Please log in to reply
8 replies to this topic

#1 DMcCunney

DMcCunney
  • Members
  • 4 posts
  •  
    United States

Posted 19 July 2015 - 02:38 AM

I think I'm missing something.  I discovered ImDisk a while back and grabbed it happily.  I started using ramdisks in MSDOS in the 80s, and I was delighted to find an open source ramdisk driver for Windows that ran in my 64bit Win7 environment.  I recently upgraded to the 2.0 build.

 

The first disk I created was a 512MB NTFS device, and it worked fine.  But I discovered that I needed a larger one, so I deleted the original and created a new one with a gigabyte of space.  It worked fine.

 

When I shut down and rebooted, the ImDisk ramdisk was there, but it was 512MB.  I haven't seen anything in the docs that indicates 512MB is the default size.  If the driver is going to remember a drive existed after a reboot, shouldn't it remember the size of the previously existing drive?

 

(I'm not concerned with preserving the content.  ImDisk is used for browser profiles and cache.  Those are loaded from Zip files on the hard drive when Windows boots, and the Zip files are updated on shutdown from the ramdisk by scripts that run on boot and shutdown.)

 

I've read the FAQ, and I know I can create a drive of the desired size from Windows scheduler.  That's the next step.  I'm just curious about the current behavior.

________

Dennis


Edited by DMcCunney, 19 July 2015 - 02:39 AM.


#2 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1448 posts
  • Location:Borås, Sweden
  •  
    Sweden

Posted 29 July 2015 - 10:49 PM

Sorry for not having answered this earlier, but I find this a little bit surprising. I would guess that your first ram disk somehow was not fully removed and that it somehow got recreated again when you rebooted. There are no default sizes or anything like that in ImDisk.



#3 DMcCunney

DMcCunney
  • Members
  • 4 posts
  •  
    United States

Posted 30 July 2015 - 01:49 AM

Sorry for not having answered this earlier, but I find this a little bit surprising. I would guess that your first ram disk somehow was not fully removed and that it somehow got recreated again when you rebooted. There are no default sizes or anything like that in ImDisk.

 

Thanks for the reply.

 

I'm surprised too, as I didn't see anything that hinted at this behavior as a default.  When I created the new one I used the Control Panel interface to remove the existing ramdisk, then created a new one with a 1GB size.  I didn't simply extend the existing 512MB disk to 1GB, so I didn't understand where the 512MB size was coimng from..

 

At the moment, I have a 767MB ImDisk ramdisk, created by extending a 512MB disk by another 256MB.  If I rebooted and it were back to 512MB again, that would be understandable.  Having the drfive recreated on reboot is behavior I would actually expect

 

Speaking of which, it's nice I can add capacity to an existing ImDisk ramdisk.  Is there any chance a future version will let me shrink it as well?

 

(I'd love a dynamic ramdisk that could expand and shrink automatically as data was added/removed, but I don't expect to see that.)

 

Thanks again,

______

Dennis



#4 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1448 posts
  • Location:Borås, Sweden
  •  
    Sweden

Posted 30 July 2015 - 08:22 AM

Thanks for the reply.
 
I'm surprised too, as I didn't see anything that hinted at this behavior as a default.  When I created the new one I used the Control Panel interface to remove the existing ramdisk, then created a new one with a 1GB size.  I didn't simply extend the existing 512MB disk to 1GB, so I didn't understand where the 512MB size was coimng from..
 
At the moment, I have a 767MB ImDisk ramdisk, created by extending a 512MB disk by another 256MB.  If I rebooted and it were back to 512MB again, that would be understandable.  Having the drfive recreated on reboot is behavior I would actually expect


Did you have a scheduled task or something that recreated the ram disk at startup? If not and if you only use Control Panel applet and you still see your ram disk reappear automatically after next startup, I would guess that you are using Windows 8/8.1. If you shutdown and then start up again (not reboot) i Windows 8/8.1, they by default save state of kernel and drivers, which in this case includes the ram disk to be saved to physical disk. In that case you can see the difference when you select reboot instead of shutdown.
 

Speaking of which, it's nice I can add capacity to an existing ImDisk ramdisk.  Is there any chance a future version will let me shrink it as well?

 

Yes, I have had some plans for that. It should not be too difficult to implement, it seems.

 

(I'd love a dynamic ramdisk that could expand and shrink automatically as data was added/removed, but I don't expect to see that.)

 
That's not as easy as manual expanding/shrinking, but there are ways to solve this. I would recommend you to try ImDisk Toolkit. There is a feature there called "RamDyn" that creates a ram disk with a fixed virtual size, but where the actual allocated size grows and shrinks automatically when files are created or removed.

 

http://reboot.pro/fi...imdisk-toolkit/



#5 DMcCunney

DMcCunney
  • Members
  • 4 posts
  •  
    United States

Posted 18 August 2015 - 06:22 PM

Did you have a scheduled task or something that recreated the ram disk at startup? If not and if you only use Control Panel applet and you still see your ram disk reappear automatically after next startup, I would guess that you are using Windows 8/8.1. If you shutdown and then start up again (not reboot) i Windows 8/8.1, they by default save state of kernel and drivers, which in this case includes the ram disk to be saved to physical disk. In that case you can see the difference when you select reboot instead of shutdown.

 

Nope.  The machine this occurs on runs Win 7 Pro.  I don't have Win 8/8.1 here.

 

I dual boot Windows and Ubuntu, and originally defined a 512MB ImDisk as Z:.  It doesn't matter if I shut down and cold boot into Windows, reboot into Ubuntu and then reboot back into Windows, or reboot Windows because something like an MS Update requires it.  When Windows is fully loaded and running, there's a 512MB ImDisk ramdisk seen as Z:   This is not a showstopper bug, merely a curiousity.

 

And there is no schedulked process to create  the ramdisk.  There is a startup script through Group Policy Editor that populates the ramndisk with data.  I use the ramdisk to hold my Firefox profile and cache.  The profile is stored on the HD as a zip file, and unzipped to the ramdisk on boot.  A corresponding shutdown script zips it back again to catch changes.  Firefox is run via a shortcut that specifies the profile to use, and the profile is defined as living on the ramdisk.  Firefox has also been told to place the cache on the ramdisk, but it places it in a seperate FFcache directory instead of in the profile, and I don't bother to preserve it between boots.

 

> Speaking of which, it's nice I can add capacity to an existing ImDisk ramdisk.  Is there any chance a future version will let me shrink it as well?

Yes, I have had some plans for that. It should not be too difficult to implement, it seems.
 

Thank you!  If it can be expanded, it should be possible to shrink it.  The main issue I can see is not letting it shrink smaller that the space currently occupied by data.

 

> (I'd love a dynamic ramdisk that could expand and shrink automatically as data was added/removed, but I don't expect to see that.)
 
That's not as easy as manual expanding/shrinking, but there are ways to solve this.

 

I didn't think it wouild be easy, which is why I didn't expect to see it.

 

I would recommend you to try ImDisk Toolkit. There is a feature there called "RamDyn" that creates a ram disk with a fixed virtual size, but where the actual allocated size grows and shrinks automatically when files are created or removed.
 

Off to look as we speak.  The big win for me would be automated growth, so I don't have out of space "Oops!"  moments.

 

Thanks again.

______

Dennis



#6 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1448 posts
  • Location:Borås, Sweden
  •  
    Sweden

Posted 15 December 2015 - 03:34 PM

Waking up this old thread again. I got an e-mail from a user who uses ImDisk to create RAM disks.

 

Sometimes, when I created a RamDrive with ImDisk, and I want to format it, Windows limits the size to 500 MB, wants to label it „ESP“ and never finishes the formatting process. What does cause that?

 

I don't know really why this happens and I'm not entirely sure it is related to the discussion in this thread, but it is interesting. Apparently, a 500 MB EFI system partition ("ESP") is mistaken for an ImDisk RAM disk. I suspect something similar could have happened for the user who started this thread. The size 512 MB and that this disk appeared with the same size after every reboot points in that direction.

 

But then, I wonder why the confusion took place in the first place. Could there have been some drive letter collision that made the same drive letter used for both the ESP partition and the ImDisk RAM disk and that the drive letters pointed to different things depending on whether the process was running elevated or with restricted permissions? Something else? There will probably be more things to investigate here!

 

 



#7 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 15 December 2015 - 04:30 PM

Well, "and I want to format it" and "Windows limits" is not a description of what happens.

 

As I see it there are two ways (excluded the "built-in" feature in IMDISK) to format a IMDISK volume:

1) right click on a drive letter in Windows Explorer and choose to format

2) invoke from command line format.com providing a drive letter among the arguments/parameters

 

So *something* must have assigned a drive letter to *something else* AND the *something else* must be recognized as an ESP partition.

 

The IMDISK volume is not "visible" in Disk Manager and it is also not seen in Mountvol, so the only way to select an ESP partition (if not by it's drive letter) could be through diskpart :dubbio:

 

On the other hand, a common enough issue with drive letters is the use of letters assigned to network devices/paths, but I doubt that something like that can cause the "ESP partition" issue, at the most that could *somehow* shift letter assignment. :unsure:

 

We need a full DETAILed description of the setup of the user and the EXACT way he attempts the format to (maybe) understand what the issue could be, we don' t even know if he/she is using any of the stupid Windows 8/8.1/10 :ph34r: newish OSes (that may have introduced some stupid incompatibility).

 

BTW, the same applies to the OP posts, of course no offence intended :), but they simply lack any meaningful detail to attempt to understand what might be the cause or to reproduce. :frusty:

 

:duff:

Wonko


  • Olof Lagerkvist likes this

#8 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1448 posts
  • Location:Borås, Sweden
  •  
    Sweden

Posted 15 December 2015 - 10:55 PM

Generally agree with you Wonko. But being a developer I'm simply too used to try to figure out what user has done, what the user wanted to do, what happened, why that happened, what exactly was a problem for the user and what to do about it, without any (or, almost :frusty: :devil: ) useful information about it. Sometimes it actually works pretty well, but sometimes the wild guesses could go just too far in the completely wrong direction...  :juggler:

 

:cheers:



#9 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 16 December 2015 - 08:43 AM

Yep :), to some extents it is part of the game, still the "I'm ill, doctor. Help!" approach remains a not-so-effective one, generally speaking: 

http://homepage.ntlw...ard-litany.html

 

:duff:

Wonko






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users