小弟在使用JBuilder 8.0+resin 2.1+JDK 1.14作为开发环境,在开发过程中JBuilder中可以设置JVM的最小内存为256M,但是真正上线时,不知道如何设置JVM最小内存?是在Resin的配置文件中,还是Java运行时,使用system.setproperties来设置呢?还是JDK的环境变量中设置呢?请大侠救救!!!

解决方案 »

  1.   

    windows> bin/httpd.exe -Xmn100M -Xms500M -Xmx500M
      

  2.   

    请问什么意思?在Dos窗口中输入吗?
      

  3.   

    resin 没有试过 tomcat的这样设置CATALINA_OPTS="-server -Xms512m -Xmx1536m -Djava.awt.headless=true" 主要是-server -Xms512m -Xmx1536m -Djava.awt.headless=true  加到启动脚本里面我想resin和tomcat的设置差不多吧
      

  4.   

    我查阅resin.conf配置文档,没有这个参数
     myth822(↑八月的吟游者↑),请问我在Dos窗口中设置了c:\>..\resin\bin>httpd.exe -Xmn100M -Xms200M -Xmx500M,启动Resin成功,但是在任务管理中显示java.exe只占用了54M?
    请问Xmn,Xms,Xmx分别是什么意思?
      

  5.   

    -Xms initial java heap size  
    -Xmx maximum java heap size  
    -Xmn the size of the heap for the young generation  
      

  6.   

    不是在配置脚本里找,是在启动脚本里面找,在bin目录里面,应该是bat文件
      

  7.   

    -Xmixed           mixed mode execution (default)
        -Xint             interpreted mode execution only
        -Xbootclasspath:<directories and zip/jar files separated by ;>
                          set search path for bootstrap classes and resources
        -Xbootclasspath/a:<directories and zip/jar files separated by ;>
                          append to end of bootstrap class path
        -Xbootclasspath/p:<directories and zip/jar files separated by ;>
                          prepend in front of bootstrap class path
        -Xnoclassgc       disable class garbage collection
        -Xincgc           enable incremental garbage collection
        -Xloggc:<file>    log GC status to a file with time stamps
        -Xbatch           disable background compilation
        -Xms<size>        set initial Java heap size
        -Xmx<size>        set maximum Java heap size
        -Xss<size>        set java thread stack size
        -Xprof            output cpu profiling data
        -Xrunhprof[:help]|[:<option>=<value>, ...]
                          perform JVMPI heap, cpu, or monitor profiling
        -Xdebug           enable remote debugging
        -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 functionsThe -X options are non-standard and subject to change without notice.
      

  8.   

    You can write one bat to laungh httpd.exe.
    Xms :heap initinal size
    Xmx :heap max size
    Xmn :incremental size