Обновление
This commit is contained in:
44
wiki/Linux/System/Настройка Redis.adoc
Normal file
44
wiki/Linux/System/Настройка Redis.adoc
Normal 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
|
||||
----
|
||||
|
29
wiki/Linux/System/Настройка параметров локальной сети.adoc
Normal file
29
wiki/Linux/System/Настройка параметров локальной сети.adoc
Normal 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
|
||||
----
|
||||
|
Reference in New Issue
Block a user