Azzurite / evolutionchamber

Automatically exported from code.google.com/p/evolutionchamber
0 stars 0 forks source link

Virtual memory exceeded error #83

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Start a run with the following settings: final - 5 mutalisks, deadline 
120:0, worker parity - until saturation, disable extractor trick, disable 
push/pull workers.

What is the expected output? What do you see instead?
Expected a run with no errors. Received error message from Windows, "virtual 
memory exceeded".

What version of the product are you using? On what operating system?
Internal build r61.
Windows XP SP2 x64.

Please provide any additional information below.
The PC has 16 GB RAM and virtual memory was set to be 4-12 GB.
In the task manager javaw.exe was seen to be using approximately the same 
amount of RAM and virtual memory (~3.5 GB).
I'm not sure if this is a Windows problem or a problem in Evolution Chamber, 
but it seems strange that the error would present itself when there is still 
>10 GB RAM available for use?

Original issue reported on code.google.com by atb...@gmail.com on 26 Oct 2010 at 2:55

GoogleCodeExporter commented 8 years ago
You should specify Java version number since different versions manage memory 
different. If you have x64 Java version it will increase memory consumption by 
around 50%. Configuring large number of processors also increases memory 
consumption.
Run "java -version" in command line and post the output.
Does the problem always occurs with the configuration you are using? After how 
much time (or number of games played) you are getting the error?

I tried to reproduce it on my PC (Windows 7 x86, Java 1.6.0_22) and memory 
consumption seems to stop after reaching 52MB while running on 2 processors. 

Original comment by sergey...@gmail.com on 26 Oct 2010 at 4:43

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Java version is 1.6.0_21-b07 (x86).
I have only had the error once, after several (20+ M) games.
Running on 7 threads (have 8 threads total).
RAM and VM usage both 3-3.5 GB.

Original comment by atb...@gmail.com on 26 Oct 2010 at 4:54

GoogleCodeExporter commented 8 years ago
I tried out a few different conditions to look at the RAM usage over time.

Here is the RAM usage for 1, 2, 4 or 8 threads, over the first 500 K games:
http://img4.imageshack.us/img4/4448/ramusage.png

And here is the same but with the 8 thread run extended to 2 M games (I didn't 
have time to wait for the slower runs with less threads):
http://img41.imageshack.us/img41/6932/ramusage2.png

Original comment by atb...@gmail.com on 26 Oct 2010 at 5:53

Attachments:

GoogleCodeExporter commented 8 years ago
Is it memory usage of the Java process or total Windows memory usage? On my PC 
EvolutionChamber takes 10-20 times less memory (at least for the short runs).
In any case the graphs for 4 cores and less are relatively stable while 8 core 
graph looks very much like a memory leak. It make require some specialized 
tools (like JProfiler) to find the problem.

Original comment by sergey...@gmail.com on 26 Oct 2010 at 7:46

GoogleCodeExporter commented 8 years ago
That's the memory usage for the Java process only. 

Original comment by atb...@gmail.com on 26 Oct 2010 at 8:03

GoogleCodeExporter commented 8 years ago
I tried to reproduce it on my PC. I let it run with 8 cores till it reached 
about 2.5 million games. Memory consumption was about 150MB. But again, I have 
only 2 physical cores and x86 OS.

Try to run it like this with 8 cores: java -Xmx1536m -jar 
evolutionchamber-version-0017.jar

Original comment by sergey...@gmail.com on 27 Oct 2010 at 7:07

GoogleCodeExporter commented 8 years ago
Running on 8 cores with the -Xmx1536m flag did limit the RAM and VM usage.

Original comment by atb...@gmail.com on 27 Oct 2010 at 10:58

GoogleCodeExporter commented 8 years ago
When the high memory usage was occuring, I had only x86 Java 1.6.0_21 
installed, and Java/Evolution Chamber was running as a 32-bit process.

I just uninstalled all versions of Java, then installed only x86 Java 1.6.0_22. 
When running on 8 cores (32-bit), the memory usage was approximately 10-fold 
lower (~150 MB).

I then installed x64 Java 1.6.0_22, and when running on 8 cores (64-bit 
process) the memory usage is similar to before (~1.5 GB after 1 M games).

Original comment by atb...@gmail.com on 27 Oct 2010 at 11:19

GoogleCodeExporter commented 8 years ago
That can explain it. 64-bit JVM runs always in server mode and use completely 
different default memory settings.
You can get some information about it here: 
http://www.oracle.com/technetwork/java/hotspotfaq-138619.html#threads_oom

Original comment by sergey...@gmail.com on 27 Oct 2010 at 2:52

GoogleCodeExporter commented 8 years ago
Update install docs (when they are created) to make sure it requires 1.6.0_22+

Original comment by Frit...@gmail.com on 6 Nov 2010 at 1:08

GoogleCodeExporter commented 8 years ago
Updated front page saying to use 1.6.0_22

Original comment by Frit...@gmail.com on 21 Nov 2010 at 9:39