「REDIS」- 服务 | 部署 | with Docker Compose

镜像:https://hub.docker.com/_/redis

version: '3.8'
services:
  redis:
    image: docker.io/library/redis:4.0
    restart: always
    ports:
      - '8170:6379'
    command: redis-server --save 20 1 --loglevel warning --requirepass VvChXa5tOjcBEq
    volumes: 
      - ./data:/data

docker-compose up -d

禁用 Transparent Huge Pages 参数

linux – disable transparent hugepages – Unix & Linux Stack Exchange
How to disable Transparent Huge pages (THP) on CentOS / RHEL 7? – Ucartz Online Pvt Ltd

echo never > /sys/kernel/mm/transparent_hugepage/enabled

for CentOS

vim /etc/default/grub
...
GRUB_CMDLINE_LINUX="... transparent_hugepage=never"
...

grub2-mkconfig -o /boot/grub2/grub.cfg                      # for On BIOS-based machines
grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg             # On UEFI-based machines

# Reboot the system and verify option are in effect.
shutdown -r now
cat /proc/cmdline