rocketmq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yu...@apache.org
Subject incubator-rocketmq-site git commit: Remove jvm/kernel config article to docs part
Date Fri, 14 Jul 2017 12:59:38 GMT
Repository: incubator-rocketmq-site
Updated Branches:
  refs/heads/master 1ee037315 -> b0bb22d67


Remove jvm/kernel config article to docs part


Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/commit/b0bb22d6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/tree/b0bb22d6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/diff/b0bb22d6

Branch: refs/heads/master
Commit: b0bb22d67530f491495970cb188d5974f7ca81c6
Parents: 1ee0373
Author: yukon <yukon@apache.org>
Authored: Fri Jul 14 20:59:28 2017 +0800
Committer: yukon <yukon@apache.org>
Committed: Fri Jul 14 20:59:28 2017 +0800

----------------------------------------------------------------------
 _data/navigation.yml                            |  2 +
 ...ractice-rmq-jvm-linuxkernel-configuration.md | 74 +++++++++++++++++++
 ...7-07-14-rmq-jvm-linuxkernel-configuration.md | 78 --------------------
 3 files changed, 76 insertions(+), 78 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/b0bb22d6/_data/navigation.yml
----------------------------------------------------------------------
diff --git a/_data/navigation.yml b/_data/navigation.yml
index 2ed4faf..99e4890 100644
--- a/_data/navigation.yml
+++ b/_data/navigation.yml
@@ -74,6 +74,8 @@ docs:
         url: /docs/best-practice-consumer/
       - title: "NameServer"
         url: /docs/best-practice-namesvr/
