Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小五666\n哈哈
Rocketmq
提交
7ac5ad37
R
Rocketmq
项目概览
小五666\n哈哈
/
Rocketmq
与 Fork 源项目一致
Fork自
Apache RocketMQ / Rocketmq
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rocketmq
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
7ac5ad37
编写于
7月 30, 2019
作者:
R
Rui Liu
提交者:
dinglei
7月 30, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix /dev/shm not found on some OSs (#1345)
上级
e1b9a32d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
91 addition
and
6 deletion
+91
-6
distribution/benchmark/runclass.sh
distribution/benchmark/runclass.sh
+31
-3
distribution/bin/runbroker.sh
distribution/bin/runbroker.sh
+29
-1
distribution/bin/runserver.sh
distribution/bin/runserver.sh
+31
-2
未找到文件。
distribution/benchmark/runclass.sh
浏览文件 @
7ac5ad37
...
...
@@ -24,13 +24,41 @@ fi
BASE_DIR
=
$(
dirname
$0
)
/..
CLASSPATH
=
.:
${
BASE_DIR
}
/conf:
${
CLASSPATH
}
# The RAMDisk initializing size in MB on Darwin OS for gc-log
DIR_SIZE_IN_MB
=
600
choose_gc_log_directory
()
{
case
"
`
uname
`
"
in
Darwin
)
if
[
!
-d
"/Volumes/RAMDisk"
]
;
then
# create ram disk on Darwin systems as gc-log directory
DEV
=
`
hdiutil attach
-nomount
ram://
$((
2
*
1024
*
DIR_SIZE_IN_MB
))
`
>
/dev/null
diskutil eraseVolume HFS+ RAMDisk
${
DEV
}
>
/dev/null
echo
"Create RAMDisk /Volumes/RAMDisk for gc logging on Darwin OS."
fi
GC_LOG_DIR
=
"/Volumes/RAMDisk"
;;
*
)
# check if /dev/shm exists on other systems
if
[
-d
"/dev/shm"
]
;
then
GC_LOG_DIR
=
"/dev/shm"
else
GC_LOG_DIR
=
${
BASE_DIR
}
fi
;;
esac
}
choose_gc_log_directory
JAVA_OPT
=
"
${
JAVA_OPT
}
-server -Xms1g -Xmx1g -Xmn256m -XX:PermSize=128m -XX:MaxPermSize=320m"
JAVA_OPT
=
"
${
JAVA_OPT
}
-XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSParallelRemarkEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+CMSClassUnloadingEnabled -XX:SurvivorRatio=8 -XX:+DisableExplicitGC"
JAVA_OPT
=
"
${
JAVA_OPT
}
-verbose:gc -Xloggc:
/dev/shm/rmq_srv_gc
.log -XX:+PrintGCDetails"
JAVA_OPT
=
"
${
JAVA_OPT
}
-verbose:gc -Xloggc:
${
GC_LOG_DIR
}
/rmq_run_class_gc_%p_%t
.log -XX:+PrintGCDetails"
JAVA_OPT
=
"
${
JAVA_OPT
}
-XX:-OmitStackTraceInFastThrow"
JAVA_OPT
=
"
${
JAVA_OPT
}
-Djava.ext.dirs=
${
BASE_DIR
}
/lib"
JAVA_OPT
=
"
${
JAVA_OPT
}
-XX:-UseLargePages"
JAVA_OPT
=
"
${
JAVA_OPT
}
-XX:+PerfDisableSharedMem"
JAVA_OPT
=
"
${
JAVA_OPT
}
-XX:-UseLargePages"
JAVA_OPT
=
"
${
JAVA_OPT
}
-XX:+PerfDisableSharedMem"
#JAVA_OPT="${JAVA_OPT} -Xdebug -Xrunjdwp:transport=dt_socket,address=9555,server=y,suspend=n"
JAVA_OPT
=
"
${
JAVA_OPT
}
-cp
${
CLASSPATH
}
"
...
...
distribution/bin/runbroker.sh
浏览文件 @
7ac5ad37
...
...
@@ -36,9 +36,37 @@ export CLASSPATH=.:${BASE_DIR}/conf:${CLASSPATH}
#===========================================================================================
# JVM Configuration
#===========================================================================================
# The RAMDisk initializing size in MB on Darwin OS for gc-log
DIR_SIZE_IN_MB
=
600
choose_gc_log_directory
()
{
case
"
`
uname
`
"
in
Darwin
)
if
[
!
-d
"/Volumes/RAMDisk"
]
;
then
# create ram disk on Darwin systems as gc-log directory
DEV
=
`
hdiutil attach
-nomount
ram://
$((
2
*
1024
*
DIR_SIZE_IN_MB
))
`
>
/dev/null
diskutil eraseVolume HFS+ RAMDisk
${
DEV
}
>
/dev/null
echo
"Create RAMDisk /Volumes/RAMDisk for gc logging on Darwin OS."
fi
GC_LOG_DIR
=
"/Volumes/RAMDisk"
;;
*
)
# check if /dev/shm exists on other systems
if
[
-d
"/dev/shm"
]
;
then
GC_LOG_DIR
=
"/dev/shm"
else
GC_LOG_DIR
=
${
BASE_DIR
}
fi
;;
esac
}
choose_gc_log_directory
JAVA_OPT
=
"
${
JAVA_OPT
}
-server -Xms8g -Xmx8g -Xmn4g"
JAVA_OPT
=
"
${
JAVA_OPT
}
-XX:+UseG1GC -XX:G1HeapRegionSize=16m -XX:G1ReservePercent=25 -XX:InitiatingHeapOccupancyPercent=30 -XX:SoftRefLRUPolicyMSPerMB=0"
JAVA_OPT
=
"
${
JAVA_OPT
}
-verbose:gc -Xloggc:
/dev/shm/mq_gc_%p
.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintAdaptiveSizePolicy"
JAVA_OPT
=
"
${
JAVA_OPT
}
-verbose:gc -Xloggc:
${
GC_LOG_DIR
}
/rmq_broker_gc_%p_%t
.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintAdaptiveSizePolicy"
JAVA_OPT
=
"
${
JAVA_OPT
}
-XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=30m"
JAVA_OPT
=
"
${
JAVA_OPT
}
-XX:-OmitStackTraceInFastThrow"
JAVA_OPT
=
"
${
JAVA_OPT
}
-XX:+AlwaysPreTouch"
...
...
distribution/bin/runserver.sh
浏览文件 @
7ac5ad37
...
...
@@ -36,11 +36,40 @@ export CLASSPATH=.:${BASE_DIR}/conf:${CLASSPATH}
#===========================================================================================
# JVM Configuration
#===========================================================================================
# The RAMDisk initializing size in MB on Darwin OS for gc-log
DIR_SIZE_IN_MB
=
600
choose_gc_log_directory
()
{
case
"
`
uname
`
"
in
Darwin
)
if
[
!
-d
"/Volumes/RAMDisk"
]
;
then
# create ram disk on Darwin systems as gc-log directory
DEV
=
`
hdiutil attach
-nomount
ram://
$((
2
*
1024
*
DIR_SIZE_IN_MB
))
`
>
/dev/null
diskutil eraseVolume HFS+ RAMDisk
${
DEV
}
>
/dev/null
echo
"Create RAMDisk /Volumes/RAMDisk for gc logging on Darwin OS."
fi
GC_LOG_DIR
=
"/Volumes/RAMDisk"
;;
*
)
# check if /dev/shm exists on other systems
if
[
-d
"/dev/shm"
]
;
then
GC_LOG_DIR
=
"/dev/shm"
else
GC_LOG_DIR
=
${
BASE_DIR
}
fi
;;
esac
}
choose_gc_log_directory
JAVA_OPT
=
"
${
JAVA_OPT
}
-server -Xms4g -Xmx4g -Xmn2g -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m"
JAVA_OPT
=
"
${
JAVA_OPT
}
-XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:CMSInitiatingOccupancyFraction=70 -XX:+CMSParallelRemarkEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+CMSClassUnloadingEnabled -XX:SurvivorRatio=8 -XX:-UseParNewGC"
JAVA_OPT
=
"
${
JAVA_OPT
}
-verbose:gc -Xloggc:/dev/shm/rmq_srv_gc.log -XX:+PrintGCDetails"
JAVA_OPT
=
"
${
JAVA_OPT
}
-verbose:gc -Xloggc:
${
GC_LOG_DIR
}
/rmq_srv_gc_%p_%t.log -XX:+PrintGCDetails"
JAVA_OPT
=
"
${
JAVA_OPT
}
-XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=30m"
JAVA_OPT
=
"
${
JAVA_OPT
}
-XX:-OmitStackTraceInFastThrow"
JAVA_OPT
=
"
${
JAVA_OPT
}
-XX:-UseLargePages"
JAVA_OPT
=
"
${
JAVA_OPT
}
-XX:-UseLargePages"
JAVA_OPT
=
"
${
JAVA_OPT
}
-Djava.ext.dirs=
${
JAVA_HOME
}
/jre/lib/ext:
${
BASE_DIR
}
/lib"
#JAVA_OPT="${JAVA_OPT} -Xdebug -Xrunjdwp:transport=dt_socket,address=9555,server=y,suspend=n"
JAVA_OPT
=
"
${
JAVA_OPT
}
${
JAVA_OPT_EXT
}
"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录