Bureaucrats, cc_docs_admin, cc_staff
2,306
edits
Line 43: | Line 43: | ||
===Garbage Collection=== | ===Garbage Collection=== | ||
By default, the Java VM uses a parallel garbage collector (GC) and sets a number of GC threads equal to the number of CPU cores on a given node, whether a Java job is threaded or not. Each GC thread consumes memory. Moreover, the amount of memory each GC thread consumes is proportional to the amount of physical memory. Therefore, we highly recommend matching the number of GC threads to the number of CPU cores you requested from the scheduler in your job submission script, like so -XX:ParallelGCThreads=12 for example. You can also use the serial garbage collector by specifying the following option -XX:+UseSerialGC, whether your job is parallel or not. | By default, the Java VM uses a parallel garbage collector (GC) and sets a number of GC threads equal to the number of CPU cores on a given node, whether a Java job is threaded or not. Each GC thread consumes memory. Moreover, the amount of memory each GC thread consumes is proportional to the amount of physical memory. Therefore, we highly recommend matching the number of GC threads to the number of CPU cores you requested from the scheduler in your job submission script, like so <tt>-XX:ParallelGCThreads=12</tt> for example. You can also use the serial garbage collector by specifying the following option <tt>-XX:+UseSerialGC</tt>, whether your job is parallel or not. | ||
===The <tt>volatile</tt> Keyword=== | ===The <tt>volatile</tt> Keyword=== |