优化使用Ramdisk进行Eclipse开发 [英] Optimize Use of Ramdisk for Eclipse Development

查看:176
本文介绍了优化使用Ramdisk进行Eclipse开发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用Eclipse在具有4GB RAM的32位Vista机器上开发Java / SpringSource应用程序。由于虚拟地址空间中的硬件等的预留,操作系统暴露了大约3.3GB的RAM。我遇到了几个Ramdisk驱动程序,可以从操作系统隐藏的RAM创建一个虚拟磁盘,并且正在寻找如何最好地使用740MB虚拟磁盘来加速我们环境中的开发。



我们开发的最慢的部分是编译以及启动SpringSource dm服务器。



一个选项是配置Vista以交换Ramdisk。这样做很有效,并且显着加快了在低内存情况下的发展。但是,操作系统可用的3.3GB通常是足够的,有很多情况下我们不会使用交换文件。



另一个选项是使用Ramdisk作为临时文件的位置。使用Vista mklink命令,我创建了一个从SpringSource dm服务器的工作区通常驻留到Ramdisk的硬链接。这显着地提高了服务器启动时间,但对编译时间却没有任何作用当工作目录被充分利用时,Ramdisk上仍然有大约500MB的空闲空间,所以还有更多的空间。



还有哪些其他文件/目录可能是在Ramdisk的?与Eclipse相关的文件? (部分)JDK?



是否有一个可用于Vista的免费/开源工具,可以显示在一段时间内最频繁使用哪些文件,以减少猜测?

解决方案

这是我做的



移动到Ramdisk :




  • JDK(删除了一些不必要的文件,如demos,src.zip)

  • Eclipse插件目录

  • SpringSource工作目录

  • SpringSource库目录



有一个简单的技巧,可以将文件夹(或文件)移动到虚拟磁盘,而无需对配置进行单一更改。


  1. 将文件夹复制到Ramdisk

  2. 重命名原始文件夹(我添加了-COPY到最后)

  3. 使用 mklink / J 命令从磁盘上的目录所在的位置创建一个链接,然后将其重命名为您在Ramdis上复制的目录k

例如:

  cd C:\Dev\Apps 
Xcopy jdk R:\jdk\ / s
ren jdk jdk-COPY
mklink / J jdk R:\jdk

我选择的Ramdisk有一个选项可以在系统关闭时保持状态(假设没有崩溃)。我选择将相对静态文件移动到Ramdisk上,所以一旦我有一个很好的重新启动,我应该总是在我需要的状态下找到我的Ramdisk。



-Vista机器可以替代来自SysInternals的连接,用于mklink。


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:

  • JDK (deleted some unnecessary files e.g. demos, src.zip)
  • Eclipse plugins directory
  • SpringSource work directory
  • SpringSource library directories

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.

  1. Copy the folder to the Ramdisk
  2. Rename the original folder (I added -COPY to the end)
  3. Use the mklink /J command to make a link from the place on disk where the directory used to be before you renamed it to where you copied it on the Ramdisk

For example:

cd C:\Dev\Apps
Xcopy jdk R:\jdk\ /s
ren jdk jdk-COPY
mklink /J jdk R:\jdk

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.

这篇关于优化使用Ramdisk进行Eclipse开发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