2016-12-17 7 views
2

上のUbuntu 16.04のためのovercommit_memoryと透明な巨大なページ上のRedisの警告の解決警告がそうのように表示されます。は、新鮮なUbuntuの16.04 EC2インスタンスでEC2

WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect. 
WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled. 

永久にそれらを排除するためにどのように?

答えて

1

警告のように、/etc/sysctl.confの末尾にvm.overcommit_memory=1という行を追加してください。sudo vi /etc/sysctl.confのようになります。

しかし、権限を使用すると、警告が示唆するようにTHPを編集し、その代わりに

sudo apt install hugepages 

を行うと、sudo vi ~/.bashrcようなもので、あなたの.bashrcの下にコマンドsudo hugeadm --thp-neverを追加することはできません。

次にsudo rebootとし、次にSSHを実行してredis-serverと警告が消えてしまった!

+1

単に警告を危険にするだけですか?低メモリ状態で「バックグラウンド・セーブ」が失敗することはいつ望ましいでしょうか?盲目的に 'vm.overcommit_memory = 1'を設定するのは問題がありますか? –

関連する問題