indy
September 13, 2024, 12:23pm
1
CachyOS scx-scheduler smooths my desktop experience and appears to use the CPU cores efficiently, keeping the temperatures down.
.-------------------------: indy@cachyos-x8664
.+=========================. ------------------
:++===++==================- :++- OS: CachyOS Linux x86_64
:*++====+++++=============- .==: Kernel: Linux 6.10.9-2-cachyos
-*+++=====+***++==========: Uptime: 1 hour, 23 mins
=*++++========------------: Packages: 991 (pacman)
=*+++++=====- ... Shell: fish 3.7.1
.+*+++++=-===: .=+++=: Display (49M2C8900L): 5120x1440 @ 144 Hz in 49″ [External]
:++++=====-==: -*****+ DE: GNOME 46.4
:++========-=. .=+**+. WM: Mutter (Wayland)
.+==========-. . WM Theme: Adwaita
:+++++++====- .--==-. Theme: Adwaita [GTK2/3/4]
:++==========. :+++++++: Icons: Adwaita [GTK2/3/4]
.-===========. =*****+*+ Font: Cantarell (11pt) [GTK2/3/4]
.-===========: .+*****+: Cursor: Adwaita (24px)
-=======++++:::::::::::::::::::::::::-: .---: Terminal: GNOME Terminal 3.52.2
:======++++====+++******************=. Terminal Font: Source Code Pro (10pt)
:=====+++==========++++++++++++++*- CPU: 13th Gen Intel(R) Core(TM) i9-13900K (24) @ 6.00 GHz
.====++==============++++++++++*- GPU: NVIDIA GeForce RTX 4090 [Discrete]
.===+==================+++++++: Memory: 4.71 GiB / 94.14 GiB (5%)
.-=======================+++: Swap: 0 B / 94.14 GiB (0%)
.......................... Disk (/): 73.31 GiB / 1.79 TiB (4%) - ext4
Local IP (eno2): 192.168.178.24/24
Locale: en_GB.UTF-8
~
❯ systemctl status scx
● scx.service - Start scx_scheduler
Loaded: loaded (/usr/lib/systemd/system/scx.service; enabled; preset: disabled)
Active: active (running) since Fri 2024-09-13 11:59:03 BST; 1h 23min ago
Invocation: 5407255c5991487ead0226a7f4b41f8b
Main PID: 909 (scx_lavd)
Tasks: 4 (limit: 115526)
Memory: 29.9M (peak: 31.2M)
CPU: 751ms
CGroup: /system.slice/scx.service
└─909 scx_lavd --autopower
Sep 13 11:59:03 cachyos-x8664 systemd[1]: Started Start scx_scheduler.
Sep 13 11:59:03 cachyos-x8664 bash[909]: 10:59:03 [INFO] scx_lavd scheduler is initialized (build ID: 1.0.4-gfb35fdb-dirty x86_64-unknown-l>
Sep 13 11:59:03 cachyos-x8664 bash[909]: 10:59:03 [INFO] scx_lavd scheduler starts running.
Sep 13 11:59:03 cachyos-x8664 bash[909]: 10:59:03 [INFO] Set the scheduler's power profile to balanced mode.
Sep 13 11:59:06 cachyos-x8664 bash[909]: 10:59:06 [INFO] Set the scheduler's power profile to performance mode.
5 Likes
indy
September 13, 2024, 12:54pm
3
Hey @altman , regarding your previous question about my RAM, I have two 48GB sticks of Corsair Vengence DDR5 6400.
❯ sudo dmidecode --type 17
# dmidecode 3.6
Getting SMBIOS data from sysfs.
SMBIOS 3.5.0 present.
Handle 0x000D, DMI type 17, 92 bytes
Memory Device
Array Handle: 0x000C
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 48 GB
Form Factor: DIMM
Set: None
Locator: Controller0-DIMM0
Bank Locator: BANK 0
Type: DDR5
Type Detail: Synchronous
Speed: 6400 MT/s
Manufacturer: Corsair
Serial Number: 00000000
Asset Tag: 9876543210
Part Number: CMK96GX5M2B6400C32
Rank: 2
Configured Memory Speed: 6400 MT/s
Minimum Voltage: 1.1 V
Maximum Voltage: 1.4 V
Configured Voltage: 1.1 V
Memory Technology: DRAM
Memory Operating Mode Capability: Volatile memory
Firmware Version: Not Specified
Module Manufacturer ID: Bank 3, Hex 0x9E
Module Product ID: Unknown
Memory Subsystem Controller Manufacturer ID: Unknown
Memory Subsystem Controller Product ID: Unknown
Non-Volatile Size: None
Volatile Size: 48 GB
Cache Size: None
Logical Size: None
Handle 0x000E, DMI type 17, 92 bytes
Memory Device
Array Handle: 0x000C
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 48 GB
Form Factor: DIMM
Set: None
Locator: Controller1-DIMM0
Bank Locator: BANK 0
Type: DDR5
Type Detail: Synchronous
Speed: 6400 MT/s
Manufacturer: Corsair
Serial Number: 00000000
Asset Tag: 9876543210
Part Number: CMK96GX5M2B6400C32
Rank: 2
Configured Memory Speed: 6400 MT/s
Minimum Voltage: 1.1 V
Maximum Voltage: 1.4 V
Configured Voltage: 1.1 V
Memory Technology: DRAM
Memory Operating Mode Capability: Volatile memory
Firmware Version: Not Specified
Module Manufacturer ID: Bank 3, Hex 0x9E
Module Product ID: Unknown
Memory Subsystem Controller Manufacturer ID: Unknown
Memory Subsystem Controller Product ID: Unknown
Non-Volatile Size: None
Volatile Size: 48 GB
Cache Size: None
Logical Size: None
altman
September 13, 2024, 12:55pm
4
Wow, my dream RAM @indy
Are those the Titanium series @indy
altman
September 13, 2024, 12:58pm
6
indy:
sudo dmidecode --type 17
Hey cool, that must be a monster !
Here are my crap-RAMs ! lol X2 for a little while till I have the other parts in order to make another install;
❯ sudo dmidecode --type 17
# dmidecode 3.6
Getting SMBIOS data from sysfs.
SMBIOS 3.1.1 present.
Handle 0x0011, DMI type 17, 40 bytes
Memory Device
Array Handle: 0x0010
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 8 GB
Form Factor: DIMM
Set: None
Locator: ChannelA-DIMM0
Bank Locator: BANK 0
Type: DDR4
Type Detail: Synchronous
Speed: 2667 MT/s
Manufacturer: Kingston
Serial Number: B550ECB1
Asset Tag: 9876543210
Part Number: 9905713-030.A00G
Rank: 1
Configured Memory Speed: 2667 MT/s
Minimum Voltage: Unknown
Maximum Voltage: Unknown
Configured Voltage: 1.2 V
altman
September 13, 2024, 1:01pm
7
The kernel I use already has the scheduler on it,
❯ uname -a
Linux cachyos-x8664 6.10.9-1-cachyos-sched-ext-lto #1 SMP PREEMPT_DYNAMIC Sun, 08 Sep 2024 19:52:25 +0000 x86_64 GNU/Linux
indy
September 13, 2024, 1:42pm
8
Ha! Slightly newer on mine.
❯ uname -a
Linux cachyos-x8664 6.10.9-2-cachyos #1 SMP PREEMPT_DYNAMIC Sun, 08 Sep 2024 18:17:48 +0000 x86_64 GNU/Linux
I also followed the instructions here,
and edited the /etc/default/scx
and then executed sudo systemctl enable --now scx
. My /etc/default/scx
looks like:
# List of scx_schedulers: scx_bpfland scx_central scx_lavd scx_layered scx_nest scx_qmap scx_rlfifo scx_rustland scx_rusty scx_simple scx_u>
SCX_SCHEDULER=scx_lavd
# Set custom flags for each scheduler, below is an example of how to use
SCX_FLAGS='--autopower'
I found the scx-lavd --autopower
is the best out of all.
altman
September 13, 2024, 2:14pm
9
Oh, cool ! Thx for the link, looked at it a while ago & found that too complicated for me ! lol
Here s mine results @indy , defaults from the kernel; Edit: I didn t know of those results beforehand;
# List of scx_schedulers: scx_bpfland scx_central scx_lavd scx_layered scx_nest scx_qmap scx_rlfifo scx_rustland scx_rusty scx_simple scx_userla>
SCX_SCHEDULER=scx_bpfland
# Set custom flags for each scheduler, below is an example of how to use
#SCX_FLAGS='-s 20000 --lowlatency --primary-domain all'
indy
September 13, 2024, 2:17pm
10
Run systemctl status scx
and see the output. I get:
❯ systemctl status scx
● scx.service - Start scx_scheduler
Loaded: loaded (/usr/lib/systemd/system/scx.service; enabled; preset: disabled)
Active: active (running) since Fri 2024-09-13 11:59:03 BST; 3h 17min ago
Invocation: 5407255c5991487ead0226a7f4b41f8b
Main PID: 909 (scx_lavd)
Tasks: 4 (limit: 115526)
Memory: 30.1M (peak: 31.2M)
CPU: 1.722s
CGroup: /system.slice/scx.service
└─909 scx_lavd --autopower
Sep 13 11:59:03 cachyos-x8664 systemd[1]: Started Start scx_scheduler.
Sep 13 11:59:03 cachyos-x8664 bash[909]: 10:59:03 [INFO] scx_lavd scheduler is initialized (build ID: 1.0.4-gfb35fdb-dirty x86_64-unknown-l>
Sep 13 11:59:03 cachyos-x8664 bash[909]: 10:59:03 [INFO] scx_lavd scheduler starts running.
Sep 13 11:59:03 cachyos-x8664 bash[909]: 10:59:03 [INFO] Set the scheduler's power profile to balanced mode.
Sep 13 11:59:06 cachyos-x8664 bash[909]: 10:59:06 [INFO] Set the scheduler's power profile to performance mode.
altman
September 13, 2024, 2:18pm
11
indy:
systemctl status scx
Oh, here s mine; completly dead on my end ! lol
❯ systemctl status scx
○ scx.service - Start scx_scheduler
Loaded: loaded (/usr/lib/systemd/system/scx.service; disabled; preset: disabled)
Active: inactive (dead)
1 Like
indy
September 13, 2024, 2:21pm
12
You can start your preferred shceduler as per wiki article. e.g. sudo scx_rusty
1 Like
altman
September 13, 2024, 2:21pm
13
Thx, I ll check it out @indy
I ll have to kick my butt & figure that out. lol
1 Like
altman
September 13, 2024, 3:53pm
15
Wow, looks great @indy , the price, less so ! lol
1 Like
LAVD is doing wonders to my games! They are crazy smooth! I had high hope for scx_bpfland, but in the end I prefered scx_lavd.
❯ uname -a
Linux gaming 6.10.10-2-cachyos #1 SMP PREEMPT_DYNAMIC Fri, 13 Sep 2024 18:44:28 +0000 x86_64 GNU/Linux
# List of scx_schedulers: scx_bpfland scx_central scx_lavd scx_layered scx_nest scx_qmap scx_rlfifo scx_rustland scx_rusty scx_simple scx_userland
SCX_SCHEDULER=scx_lavd --performance --no-core-compaction
#SCX_SCHEDULER=scx_bpfland
# Set custom flags for each scheduler, below is an example of how to use
#SCX_FLAGS='-s 20000 --lowlatency --primary-domain all'
2 Likes
I’ve noticed that when I set the flags I want using SCX_FLAGS
, they won’t apply when SCX_SCHEDULER
is set to scx_lavd
. I’ve verified using htop
.
I found that flags only apply when I set them on SCX_SCHEDULER
like this:
SCX_SCHEDULER=scx_lavd --performance --no-core-compaction
I wonder if this behavior only apply to my installation.
indy
September 14, 2024, 4:15pm
18
indy:
SCX_FLAGS='--autopower'
Hey @iSpeakVeryWell , might be a simple oversight. Have you put the single quotation marks?
altman
September 14, 2024, 4:38pm
19
Finally got it to work @indy , but something s disabled ( Presets), anyways, forgot one command & to reboot afterward, it might be why I never got it to work;
systemctl status scx
● scx.service - Start scx_scheduler
Loaded: loaded (/usr/lib/systemd/system/scx.service; enabled; preset: disabled)
Active: active (running) since Sat 2024-09-14 12:29:23 EDT; 5min ago
Invocation: 41484a76f89b47b792f29b553b349402
Main PID: 623 (scx_bpfland)
Tasks: 4 (limit: 18870)
Memory: 18.3M (peak: 29.9M)
CPU: 168ms
CGroup: /system.slice/scx.service
└─623 scx_bpfland -s 20000 --lowlatency --primary-domain all
Sep 14 12:29:23 cachyos-x8664 bash[623]: 16:29:23 [INFO] preferred CPU domain = 0x3f
Sep 14 12:29:23 cachyos-x8664 bash[623]: 16:29:23 [INFO] primary CPU domain = 0x3f
Sep 14 12:29:23 cachyos-x8664 bash[623]: 16:29:23 [INFO] cpufreq performance level: auto
Sep 14 12:29:23 cachyos-x8664 bash[623]: 16:29:23 [INFO] L2 cache ID 1: sibling CPUs: [1]
Sep 14 12:29:23 cachyos-x8664 bash[623]: 16:29:23 [INFO] L2 cache ID 5: sibling CPUs: [5]
Sep 14 12:29:23 cachyos-x8664 bash[623]: 16:29:23 [INFO] L2 cache ID 4: sibling CPUs: [4]
Sep 14 12:29:23 cachyos-x8664 bash[623]: 16:29:23 [INFO] L2 cache ID 0: sibling CPUs: [0]
Sep 14 12:29:23 cachyos-x8664 bash[623]: 16:29:23 [INFO] L2 cache ID 2: sibling CPUs: [2]
Sep 14 12:29:23 cachyos-x8664 bash[623]: 16:29:23 [INFO] L2 cache ID 3: sibling CPUs: [3]
Sep 14 12:29:23 cachyos-x8664 bash[623]: 16:29:23 [INFO] L3 cache ID 0: sibling CPUs: [0, 1, 2, 3, 4, 5]
1 Like
Hard to say, it was a good while ago. I’ve just tried to reproduce the problem but wasn’t able to, which is a good news! Maybe a bug that have been fixed since then, or maybe I had messed up, it’s not impossible.
1 Like