增加蚂蚁的记忆力 [英] Increase memory for ant

查看:25
本文介绍了增加蚂蚁的记忆力的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有关于内存使用的问题.我有 8 GB 的内存,我的蚂蚁设置是这样的:

I have an issue about memory usage. I had 8 GB of RAM and I had my ant settings like this:

set ANT_OPTS=-Xmx512m -XX:MaxPermSize=2G

现在,我已经安装了 16 GB 的 RAM,但是当我运行 ant clean all 时,这需要相同的时间来编译.

Now, I have installed 16 GB of RAM but when I run an ant clean all, this take the same time to compile.

我必须如何设置选项以增加内存和速度?我有 Windows 7 64 位和 16 GB RAM.我使用 Eclipse,但我从 cmd 运行 ant clean all 和 server Tomcat.

How I have to set the options to increase memory and speed? I have Windows 7 64bit and 16 GB RAM. I use Eclipse, but I run ant clean all and server Tomcat from the cmd.

推荐答案

你有奇怪的配置 - PermGen 的大小是 Heap 的四倍.也许这是一个错字?试试这个:

you have strange configuration - PermGen size is four times bigger than a Heap. Maybe it is a typo? Try this:

set ANT_OPTS=-Xmx2G -XX:MaxPermSize=512m

但是与ant没有太大关系——大项目需要很长时间才能构建.不要忘记,这个过程会消耗很多CPU(那么最好让ant 使用多个线程通过并行任务自定义运行时)或有HDD瓶颈(在这种情况下考虑使用SSD甚至RAM驱动器)

But there is no much to do with ant - big project needs a long time to build. Do not forget, that this process can consume much CPU (then it's good idea to make ant use multiple threads by parallel tasks or custom runtime) or have HDD bottleneck (consider using SSD or even RAM drive in this case)

这篇关于增加蚂蚁的记忆力的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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