CityScope / VehicleClustering

1 stars 1 forks source link

Out of Memory Error #44

Closed NaroaCS closed 1 year ago

NaroaCS commented 1 year ago

Hi @agrignard ! I am a bit confused about a memory error that I am getting in launching the simulations on the server. Currently, I am running 15 threads in parallel in a server that has 1 T of RAM and 40 threads.

I have set the specs in Gama.ini as follows:

-Xms4096m
-Xmx100g
-Xss1g
-Xmn50g

This is the error that I am getting

Message: Your system is running out of memory. GAMA will exit now. Please try to quit other applications and relaunch it
Exception in thread "Timer-0" java.lang.OutOfMemoryError: Java heap space
        at java.prefs/java.util.prefs.FileSystemPreferences.sync(FileSystemPreferences.java:768)
        at java.prefs/java.util.prefs.FileSystemPreferences.flush(FileSystemPreferences.java:844)
        at java.prefs/java.util.prefs.FileSystemPreferences.syncWorld(FileSystemPreferences.java:484)
        at java.prefs/java.util.prefs.FileSystemPreferences$3.run(FileSystemPreferences.java:451)
        at java.base/java.util.TimerThread.mainLoop(Timer.java:566)
        at java.base/java.util.TimerThread.run(Timer.java:516)
naroa@matlaberp4:~/GAMA_1.9.0_march13/headless$ 

And this is the behavior of the server:

image

It seems that the memory use is very low, but the cache and buffer are high (green plot). Does the cache and buffer memory trigger the OutOfMemory error? I also see some peaks in the load, which I am not sure should have happened, but not sure if this can also have an impact on memory usage. Do you have any ideas on why this might be happening? Is Gama accumulating data that I should be clearing? I am saving everything that I need on .csv-s, so I wouldn't need any other info on the simulations.

Thanks for your help!

agrignard commented 1 year ago

For this kind of issue I think it's more relevant to ask directly to the multi threading expert on the GAMA github (as you did for this issue https://github.com/gama-platform/gama/issues/3658)

NaroaCS commented 1 year ago

Will do, cheers! :)