0

I am installing netdata in a docker container and it tells me :

"Memory de-duplication instructions, You have kernel memory de-duper available, but it is not currently enabled. To enable it run :"

echo 1 >/sys/kernel/mm/ksm/run && echo 1000 >/sys/kernel/mm/ksm/sleep_millisecs  

It also say "If you enable it, you will save 40-60% of netdata memory."

Should I run this command in my host or inside the docker container ?

Edit

I am running my docker container using:

  net:        host
  privileged: true
  pid:        host
Dimitri Kopriwa
  • 13,139
  • 27
  • 98
  • 204

1 Answers1

1

The command should be run inside the container.

The netdata program is running inside the docker container and doesn't have access to the host's filesystem. So running the command on the host will be useless since the changes in the files /sys/kernel/mm/ksm/run and /sys/kernel/mm/ksm/sleep_millisecs will not be seen by programs running inside the container.

yamenk
  • 46,736
  • 10
  • 93
  • 87
  • I've updated with some of my docker configure -host privliged – Dimitri Kopriwa Sep 28 '17 at 17:31
  • @BigDong the same applies. The commad should be run inside the container – yamenk Sep 28 '17 at 17:32
  • When you say that running the same command on the host will be useless, do you mean they will not affect the system in any way? – Dimitri Kopriwa Sep 28 '17 at 18:24
  • @BigDong the memory de-duper is usually enabled by default on linux. You can check the files on ur host to be sure. But even if u enable it on the host netdata will still give u the warning because it can't read the files on the host. – yamenk Sep 28 '17 at 18:46