Setting Memory Arguments in WebLogic Application Server


– Nếu bạn cần phân bổ bộ nhớ cho weblogic administration server hoặc managed server.

– Chú ý: Điều này sẽ nâng cao giới hạn cho cả weblogic administration server và  managed server. Bạn có thể xác minh các thiết lập này bằng cách xem các kịch bản khởi động máy chủ. Tùy chọn nếu bạn đang thiết lập bộ nhớ cho Oracle UCM, bạn có thể xác minh thiết lập này trên trang System Audit Information.

(Phần nội dung bên dưới tôi để nguyên phần tiếng anh cho các bản hiểu rõ hơn ý của tác giả)

*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
)

* Lưu ý: Sự khác biệt cơ bản giữa Windows và Linx/Unix về vấn đề này là sử dụng lệnh “Set” cho các tham số môi trường trong windows.

Directly after this remark, add the following line:

Bình luận về bài viết này