From 879102a20d6a530926140bd622250f3a0cea5508 Mon Sep 17 00:00:00 2001 From: dutor <440396+dutor@users.noreply.github.com> Date: Thu, 12 May 2022 16:28:56 +0800 Subject: [PATCH 1/2] Added tuned profile for Nebula Graph --- conf/tuned/README.md | 8 ++++++++ conf/tuned/nebula/tuned.conf | 30 ++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 conf/tuned/README.md create mode 100644 conf/tuned/nebula/tuned.conf diff --git a/conf/tuned/README.md b/conf/tuned/README.md new file mode 100644 index 00000000000..cada719b08e --- /dev/null +++ b/conf/tuned/README.md @@ -0,0 +1,8 @@ +# Summary + +These are tuned profile to configure the system to optimize for the Nebula Graph service. + +Follow below steps to utilize: + * Install the tuned service if absent, and enable it with `systemctl`. + * Copy the __nebula__ directory into `/etc/tuned`. + * Execute `tuned-adm profile nebula` to activate the profile. diff --git a/conf/tuned/nebula/tuned.conf b/conf/tuned/nebula/tuned.conf new file mode 100644 index 00000000000..0036575c9e5 --- /dev/null +++ b/conf/tuned/nebula/tuned.conf @@ -0,0 +1,30 @@ +[main] +summary=Optimize for Nebula Graph DBMS +include=latency-performance + + +[vm] +transparent_hugepages=never + + +[sysctl] +kernel.core_pattern=core +kernel.core_uses_pid=1 +kernel.numa_balancing=0 + +vm.swappiness=0 +vm.oom_dump_tasks=1 +vm.min_free_kbytes=5242880 +vm.max_map_count=131060 +vm.dirty_background_ratio = 3 +vm.dirty_ratio = 20 +vm.dirty_expire_centisecs = 500 +vm.dirty_writeback_centisecs = 100 + +net.core.busy_read=50 +net.core.busy_poll=50 +net.core.somaxconn=4096 +net.ipv4.tcp_max_syn_backlog=4096 +net.core.netdev_max_backlog=10240 +net.ipv4.tcp_fastopen=3 +net.ipv4.tcp_slow_start_after_idle=0 From 1393e8f634b02e11c69d025c11e5266b5d71ea47 Mon Sep 17 00:00:00 2001 From: dutor <440396+dutor@users.noreply.github.com> Date: Thu, 12 May 2022 16:33:34 +0800 Subject: [PATCH 2/2] add comment on min_free_kbytes --- conf/tuned/nebula/tuned.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conf/tuned/nebula/tuned.conf b/conf/tuned/nebula/tuned.conf index 0036575c9e5..e9e34e9080c 100644 --- a/conf/tuned/nebula/tuned.conf +++ b/conf/tuned/nebula/tuned.conf @@ -14,6 +14,8 @@ kernel.numa_balancing=0 vm.swappiness=0 vm.oom_dump_tasks=1 +# min_free_kbytes is suggested to set to approximately 2% of the total memory. +# 1GB at least and 5GB at most. vm.min_free_kbytes=5242880 vm.max_map_count=131060 vm.dirty_background_ratio = 3