Speed tradeoff of Java's -Xms and -Xmx options

后端 未结 8 1816
北荒
北荒 2020-12-04 08:24

Given these two commands

A:

$ java -Xms10G -Xmx10G myjavacode input.txt

B:

$ java -Xms5G -Xmx5G myjavacode input.tx         


        
8条回答
  •  南方客
    南方客 (楼主)
    2020-12-04 09:15

    > C:\java -X
    
    -Xmixed           mixed mode execution (default)
    -Xint             interpreted mode execution only
    -Xbootclasspath:
                      set search path for bootstrap classes and resources
    -Xbootclasspath/a:
                      append to end of bootstrap class path
    -Xbootclasspath/p:
                      prepend in front of bootstrap class path
    -Xnoclassgc       disable class garbage collection
    -Xincgc           enable incremental garbage collection
    -Xloggc:    log GC status to a file with time stamps
    -Xbatch           disable background compilation
    -Xms        set initial Java heap size
    -Xmx        set maximum Java heap size
    -Xss        set java thread stack size
    -Xprof            output cpu profiling data
    -Xfuture          enable strictest checks, anticipating future default
    -Xrs              reduce use of OS signals by Java/VM (see documentation)
    -Xcheck:jni       perform additional checks for JNI functions
    -Xshare:off       do not attempt to use shared class data
    -Xshare:auto      use shared class data if possible (default)
    -Xshare:on        require using shared class data, otherwise fail.
    

    The -X options are non-standard and subject to change without notice.

    (copy-paste)

提交回复
热议问题