Ramdisk in XP?

Discussion in 'Windows Virtual Machine' started by BryanM, Dec 14, 2010.

  1. BryanM

    BryanM Member

    Messages:
    23
    Is there a way to create a ram disk under Parallels to speed up a disk intensive task?
     
  2. lnemo

    lnemo Hunter

    Messages:
    114
    Yes, the Gavotte ramdisk software is free of charge and ready for XP. I use it to set the swapfile there. Works great.
     
  3. BryanM

    BryanM Member

    Messages:
    23
    Thanks very much. It works great in my application.
     
  4. Harry Binswanger

    Harry Binswanger Member

    Messages:
    37
    Gavotte ramdrive software

    I have downloaded the Gavotte ramdrive software, per the recommendation. I want to use it for XP's swapfile, but I can't quite figure out how to do that. Is the whole thing done inside the XP Virtual Machine? Does Mac know about this drive? I have 8G of memory and wonder whether I should take the 3 or 4 G needed for the swapfile from the Mac side or the XP side. Confusing.
     
  5. lnemo

    lnemo Hunter

    Messages:
    114
    It's all done within the VM. Gavotte establishes a RAMdisk within the boundaries of RAM you specified for the VM. Example: With 1.5 GB assigned to the VM, I give, let's say, 500 MB to the RAMdisk leaving 1GB of regular RAM inside the VM.

    What size your swapfile should be depends of what you're doing inside the VM. For simple 2D office tasks, XP doesn't need more than the aforementioned 1 GB RAM inside a VM, so I would configure a swapfile not bigger than 500 MB (50% of the regular RAM).

    The RAMdisk appears as a drive inside Windows explorer, and that's why you can point the swapfile to that drive. I don't know whether this drive is seen by the host OS, because my VMs don't share any drives. Google is your friend concerning step-by-step advisory like that one here.
     
  6. Harry Binswanger

    Harry Binswanger Member

    Messages:
    37
    Thanks so much! I went to the link you provided, and originally had trouble--XP wouldn't let me open the drive--but then I read more closely and see you may have to reboot after installing. I did reboot and everything was good. And then I set the pagefile to be on the R.

    If you know anything about XP's optimal memory, maybe you could advise: the machine has 8G installed. Parallels is set to give 2G to the Mac (which I rarely use) and 6 to the XP VM. Now I've assigned 2G (of that 6) to the ramdrive, and set the minimum and maximum pagefile specs to: 1024 and 2045 (that being the ramdrive's max). Does this make sense?

    A friend suggests also putting temp files on the ramdrive. That would require altering the above.

    Do you have any recommendations? My goal is fastest operation, which seems to be tied to disk I/O.

    --Harry
     
  7. lnemo

    lnemo Hunter

    Messages:
    114
    Hi Harry, it depends on what you're doing with the VM, i.e. what kind of applications you use. 2GB RAM for an XP machine is overdone with only MS office running:)

    I have no numbers about the XP's temp folders' size. But since all data will be gone every time you shut down, there will no accumulation like on a 'normal' system. 200 to 300 MB should be enough. I didn't try this up to now, and I don't know, whether you will experience a speed boost, but I probably will do it for the sake of getting rid of all that over-fluent data at the end of each session.

    Maybe (depending of your software) there are more possibilities using the RAMdrive as workspace for the programs running inside the VM. Programs like video editors have their own scratch and temp folders that you can point to the RAMdisk.

    And yes, HHD I/O always is the bottleneck, esp. with a laptop. If you really, really want ultimate speed, consider buying a SSD. I did, and my XP VM goes like a rocket. Since you wrote you don't work much with the MAC host at all, even a small and therefore affordable SSD would do it. My XP VM is linked to my company's domain, so the domain logon makes the startup process rather slow, but my Win 7 VM starts in 15 sec:)
     
  8. Harry Binswanger

    Harry Binswanger Member

    Messages:
    37
    SSD? This arose because I put in a 256G Crucial C300 SSD! A friend then suggested a ramdrive as faster than the SSD. So now I'm pretty confused. Maybe I actively want a large pagefile.sys, if it's assigned to the ramdrive and that is faster than interacting with the SSD.

    I don't use PhotoShop or anything that I know to be a big memory hog. I do keep a lot of firefox tabs open, and that's the biggest consumer of RAM.

    Crucial under XP doesn't have TRIM, and that's one concern. I followed some tweaks for SSDs that I got from:

    http://www.ehow.com/how_6551234_tweak-xp-ssd.html

    http://www.ocztechnologyforum.com/forum/showthread.php?43460-Making-XP-pro-SSD-friendly

    and it's pretty damn fast. But I'd like faster loading of programs. And I'm completely confused about what to do for pagefile.sys. Right now I have it set for "No paging file."

    Last night I was playing around with the Gavotte ramdrive and these pagefile settings and something went terribly wrong, destroying Parallels' mouse driver and making my XP mouse act horribly, almost unusable--erratic and much too fast. No mouse setting in XP or Mac could fix it. I even uninstalled it in Device Manager and rebooted, but no Parallel's driver. Had to spend 5 hours today restoring things from various backups (I have 5--count 'em 5--backup systems, and boy am I glad, because two of them weren't backing up right).

    While I have you, how come when I right click on the .HDD file for the XP VM I don't see either Parallels Explorer or Mounter? The Mounter can be launched as an app, so that's good enough, but the docs say I should have it as an option when I right-click.

    Anyway, thanks for all your help.

    --Harry
     
  9. lnemo

    lnemo Hunter

    Messages:
    114
    Aaaaah, I understand. Six points:

    1. Yes, RAM is faster than a SSD. But with a Vertex 2 in my McBook Pro (around 270 MB/s read/write) I dare say that I'm not able to notice the difference within a VM except loading a prog for the second or third time, what's faster with the prog still in RAM. I esablished the RAMdisk solely because I was told it would reduce the workload on the SSD.

    I also switched off the 'last access stamp' feature. You know, every time you READ a file, it's acually opened and written a time stamp to it so in file properties you can see when the file was accessed for the last time. This is an unnecessary information for most users so you can prevent Windows from doing so. There is a similiar tag in Mac OS X and you can turn that off too.

    Again, this is only to reduce SSD accesses. Even on my second MacBook Pro with a regular 7200 HDD I couldn't notice any speed gains with all changes I did. So it's even more unlikely that I can feel any speed bump with a SSD.

    2. As far as I know the TRIM command can't be issued to the SSD out of a VM because it's a native command that won't pass the VM's hypervisor. So even if you had Win 7 inside your VM, there would be no TRIM. I escaped this problem with the Vertex 2 SSD which features a Sandforce controller with some kind of internal TRIM.

    3. I remember that calculation overhead for memory management increases drastically with bigger RAM in the VM. There are recommendations by Parallels for that (I think it's 2 GB overall RAM for XP). Maybe too much RAM causes a speed decrease.

    4. I know that people tried to work with no swapfile at all when RAM got cheaper because it's so much faster then the HDDs of those days. Many problems occured since XP always swaps data even with tons of free RAM. Those mechanisms got screwed from time to time on systems withot swapfile. I think the RAMdisk is a solution to that because XP thinks it actually has a swapfile even if it's in RAM.

    5. Parallels tools, the driver set inside the VM, is pretty sensible. That's not limited to Parallels. I used VMware Fusion before, and colleagues use Virtual Box, it's all the same. As a rule of thumb: After applying hardware related changes to the VM, reinstall your Parallels tools from the 'Virtual Machine' menu. One time more doesn't hurt. I you encounter any problems with the Parallels tools, deinstall them completely, restart VM and install them again. That heals most problems (not all ...:))

    6. RAMdisk size again: After posting in this thread yesterday, I went increasing RAM in the VM, increasing the RAMdisk to 1G with 500MB swapfile and moved all the tmp/temp/internet explorer temp etc. files to the RAMdrive. No speed bump again, but I can say in my current VM session which is running since 5 hrs, the temp folder's size is under 30 MB. The space reserved for it is up to 500 MB, and that's enough till I download a file that's bigger than 500 MB. Since all downloads are bufferd in the temp folder, I couldn't work with files bigger than the space I reserved. That's no real problem: In this rare case I would download the file in the Mac host and move it to the VM then. But if I worked with bigger files frequently, I probably would raise limits in the RAMdiske (meaning assining more RAM to the VM and increasing the RAMdisk. So your needs may be others than mine:)

    As for the mounter - here I can't help. As I mentioned earlier, I almost isolate my VMs from the host except clipboard usage, so I never tried accessing the .hdd file from the host, sorry.

    Best regards
    --Chris.
     
  10. Harry Binswanger

    Harry Binswanger Member

    Messages:
    37
    Chris,

    A lot to think about here. Maybe I've given too much RAM to the XP VM. As to assigning temp files, especially downloads, to the ramdrive, where do I set that? I know I can tell Firefox where to download files to, but that's not the temp files, as I understand it.

    What does re-installing Parallels Tools accomplish? I thought you meant it would make Parallels Mounter appear when I right-click, but from your last comment, that's not so.

    --Harry
     
  11. lnemo

    lnemo Hunter

    Messages:
    114
    Hi Harry, see here for changing the environmental variables and here for moving IE temp files.

    Parallels tools is a driver set for the virtual hardware components the hypervisor uses. Every time a change to that hardware happens (as the number of CPU cores assigned to the VM, or a second virtual HDD), it's like a change to real hardware.

    Reinstalling the driver set is not explicitly needed every time you change something of the virtual hardware as the first installation of the Parallels tools cover most of the changes that could happen. But people experienced that reinstalling from time to time doesn't hurt:)

    Sorry I can't explain better - I'm not a native speaker and my English is limited when it comes to complex connections ... however reinstalling Parallels tools only helps inside the VM. They've nothing to do with tasks to the host computer.

    Best regards
    --chris.
     
  12. Harry Binswanger

    Harry Binswanger Member

    Messages:
    37
    Thanks so much. I understand. No need to apoogize for your English, it's perfect.
     
  13. lnemo

    lnemo Hunter

    Messages:
    114
    :)

    All the best
    --chris
     

Share This Page