We're developing Java/SpringSource applications with Eclipse on 32-bit Vista machines with 4GB RAM. The OS exposes roughly 3.3GB of RAM due to reservations for hardware etc. in the virtual address space. I came across several Ramdisk drivers that can create a virtual disk from the OS-hidden RAM and am looking for suggestions how best to use the 740MB virtual disk to speed development in our environment.
The slowest part of development for us is compiling as well as launching SpringSource dm Server.
One option is to configure Vista to swap to the Ramdisk. That works, and noticeably speeds up development in low memory situations. However, the 3.3GB available to the OS is often sufficient and there are many situations where we do not use the swap file(s) much.
Another option is to use the Ramdisk as a location for temporary files. Using the Vista mklink command, I created a hard link from where the SpringSource dm Server's work area normally resides to the Ramdisk. That significantly improves server startup times but does nothing for compile times. There are roughly 500MB still free on the Ramdisk when the work directory is fully utilized, so room for plenty more.
What other files/directories might be candidates to place on the Ramdisk? Eclipse-related files? (Parts of) the JDK?
Is there a free/open source tool for Vista that will show me which files are used most frequently during a period of time to reduce the guesswork?
Here's what I did
Moved to the Ramdisk:
There's a neat trick that lets you move folders (or files for that matter) to the virtual disk without making a single change to configuration.
For example:
The Ramdisk I selected has an option to persist state upon system shutdown (assuming there is no crash). I elected to move only relatively static files onto the Ramdisk, so once I have one good reboot, I should always find my Ramdisk in the state I need it.
On pre-Vista machines you can substitute junction from SysInternals for mklink.
I am using the SoftPerfect RAM Disk software. I installed the JDK, Eclipse, Maven, Gradle, and Ant on it. Also my workspace, my development git repositories and the local Maven repository (all downloaded dependencies) are on the RAM drive. I also created a "user home" directory on the RAM drive and I changed eclipse.ini to point to this new "user home" directory. Performance has improved dramatically and Eclipse now starts up under 10 seconds. I documented my approach here:
http://www.whizu.org/articles/how-to-install-eclipse-on-a-ramdrive.whizu
I don't think move JDK and plugins folder to the ramdisk is a good solution for this case, since most time these IO is not the bottleneck for eclipse. I tried with your solution, and found that the workspace.metadata folder should be move to the ramdisk, that could help the build and execute speed. And if possible, you should move all your workspace folder under the ramdisk, and use some version control to ensure the data safe. Good luck.
You can try to move your Eclipse workspace into a ram disk. I am pretty sure neither javac, nor Eclipse compiler are using any temp files, so it goes straight from the *.java files to *.class files plus copying resource files from source location into a target folder.
Another alternative you may want to consider is to use a solid state drive (SSD). You are going to see a significant performance improvements in many areas that are heavily reading and writing files from disk.