From f212441a1b9ff2af8a4131593798ecedcc680b74 Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Thu, 15 Apr 2021 16:43:05 +0300 Subject: [PATCH] sysctl and others. --- deltup/getdelta.rc | 1 + fonts/conf.d/30-urw-aliases.conf | 1 - local.d/ioschedulers.start | 16 ++++++++++++++++ local.d/ncq_noop.start | 11 ----------- sysctl.d/12309.conf | 18 +++++++++--------- 5 files changed, 26 insertions(+), 21 deletions(-) delete mode 120000 fonts/conf.d/30-urw-aliases.conf create mode 100755 local.d/ioschedulers.start delete mode 100755 local.d/ncq_noop.start diff --git a/deltup/getdelta.rc b/deltup/getdelta.rc index 891f17e..39d1036 100644 --- a/deltup/getdelta.rc +++ b/deltup/getdelta.rc @@ -12,6 +12,7 @@ DELTUP_SERVER="http://linux01.gwdg.de/~nlissne/deltup.php" # command to use for downloading #FETCH="/usr/bin/wget --trust-server-names -t 1 --passive-ftp" FETCH="/usr/bin/wget -t 1 --passive-ftp" +#FETCH="/usr/bin/wget -t 1 --passive-ftp --no-check-certificate" # number of seconds to wait before a queued request is retried QUEUERETRY="15" diff --git a/fonts/conf.d/30-urw-aliases.conf b/fonts/conf.d/30-urw-aliases.conf deleted file mode 120000 index 227e03d..0000000 --- a/fonts/conf.d/30-urw-aliases.conf +++ /dev/null @@ -1 +0,0 @@ -../conf.avail/30-urw-aliases.conf \ No newline at end of file diff --git a/local.d/ioschedulers.start b/local.d/ioschedulers.start new file mode 100755 index 0000000..be5a9bd --- /dev/null +++ b/local.d/ioschedulers.start @@ -0,0 +1,16 @@ +#!/bin/sh + +# none (IOPS=60/20) mq-deadline (IOPS=70/23) kyber (IOPS=78/26) bfq (IOPS=47/16) +# none (18/6) mq-deadline (19/6.3) kyber (20/6.68) bfq (20/6.79) +scheduler=mq-deadline + +# Set on noop scheduler for hdds with NCQ +for D in /sys/block/{sd?,nvme*}; do + S=$D/queue/scheduler + #Q=$D/device/queue_depth + #if [[ "$(cat $Q)" == "31" ]]; then + echo $D: $(cat $S) - set schedule to $scheduler + #echo noop > $S + echo $scheduler > $S + #fi +done diff --git a/local.d/ncq_noop.start b/local.d/ncq_noop.start deleted file mode 100755 index b10b0f8..0000000 --- a/local.d/ncq_noop.start +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -# Set on noop scheduler for hdds with NCQ -for D in /sys/block/sd?; do - S=$D/queue/scheduler - Q=$D/device/queue_depth - if [[ "$(cat $Q)" == "31" ]]; then - echo $D: $(cat $S) - set schedule to noop - echo noop > $S - fi -done diff --git a/sysctl.d/12309.conf b/sysctl.d/12309.conf index b4e0d2d..1646b19 100644 --- a/sysctl.d/12309.conf +++ b/sysctl.d/12309.conf @@ -1,21 +1,21 @@ # swap usage (default = 60) -vm.swappiness = 5 +vm.swappiness = 1 # (default = 100) -vm.vfs_cache_pressure = 1000 +vm.vfs_cache_pressure = 50 # http://www.linux.org.ru/wiki/en/User:shimon/12309 # reduce memory size allowed to process (default = 0 ) -vm.overcommit_memory = 1 +vm.overcommit_memory = 0 # memory allowed to process: total_swap + total_ram * overcommit_ratio / 100 (default = 50 ) -#vm.overcommit_ratio = 12 +vm.overcommit_ratio = 10 # disk buffer size (default = 0 ) vm.dirty_bytes = 16777216 # disk buffer size (default = 0 ) -vm.dirty_background_bytes = 4194304 +vm.dirty_background_bytes = 33554432 # For old kernels <2.6.30 (default = 40) -#vm.dirty_ratio = 12 +#vm.dirty_ratio = 40 # For old kernels <2.6.30 (default = 10) -#vm.dirty_background_ratio = 3 +#vm.dirty_background_ratio = 10 # https://github.com/zen-kernel/zen-kernel/issues/81#issuecomment-260779930 -vm.dirty_expire_centisecs = 800 -vm.dirty_writeback_centisecs = 500 +vm.dirty_expire_centisecs = 100 +vm.dirty_writeback_centisecs = 300