If you need to change the memory allocation to your WebLogic administration server and/or managed server, the following guide will show you how. Note: This will raise the limit for both the WebLogic administration server and managed server. You can verify these settings by watching the server startup script. Optionally, if you are setting the memory for Oracle UCM, you can verify this setting on the System Audit Information page.

Windows

1. Open the domain environment cmd file:

        <middleware home>\user_projects\domains\base_domain\bin\setDomainEnv.cmd

2. Locate the following remark, inside the cmd file: (‘Search’ -> “@REM IF USER_MEM_ARGS”)

        @REM IF USER_MEM_ARGS the environment variable is set, use it to override ALL MEM_ARGS                   values

3. Directly after this remark, add the following line:

         set USER_MEM_ARGS=-Xms256m -Xmx1024m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=512m

4. The portion of the file you have edited looks like this:

        @REM IF USER_MEM_ARGS the environment variable is set, use it to override ALL MEM_ARGS    values

        set USER_MEM_ARGS=-Xms256m -Xmx1024m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=512m

        if NOT “%USER_MEM_ARGS%”==”" (

        set MEM_ARGS=%USER_MEM_ARGS

        )

UNIX/Linux

1. Open the domain environment sh file:
        <middleware home>\user_projects\domains\base_domain\bin\setDomainEnv.sh

2. Locate the following remark, inside the sh file: (‘Search’ -> “#REM IF USER_MEM_ARGS”)

        #REM IF USER_MEM_ARGS the environment variable is set, use it to override ALL MEM_ARGS values

3. Directly after this remark, add the following line:

        USER_MEM_ARGS=-Xms256m -Xmx1024m -XX:CompileThreshold=8000 -XX:PermSize=128m -   XX:MaxPermSize=512m

4. The portion of the file you have edited looks like this:

        #REM IF USER_MEM_ARGS the environment variable is set, use it to override ALL MEM_ARGS values

        USER_MEM_ARGS=-Xms256m -Xmx1024m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=512m

        if NOT “%USER_MEM_ARGS%”==”" (

        MEM_ARGS=%USER_MEM_ARGS

        )
References
Note that the basic difference between Windows and UNIX/Linux regarding this issue is the use of the “set” command for the Windows environment.

Final Thoughts

This is certainly not the only way to accomplish this task, and it does affect all managed servers in the domain.  However, if you’re running a dev box with plenty of memory it is the simplest and gives you the best “umph” when running your various instances with the least amount of work.

 


Comments

Jack
04/04/2013 9:45am

This is very intuitive! I liked how thorough you were!

Reply



Leave a Reply


Redstone Content Solutions