Обновление

This commit is contained in:
2021-08-27 12:15:49 +03:00
parent 7505316c2c
commit 763ec72402
3 changed files with 95 additions and 23 deletions

View File

@ -0,0 +1,44 @@
= Настройка Redis
:category: Linux
:tags: Linux, Redis,
Создать файл `/etc/sysctl.d/98-redis.conf`:
[source,text]
----
net.core.somaxconn=65535
vm.overcommit_memory=1
----
Перезагрузить систему или выполнить команду:
[source,sh]
----
sudo sysctl -p
----
Создать файл `/etc/systemd/system/disable-transparent-huge-pages.service`:
[source,text]
----
[Unit]
Description=Disable Transparent Huge Pages (THP)
DefaultDependencies=no
After=sysinit.target local-fs.target
Before=mongod.service redis.service redis-server.service
[Service]
Type=oneshot
ExecStart=/bin/sh -c 'echo never | tee /sys/kernel/mm/transparent_hugepage/enabled > /dev/null'
[Install]
WantedBy=basic.target
----
Разрешить автоматический запуск при загрузке системы:
[source,sh]
----
sudo systemctl enable disable-transparent-huge-pages.service
----

View File

@ -0,0 +1,29 @@
= Настройка параметров локальной сети
:category: Linux
:tags: Linux, сеть, ethernet
Создать файл `/etc/sysctl.d/98-network.conf`:
[source,text]
----
net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=33554432
net.core.wmem_max=33554432
net.ipv4.tcp_rmem = 4096 262144 33554432
net.ipv4.tcp_wmem = 4096 262144 33554432
net.ipv4.tcp_mem = 4096 262144 33554432
net.core.netdev_max_backlog = 16384
net.ipv4.ipfrag_high_threshold = 8388608
----
Перезагрузить систему или выполнить команду:
[source,sh]
----
sudo sysctl -p
----