atlas-checks icon indicating copy to clipboard operation
atlas-checks copied to clipboard

Default "JAVA HEAP SIZE" is low

Open TahmasbiOSM opened this issue 5 years ago • 2 comments

I tried to run checks on Irans map (116 Mb obf ) which is a lot bigger than the Belize, of course atlas-check needs more ram to handle that I increased Linux Ram to 6000 MB but after running atlas-check there was an error, “java.lang.OutOfMemoryError: Java heap space”

I checked this command to see how much is the heap size

root@kali:~/atlas-checks# java -XX:+PrintFlagsFinal -version | grep -iE 'HeapSize|PermSize|ThreadStackSize'
     intx CompilerThreadStackSize                  = 1024                                   {pd product} {default}
   size_t ErgoHeapSizeLimit                        = 0                                         {product} {default}
   size_t HeapSizePerGCThread                      = 43620760                                  {product} {default}
   size_t InitialHeapSize                          = 98566144                                  {product} {ergonomic}
   size_t LargePageHeapSizeThreshold               = 134217728                                 {product} {default}
   size_t MaxHeapSize                              = 1572864000                                {product} {ergonomic}
    uintx NonNMethodCodeHeapSize                   = 5824844                                {pd product} {ergonomic}
    uintx NonProfiledCodeHeapSize                  = 122916698                              {pd product} {ergonomic}
    uintx ProfiledCodeHeapSize                     = 122916698                              {pd product} {ergonomic}
     intx ThreadStackSize                          = 1024                                   {pd product} {default}
     intx VMThreadStackSize                        = 1024                                   {pd product} {default}
openjdk version "11.0.3" 2019-04-16
OpenJDK Runtime Environment (build 11.0.3+1-Debian-1)
OpenJDK 64-Bit Server VM (build 11.0.3+1-Debian-1, mixed mode, sharing)

I don't know how to increase it, I tried to edit gradlew file changed Line 31 from DEFAULT_JVM_OPTS='"-Xmx64m"' to DEFAULT_JVM_OPTS="\"-Xmx5024m\" \"-Xms256m\" \"-XX:MaxPermSize=5024m\"" but it didn't work. The JAVA process during checks was using 1.7G Ram %30 of dedicated ram to Linux

TahmasbiOSM avatar Jun 09 '19 18:06 TahmasbiOSM

I think this is a great point, and goes with the automated memory warning you talked about in https://github.com/osmlab/atlas-checks/issues/164. I think the default max should be increased. The only problem is I don't know how much would be appropriate because there will still be some countries what are not possible to run locally, especially if you're forced to run it on a linux VM. In this case Iran might be one of them. What are you thinking would a be a practical default that will get more countries but not blow up someones memory?

jklamer avatar Jun 11 '19 17:06 jklamer

Working on a more complete fix to this that will enable you more control running locally.

jklamer avatar Jun 12 '19 18:06 jklamer