+      - title: "JVM/Kernel Config"
+        url: /docs/system-config/
   - title: Release Notes
     children:
       - title: "Download"

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/b0bb22d6/_docs/23-best-practice-rmq-jvm-linuxkernel-configuration.md
----------------------------------------------------------------------
diff --git a/_docs/23-best-practice-rmq-jvm-linuxkernel-configuration.md b/_docs/23-best-practice-rmq-jvm-linuxkernel-configuration.md
new file mode 100644
index 0000000..af2f9ad
--- /dev/null
+++ b/_docs/23-best-practice-rmq-jvm-linuxkernel-configuration.md
@@ -0,0 +1,74 @@
+---
+title: "RocketMQ JVM/Linux Configuration"
+permalink: /docs/system-config/
+modified: 2017-7-14T15:01:43-04:00
+---
+
+This is an introduction for configuring RocketMQ broker JVM/OS parameters. It points out
certain specified configurations that should be thinking about before deploying RocketMQ cluster.
+
+{% include toc %}
+
+# JVM Options
+
+The latest released version of JDK 1.8 is recommended, with server compiler and a 8g heap.
Set the same Xms and Xmx value to prevent the JVM from resizing the heap for better performance.
A simple JVM configurations looks like this: 
+
+```
+-server -Xms8g -Xmx8g -Xmn4g
+```
+
+If you don't care about the boot time of RocketMQ broker, pre-touch the Java heap to make
sure that every page will be allocated during JVM initialization is a better choice. Those
who don't care about the boot time can enable it:
+
+```
+-XX:+AlwaysPreTouch
+```
+
+Disable biased locking may reduce JVM pauses: 
+
+```
+-XX:-UseBiasedLocking
+```
+
+As for garbage collection, G1 collector with JDK 1.8 is recommended:
+
+```
+-XX:+UseG1GC -XX:G1HeapRegionSize=16m -XX:G1ReservePercent=25 -XX:InitiatingHeapOccupancyPercent=30
+```
+
+These GC options looks a little aggressive, but it's proved to have good performance in our
production environment.
+
+Don't set a too small value for `-XX:MaxGCPauseMillis`, otherwise JVM will use a small young
generation to achieve this goal which will cause very frequent minor GC.
+
+And use rolling GC log file is recommended:
+
+```
+-XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=30m
+```
+
+If write GC file will increase latency of broker, consider redirect GC log file to a memory
file system:
+
+```
+-Xloggc:/dev/shm/mq_gc_%p.log
+```
+
+# Linux Kernel Parameters
+
+There is a `os.sh` script that lists a lot of kernel parameters in folder `bin` which can
be used for production use with minor changes. Below parameters need attention, and more details
please refer to documentation for /proc/sys/vm/*[1].
+
+**vm.extra_free_kbytes**, tells the VM to keep extra free memory between the threshold where
background reclaim (kswapd) kicks in, and the threshold where direct reclaim (by allocating
processes) kicks in. RocketMQ uses this parameter to avoid high latency in memory allocation.
+
+**vm.min_free_kbytes**, if you set this to lower than 1024KB, your system will
+become subtly broken, and prone to deadlock under high loads. 
+
+**vm.max_map_count**, limits the maximum number of memory map areas a process
+may have. RocketMQ will use mmap to load CommitLog and ConsumeQueue, so set a bigger value
for this parameter is recommended.
+
+**vm.swappiness**, define how aggressive the kernel will swap memory pages. Higher values
will increase agressiveness, lower values decrease the amount of swap. 10 for this value to
avoid swap latency is recommended.
+
+**File descriptor limits**, RocketMQ needs open file descriptors for files(CommitLog and
ConsumeQueue) and network connections. We recommend set 655350 for file descriptors.
+
+**Disk scheduler**, the deadline I/O scheduler is recommended for RocketMQ, which attempts
to provide a guaranteed latency for requests[2].
+
+
+# Reference
+1. https://www.kernel.org/doc/Documentation/sysctl/vm.txt
+2. https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Performance_Tuning_Guide/ch06s04s02.html
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-site/blob/b0bb22d6/_posts/2017-07-14-rmq-jvm-linuxkernel-configuration.md
----------------------------------------------------------------------
diff --git a/_posts/2017-07-14-rmq-jvm-linuxkernel-configuration.md b/_posts/2017-07-14-rmq-jvm-linuxkernel-configuration.md
deleted file mode 100644
index 8f8f4a0..0000000
--- a/_posts/2017-07-14-rmq-jvm-linuxkernel-configuration.md
+++ /dev/null
@@ -1,78 +0,0 @@
----
-title: "RocketMQ JVM/Linux Configuration"
-categories:
-  - RocketMQ
-tags:
-  - RocketMQ
-  - Operations
-  - Configuration
----
-
-This is an introduction for configuring RocketMQ broker JVM/OS parameters. It points out
certain specified configurations that should be thinking about before deploying RocketMQ cluster.
-
-{% include toc %}
-
-# JVM Options
-
-The latest released version of JDK 1.8 is recommended, with server compiler and a 8g heap.
Set the same Xms and Xmx value to prevent the JVM from resizing the heap for better performance.
A simple JVM configurations looks like this: 
-
-```
--server -Xms8g -Xmx8g -Xmn4g
-```
-
-If you don't care about the boot time of RocketMQ broker, pre-touch the Java heap to make
sure that every page will be allocated during JVM initialization is a better choice. Those
who don't care about the boot time can enable it:
-
-```
--XX:+AlwaysPreTouch
-```
-
-Disable biased locking may reduce JVM pauses: 
-
-```
--XX:-UseBiasedLocking
-```
-
-As for garbage collection, G1 collector with JDK 1.8 is recommended:
-
-```
--XX:+UseG1GC -XX:G1HeapRegionSize=16m -XX:G1ReservePercent=25 -XX:InitiatingHeapOccupancyPercent=30
-```
-
-These GC options looks a little aggressive, but it's proved to have good performance in our
production environment.
-
-Don't set a too small value for `-XX:MaxGCPauseMillis`, otherwise JVM will use a small young
generation to achieve this goal which will cause very frequent minor GC.
-
-And use rolling GC log file is recommended:
-
-```
--XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=30m
-```
-
-If write GC file will increase latency of broker, consider redirect GC log file to a memory
file system:
-
-```
--Xloggc:/dev/shm/mq_gc_%p.log
-```
-
-# Linux Kernel Parameters
-
-There is a `os.sh` script that lists a lot of kernel parameters in folder `bin` which can
be used for production use with minor changes. Below parameters need attention, and more details
please refer to documentation for /proc/sys/vm/*[1].
-
-**vm.extra_free_kbytes**, tells the VM to keep extra free memory between the threshold where
background reclaim (kswapd) kicks in, and the threshold where direct reclaim (by allocating
processes) kicks in. RocketMQ uses this parameter to avoid high latency in memory allocation.
-
-**vm.min_free_kbytes**, if you set this to lower than 1024KB, your system will
-become subtly broken, and prone to deadlock under high loads. 
-
-**vm.max_map_count**, limits the maximum number of memory map areas a process
-may have. RocketMQ will use mmap to load CommitLog and ConsumeQueue, so set a bigger value
for this parameter is recommended.
-
-**vm.swappiness**, define how aggressive the kernel will swap memory pages. Higher values
will increase agressiveness, lower values decrease the amount of swap. 10 for this value to
avoid swap latency is recommended.
-
-**File descriptor limits**, RocketMQ needs open file descriptors for files(CommitLog and
ConsumeQueue) and network connections. We recommend set 655350 for file descriptors.
-
-**Disk scheduler**, the deadline I/O scheduler is recommended for RocketMQ, which attempts
to provide a guaranteed latency for requests[2].
-
-
-# Reference
-1. https://www.kernel.org/doc/Documentation/sysctl/vm.txt
-2. https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Performance_Tuning_Guide/ch06s04s02.html
\ No newline at end of file


Mime
View raw message