关于 weblogic8 内存配置

----------------------------------------ENG-------------------------------------------------------------------------------------

Tuning WebLogic JRockit JVM is accomplished by using non-standard—or -X—command line options that you enter at startup. -X options are exclusive to WebLogic JRockit JVM.

1. Setting Heap Size Parameters
-Xms sets the initial size of the heap. For this, we recommend that you set it to the same size as the maximum heap size
-Xmx sets the maximum size of the heap. On IA32 the maximum possible heap size is about 1.8 GB (which is the largest contiguous address space the O/S will give a process). Usually set maximum heap size no more than 75% of the available physical memory
Note: To avoid fragmentation or paging, you should override the default and manually set -Xmx to 75% of the available physical memory, up to 1.8 GB.
-Xns sets the size of the young generation (nursery) in generational concurrent and generational copying garbage collectors (these are the only collectors that use nurseries).
Note: The maximum size of a nursery may not exceed 25% of the total heap size if you're using gencon and 15% of the total heap size if you're using gencopy.

2. Defining When a Memory Space will be Cleared
-Xcleartype defines when the memory space occupied by an object that has been garbage collected will be cleared.
-Xcleartype:<gc|local|alloc>
If the clear type is not set, the default is alloc on IA32 systems and gc on IA64 systems.
Note: The option alloc is currently not available on IA64 systems.

3. Setting the Type of Thread Allocation
-Xallocationtype sets the type of thread allocation
-Xallocationtype:<global|local>
Note: If the allocation type (-Xallocationtype) is not set, the default is global for the generational copying (gencopy) garbage collector and local for all others (singlecon, gencon, and parallel).

4. Setting the Thread Stack Size
-Xss<size>[k|K] [m|M] sets the thread stack size in kilobytes.

5. Memory Requirements and Garbage Collection Types
http://e-docs.bea.com/wljrockit/docs81/userguide/memman.html

Addendum - Basic Tuning Tips and Techniques
http://e-docs.bea.com/wljrockit/docs81/tuning/basic.html#998993
Find the Bottleneck Methods:
Use the Intel VTune profiling tool with JRockit to analyze performance.
Use the Java Virtual Machine Profiling Interface (JVMPI) by setting the option -Xjvmpi:allocs=off,monitors=off,entryexit=off.

 

-----------------------------CHN------------------------------------------------------

Weblogic内存分配问题

-Xms 不能超过物理内存的25%
-Xmx 不能超过1.8G(32位的CPU)
我用jrockit(webogic8.1sp2)时-Xmx都不能超过1.6G -Xms也只设到512m
大了启动时就报错,服务器内存3G呢


今天在性能测试过程中学到不少东西,加上前一段时间的积累,特记录如下:
一:WebLogic配置问题:
由于WebLogic的配置问题,我们的测试出现了失败情况。原因是为WebLogic分配的内存太少了。通过修改commom/bin/commEnv.cmd文件来增加内存分配。
修改的部分如下:
:bea
if "%PRODUCTION_MODE%" == "true" goto bea_prod_mode
set JAVA_VM=-jrockit
set MEM_ARGS=-Xms768m -Xmx1024m
set JAVA_OPTIONS=%JAVA_OPTIONS% -Xverify:none
goto continue
:bea_prod_mode
set JAVA_VM=-jrockit
set MEM_ARGS=-Xms768m -Xmx1024m//原来是128M~256M,太小了,数据太大
goto continue
结果修改后,没有效果。还是有失败的情况。
发现,原来,在:bea下面还有一段配置信息如下:
:sun
if "%PRODUCTION_MODE%" == "true" goto sun_prod_mode
set JAVA_VM=-client
set MEM_ARGS=-Xms768m -Xmx1024m -XX:MaxPermSize=256m
set JAVA_OPTIONS=%JAVA_OPTIONS% -Xverify:none
goto continue
:sun_prod_mode
set JAVA_VM=-server
set MEM_ARGS=-Xms768m -Xmx1024m -XX:MaxPermSize=256m
goto continue

将这里的内存分配修改后见效。
原因是,上面对第一段代码是为bea自己的JVM设置的,下面的是为Sun的设置的。而WebLogic默认的是Sun的,所以出了毛病。

 

-------------------------另注:------------------------------

startWeblogic.cmd

文件中调用的是 commEnv.cmd,

在此文件中设定内存大小,可以生效。


call "%WL_HOME%/common/bin/commEnv.cmd"

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值