From 37a8a031dac5f7b7d5e78e80952f353093287bbc Mon Sep 17 00:00:00 2001 From: bach Date: Tue, 16 Mar 2021 10:02:38 +0100 Subject: [PATCH] git barerepos & redis warnings --- bin/gitbarrerepos.sh | 4 ++-- bin/lemp.sh | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/gitbarrerepos.sh b/bin/gitbarrerepos.sh index 08b2b74..35f8f20 100755 --- a/bin/gitbarrerepos.sh +++ b/bin/gitbarrerepos.sh @@ -111,12 +111,12 @@ if [ "$vh" = "yes" ]; then chmod +x post-receive # pre-receive # setup git repo on site folder - cd /home/"$user"/www/"$_domain"/public_html + cd /home/"$user"/www/"$_domain"/app git init # link to the bare repo git remote add origin /home/"$user"/git-repositories/"$_domain".git - chown -R "$user":"$user" /home/"$user"/www/"$_domain"/public_html + chown -R "$user":"$user" /home/"$user"/www/"$_domain"/app cd "$_cwd" # done diff --git a/bin/lemp.sh b/bin/lemp.sh index 5b1e2ca..5d5bcfa 100755 --- a/bin/lemp.sh +++ b/bin/lemp.sh @@ -162,6 +162,11 @@ apt-get --yes install redis-server php-redis # TODO set maxmemory-policy=volatile-lru # TODO comment all save line +# WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. +# 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. + +# https://blog.opstree.com/2019/04/16/redis-best-practices-and-performance-tuning/ systemctl enable redis-server systemctl restart redis-server