Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Increase memory for ant

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

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

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.

like image 511
sharkbait Avatar asked Mar 13 '23 18:03

sharkbait


1 Answers

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

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)

like image 137
Cootri Avatar answered Mar 19 '23 21:03

Cootri