Windows关闭zookeeper、rocketmq日志输出以及修改rocketmq的JVM内存占用大小

  1. JDK-1.8
  2. zookeeper-3.4.14
  3. rocketmq-3.2.6

zookeeper

进入到zookeeper的conf目录
Windows关闭zookeeper、rocketmq日志输出以及修改rocketmq的JVM内存占用大小_第1张图片
清空配置文件,只保留下面这一行。zookeeper关闭日志输出相对简单。

log4j.rootLogger=OFF

rocketmq

进入到rocketmq的conf目录
Windows关闭zookeeper、rocketmq日志输出以及修改rocketmq的JVM内存占用大小_第2张图片

logback_broker.xml


<configuration>
	<logger name="RocketmqClient" additivity="false">
		<level value="OFF" />
	logger>

	<logger name="RocketmqBroker" additivity="false">
		<level value="OFF" />
	logger>

	<logger name="RocketmqCommon" additivity="false">
		<level value="OFF" />
	logger>

	<logger name="RocketmqStore" additivity="false">
		<level value="OFF" />
	logger>

	<logger name="RocketmqStoreError" additivity="false">
		<level value="OFF" />
	logger>

	<logger name="RocketmqTransaction" additivity="false">
		<level value="OFF" />
	logger>

	<logger name="RocketmqRebalanceLock" additivity="false">
		<level value="OFF" />
	logger>

	<logger name="RocketmqRemoting" additivity="false">
		<level value="OFF" />
	logger>

	<logger name="RocketmqStats" additivity="false">
		<level value="OFF" />
	logger>

	<root>
		<level value="OFF" />
	root>
configuration>

logback_filtersrv.xml


<configuration>
	<logger name="RocketmqFiltersrv" additivity="false">
		<level value="OFF" />
	logger>

	<logger name="RocketmqCommon" additivity="false">
		<level value="OFF" />
	logger>

	<logger name="RocketmqRemoting" additivity="false">
		<level value="OFF" />
	logger>
	
	<root>
		<level value="OFF" />
	root>
configuration>

logback_namesrv.xml


<configuration>
	<logger name="RocketmqNamesrv" additivity="false">
		<level value="OFF" />
	logger>

	<logger name="RocketmqCommon" additivity="false">
		<level value="OFF" />
	logger>

	<logger name="RocketmqRemoting" additivity="false">
		<level value="OFF" />
	logger>

	<root>
		<level value="OFF" />
	root>
configuration>

logback_tools.xml


<configuration>
	<logger name="RocketmqTools" additivity="false">
		<level value="OFF" />
	logger>

	<logger name="RocketmqCommon" additivity="false">
		<level value="OFF" />
	logger>

	<logger name="RocketmqStore" additivity="false">
		<level value="OFF" />
	logger>

	<logger name="RocketmqRemoting" additivity="false">
		<level value="OFF" />
	logger>

	<root>
		<level value="OFF" />
	root>
configuration>

修改rocketmq JVM 内存大小

进入到rocketmq的bin目录
Windows关闭zookeeper、rocketmq日志输出以及修改rocketmq的JVM内存占用大小_第3张图片

mqadmin.xml、mqbroker.xml、mqfiltersrv.xml、mqnamesrv.xml

修改options为以下内容,注意Xmx的值一定要比MaxNewSize的值大
MaxNewSize is equal to or greater than the entire heap

	<options>
		<-Xms512m>-Xms512m>
		<-Xmx512m>-Xmx512m>
		<-XX:NewSize>256M-XX:NewSize>
		<-XX:MaxNewSize>256M-XX:MaxNewSize>
	options>

rocketmq数据存储位置为用户目录下的store(如果报错了,开发或者测试环境可以随便删除)

Windows关闭zookeeper、rocketmq日志输出以及修改rocketmq的JVM内存占用大小_第4张图片
rocketmq日志文件存储位置为用户目录下的logs
Windows关闭zookeeper、rocketmq日志输出以及修改rocketmq的JVM内存占用大小_第5张图片

rocketmq_client.log日志无法关闭

Windows关闭zookeeper、rocketmq日志输出以及修改rocketmq的JVM内存占用大小_第6张图片

你可能感兴趣的:(RabbitMQ,kafka,rocketmq,zookeeper,rocketmq,分布式)