Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] 32GB RAM and Swap
Date: Sat, 02 May 2020 14:19:41
Message-Id: b1fd611e-2dfc-052a-fa14-85b2f0b0eb0f@gmail.com
In Reply to: Re: [gentoo-user] 32GB RAM and Swap by Michael
1 Michael wrote:
2 > On Saturday, 2 May 2020 10:54:02 BST Dale wrote:
3 >> Michael wrote:
4 >>> I'd be interested to know as a comparison if Nikos' and Dale's I/O
5 >>> unresponsiveness in swapping sees an improvement with the I/O scheduler
6 >>> for
7 >>> spinning drives set to bfq; e.g.:
8 >>>
9 >>> echo bfq > /sys/block/sda/queue/scheduler
10 >> This is its setting at the moment.
11 >>
12 >>
13 >> root@fireball / # cat /sys/block/sda/queue/scheduler
14 >> noop deadline [cfq]
15 >> root@fireball / #
16 > Ahh, you must be on an older kernel?
17 >
18 > I'm on 5.4.28 here and these are the new kernel scheduler options:
19 >
20 > #
21 > # IO Schedulers
22 > #
23 > CONFIG_MQ_IOSCHED_DEADLINE=y
24 > CONFIG_MQ_IOSCHED_KYBER=y
25 > CONFIG_IOSCHED_BFQ=y
26 > CONFIG_BFQ_GROUP_IOSCHED=y
27 > # CONFIG_BFQ_CGROUP_DEBUG is not set
28 > # end of IO Schedulers
29 >
30 > The BFQ scheduler has a number of tunable parameters via sysctl, like weight,
31 > latency and what not, but unless you're into running endless benchmark tests
32 > to tune your particular devices, I'd leave it to do its thing with default
33 > settings.
34 >
35
36
37 Yea, I got new UPS batteries coming which means a complete power down. 
38 I may upgrade my kernel before doing that.  It slipped my mind so glad
39 this came up.  I'm on 4.19.40-gentoo but I need to see what is the
40 latest version nvidia-drivers supports first.  I guess I'll google that
41 or something. 
42
43
44 >> I know I can echo it in but where do I set that to that when booting?
45 > You can set a local script to switch from other schedulers - the default is
46 > mq-deadline - or you can disable the others in the kernel. I don't know if
47 > you can pass an option to the kernel line at boot time.
48 >
49 > I understand this is more effective with slow(er) spinning drives and perhaps
50 > old SSDs. NVMe drives won't benefit from it and are better run with the
51 > default mq-deadline scheduler.
52
53
54 I googled it, it seems it gets added to the kernel line options via
55 grub2's conf file.  I have another option there too, IOMMU or something
56 like that. 
57
58 Right now, it's off to the tractor and discing up my garden.  So much
59 rain lately, I'm just now able to get a tractor in it.  New disc is
60 awesome tho. 
61
62 Oh, for future reference:
63
64
65 # cat /etc/sysconfig/grub
66 GRUB_TIMEOUT=5
67 GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
68 GRUB_DEFAULT=saved
69 GRUB_DISABLE_SUBMENU=true
70 GRUB_TERMINAL_OUTPUT="console"
71 GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet elevator=cfq"
72 GRUB_DISABLE_RECOVERY="true"
73
74
75
76 It's the 2nd line from the bottom. It may be configurable in menuconfig too. I dunno know yet. I'll try to look. Must make note to upgrade kernel. Batteries will be here Monday.
77
78 Thanks much. It's on my todo list.
79
80 Dale
81
82 :-) :-)