Rocketmq takes up too much memory solution

rocketmq official document
solutions, find runserver.sh and runbroker.sh, edit
JAVA_OPT = "$ {JAVA_OPT} -server -Xms256m -Xmx256m -Xmn125m -XX: MetaspaceSize = 128m -XX: MaxMetaspaceSize = 320m"
change as it .

The memory of mqbroker and mqnamesrv can also be adjusted, these two configurations are also very important, the default is 500m to 1g. The specific file configurations are mqbroker.xml and mqnamesrv.xml. The configuration information in the file is modified according to your own situation:

<options>
         <-Xms200m></-Xms200m>
         <-Xmx200m></-Xmx200m>
         <-XX:NewSize>50M</-XX:NewSize>
         <-XX:MaxNewSize>50M</-XX:MaxNewSize>
         <-XX:PermSize>30M</-XX:PermSize>
         <-XX:MaxPermSize>30M</-XX:MaxPermSize>
 </options>

The thing to note is that the memory of mqbroker.xml and mqnamesrv.xml should not exceed the memory of runbroker.sh and runserver.sh, otherwise it will cause insufficient memory and cause a crash.

Published 10 original articles · Likes0 · Visits 959

Guess you like

Origin blog.csdn.net/weixin_43572702/article/details/103232560