* [gentoo-user] Activating BMQ CPU Scheduler @ 2023-04-26 16:15 Nikos Chantziaras 2023-04-26 20:06 ` [gentoo-user] " Holger Hoffstätte 0 siblings, 1 reply; 10+ messages in thread From: Nikos Chantziaras @ 2023-04-26 16:15 UTC (permalink / raw To: gentoo-user So I wanted to try the BMQ scheduler in gentoo-sources. Is just enabling it in the kernel build all that's needed? I did so, booted, and: $ dmesg | grep -i bmq [ 0.100284] sched/bmq: BMQ CPU Scheduler v6.1-r4 by Alfred Chen. That's all and it's in use now? Or do I need to toggle anything else? ^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-user] Re: Activating BMQ CPU Scheduler 2023-04-26 16:15 [gentoo-user] Activating BMQ CPU Scheduler Nikos Chantziaras @ 2023-04-26 20:06 ` Holger Hoffstätte 2023-05-01 20:24 ` Nikos Chantziaras 0 siblings, 1 reply; 10+ messages in thread From: Holger Hoffstätte @ 2023-04-26 20:06 UTC (permalink / raw To: gentoo-user On 2023-04-26 18:15, Nikos Chantziaras wrote: > So I wanted to try the BMQ scheduler in gentoo-sources. Is just enabling it in the kernel build all that's needed? I did so, booted, and: > > $ dmesg | grep -i bmq > [ 0.100284] sched/bmq: BMQ CPU Scheduler v6.1-r4 by Alfred Chen. > > That's all and it's in use now? Or do I need to toggle anything else? That's all you need to do, right. You can slso alternatively switch to PDS under the "General setup > Scheduler features" kernel-config menu, which is slightly better for throughput and "more correct" when many tasks have varying priorities - beefy workstation or server. BMQ is kind of simplistic (in an elegant way), but that's why it is so effective for low-end systems and desktops. Run iperf3 over loopback (i.e. both server and client) to see the difference. cheers Holger ^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-user] Re: Activating BMQ CPU Scheduler 2023-04-26 20:06 ` [gentoo-user] " Holger Hoffstätte @ 2023-05-01 20:24 ` Nikos Chantziaras 2023-05-02 6:53 ` Holger Hoffstätte 0 siblings, 1 reply; 10+ messages in thread From: Nikos Chantziaras @ 2023-05-01 20:24 UTC (permalink / raw To: gentoo-user On 26/04/2023 23:06, Holger Hoffstätte wrote: > On 2023-04-26 18:15, Nikos Chantziaras wrote: >> So I wanted to try the BMQ scheduler in gentoo-sources. Is just >> enabling it in the kernel build all that's needed? I did so, booted, and: >> >> $ dmesg | grep -i bmq >> [ 0.100284] sched/bmq: BMQ CPU Scheduler v6.1-r4 by Alfred Chen. >> >> That's all and it's in use now? Or do I need to toggle anything else? > > That's all you need to do, right. You can slso alternatively switch to > PDS under > the "General setup > Scheduler features" kernel-config menu, which is > slightly better > for throughput and "more correct" when many tasks have varying > priorities - beefy > workstation or server. > BMQ is kind of simplistic (in an elegant way), but that's why it is so > effective > for low-end systems and desktops. > Run iperf3 over loopback (i.e. both server and client) to see the > difference. Switched back to the default (called "CFS" I think.) BMQ has severe issues. When emerging something while I play a game (either native or through wine-proton,) there's long lag spikes and freezes. Even worse, there's bugs like the system completely hanging on shutdown, or "umount" hanging with 100% CPU use by two kernel threads. ^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-user] Re: Activating BMQ CPU Scheduler 2023-05-01 20:24 ` Nikos Chantziaras @ 2023-05-02 6:53 ` Holger Hoffstätte 2023-05-02 11:41 ` Alexe Stefan 2023-05-02 19:19 ` Nikos Chantziaras 0 siblings, 2 replies; 10+ messages in thread From: Holger Hoffstätte @ 2023-05-02 6:53 UTC (permalink / raw To: gentoo-user, Nikos Chantziaras On 2023-05-01 22:24, Nikos Chantziaras wrote: > On 26/04/2023 23:06, Holger Hoffstätte wrote: >> On 2023-04-26 18:15, Nikos Chantziaras wrote: >>> So I wanted to try the BMQ scheduler in gentoo-sources. Is just >>> enabling it in the kernel build all that's needed? I did so, >>> booted, and: >>> >>> $ dmesg | grep -i bmq [ 0.100284] sched/bmq: BMQ CPU Scheduler >>> v6.1-r4 by Alfred Chen. >>> >>> That's all and it's in use now? Or do I need to toggle anything >>> else? >> >> That's all you need to do, right. You can slso alternatively switch >> to PDS under the "General setup > Scheduler features" kernel-config >> menu, which is slightly better for throughput and "more correct" >> when many tasks have varying priorities - beefy workstation or >> server. BMQ is kind of simplistic (in an elegant way), but that's >> why it is so effective for low-end systems and desktops. Run iperf3 >> over loopback (i.e. both server and client) to see the difference. > > Switched back to the default (called "CFS" I think.) > > BMQ has severe issues. When emerging something while I play a game > (either native or through wine-proton,) there's long lag spikes and > freezes. Even worse, there's bugs like the system completely hanging > on shutdown, or "umount" hanging with 100% CPU use by two kernel > threads. Can you try booting with psi=0 and check if that helps? There's a known bad interaction with the PSI (Pressure Stall Information) mechanism, which is active by default in many kernel configs. The latest version of the BMQ patch makes sure to turn it off, you may not have that version yet. BMQ (and PDS) works fine and has done so for quite a while. -h ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-user] Re: Activating BMQ CPU Scheduler 2023-05-02 6:53 ` Holger Hoffstätte @ 2023-05-02 11:41 ` Alexe Stefan 2023-05-02 19:19 ` Nikos Chantziaras 1 sibling, 0 replies; 10+ messages in thread From: Alexe Stefan @ 2023-05-02 11:41 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 1941 bytes --] What scheduler produces the best results on regular desktop systems? mar., 2 mai 2023, 09:54 Holger Hoffstätte <holger@applied-asynchrony.com> a scris: > On 2023-05-01 22:24, Nikos Chantziaras wrote: > > On 26/04/2023 23:06, Holger Hoffstätte wrote: > >> On 2023-04-26 18:15, Nikos Chantziaras wrote: > >>> So I wanted to try the BMQ scheduler in gentoo-sources. Is just > >>> enabling it in the kernel build all that's needed? I did so, > >>> booted, and: > >>> > >>> $ dmesg | grep -i bmq [ 0.100284] sched/bmq: BMQ CPU Scheduler > >>> v6.1-r4 by Alfred Chen. > >>> > >>> That's all and it's in use now? Or do I need to toggle anything > >>> else? > >> > >> That's all you need to do, right. You can slso alternatively switch > >> to PDS under the "General setup > Scheduler features" kernel-config > >> menu, which is slightly better for throughput and "more correct" > >> when many tasks have varying priorities - beefy workstation or > >> server. BMQ is kind of simplistic (in an elegant way), but that's > >> why it is so effective for low-end systems and desktops. Run iperf3 > >> over loopback (i.e. both server and client) to see the difference. > > > > Switched back to the default (called "CFS" I think.) > > > > BMQ has severe issues. When emerging something while I play a game > > (either native or through wine-proton,) there's long lag spikes and > > freezes. Even worse, there's bugs like the system completely hanging > > on shutdown, or "umount" hanging with 100% CPU use by two kernel > > threads. > > Can you try booting with psi=0 and check if that helps? There's a known > bad interaction with the PSI (Pressure Stall Information) mechanism, > which is active by default in many kernel configs. The latest version > of the BMQ patch makes sure to turn it off, you may not have that version > yet. BMQ (and PDS) works fine and has done so for quite a while. > > -h > > [-- Attachment #2: Type: text/html, Size: 2525 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-user] Re: Activating BMQ CPU Scheduler 2023-05-02 6:53 ` Holger Hoffstätte 2023-05-02 11:41 ` Alexe Stefan @ 2023-05-02 19:19 ` Nikos Chantziaras 2023-05-03 17:11 ` Holger Hoffstätte 1 sibling, 1 reply; 10+ messages in thread From: Nikos Chantziaras @ 2023-05-02 19:19 UTC (permalink / raw To: gentoo-user On 02/05/2023 09:53, Holger Hoffstätte wrote: >> [...] >> Switched back to the default (called "CFS" I think.) >> >> BMQ has severe issues. When emerging something while I play a game >> (either native or through wine-proton,) there's long lag spikes and >> freezes. Even worse, there's bugs like the system completely hanging >> on shutdown, or "umount" hanging with 100% CPU use by two kernel >> threads. > > Can you try booting with psi=0 and check if that helps? There's a known > bad interaction with the PSI (Pressure Stall Information) mechanism, > which is active by default in many kernel configs. The latest version > of the BMQ patch makes sure to turn it off, you may not have that version > yet. BMQ (and PDS) works fine and has done so for quite a while. Will have to rebuild again. Does that work on 6.1 kernels? (I only use LTS nowadays.) ^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-user] Re: Activating BMQ CPU Scheduler 2023-05-02 19:19 ` Nikos Chantziaras @ 2023-05-03 17:11 ` Holger Hoffstätte 2023-05-06 12:07 ` Nikos Chantziaras 0 siblings, 1 reply; 10+ messages in thread From: Holger Hoffstätte @ 2023-05-03 17:11 UTC (permalink / raw To: gentoo-user On 2023-05-02 21:19, Nikos Chantziaras wrote: > On 02/05/2023 09:53, Holger Hoffstätte wrote: >>> [...] >>> Switched back to the default (called "CFS" I think.) >>> >>> BMQ has severe issues. When emerging something while I play a game >>> (either native or through wine-proton,) there's long lag spikes and >>> freezes. Even worse, there's bugs like the system completely hanging >>> on shutdown, or "umount" hanging with 100% CPU use by two kernel >>> threads. >> >> Can you try booting with psi=0 and check if that helps? There's a known >> bad interaction with the PSI (Pressure Stall Information) mechanism, >> which is active by default in many kernel configs. The latest version >> of the BMQ patch makes sure to turn it off, you may not have that version >> yet. BMQ (and PDS) works fine and has done so for quite a while. > > Will have to rebuild again. Does that work on 6.1 kernels? (I only use LTS nowadays.) Check first if you had CONFIG_PSI enabled. The setting will work in any case, but if you already had it disabled/missing then there's no need to try again. cheers Holger ^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-user] Re: Activating BMQ CPU Scheduler 2023-05-03 17:11 ` Holger Hoffstätte @ 2023-05-06 12:07 ` Nikos Chantziaras 2023-05-06 14:45 ` Holger Hoffstätte 0 siblings, 1 reply; 10+ messages in thread From: Nikos Chantziaras @ 2023-05-06 12:07 UTC (permalink / raw To: gentoo-user On 03/05/2023 20:11, Holger Hoffstätte wrote: > On 2023-05-02 21:19, Nikos Chantziaras wrote: >> On 02/05/2023 09:53, Holger Hoffstätte wrote: >>>> [...] >>>> BMQ has severe issues. When emerging something while I play a game >>>> (either native or through wine-proton,) there's long lag spikes and >>>> freezes. Even worse, there's bugs like the system completely hanging >>>> on shutdown, or "umount" hanging with 100% CPU use by two kernel >>>> threads. >>> [...] > > Check first if you had CONFIG_PSI enabled. The setting will work in any > case, > but if you already had it disabled/missing then there's no need to try > again. It was enabled so now I disabled it. I'm not even sure why it was enabled in the first place, it sounds useless and is documented as "Say N if not sure." Haven't had any issues to far. The main thing I was hoping BMQ might be able to fix is the short sound dropout when seeking in MPV. Meaning sound dropping out in other applications while seeking in a video in MPV. And guess what, it indeed fixes it. I had similar audio issues many years ago, and back then BFQ was able to fix them. Thanks for the help! ^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-user] Re: Activating BMQ CPU Scheduler 2023-05-06 12:07 ` Nikos Chantziaras @ 2023-05-06 14:45 ` Holger Hoffstätte 2023-05-16 12:25 ` Nikos Chantziaras 0 siblings, 1 reply; 10+ messages in thread From: Holger Hoffstätte @ 2023-05-06 14:45 UTC (permalink / raw To: gentoo-user On 2023-05-06 14:07, Nikos Chantziaras wrote: > On 03/05/2023 20:11, Holger Hoffstätte wrote: >> On 2023-05-02 21:19, Nikos Chantziaras wrote: >>> On 02/05/2023 09:53, Holger Hoffstätte wrote: >>>>> [...] BMQ has severe issues. When emerging something while I >>>>> play a game (either native or through wine-proton,) there's >>>>> long lag spikes and freezes. Even worse, there's bugs like >>>>> the system completely hanging on shutdown, or "umount" >>>>> hanging with 100% CPU use by two kernel threads. >>>> [...] >> >> Check first if you had CONFIG_PSI enabled. The setting will work in >> any case, but if you already had it disabled/missing then there's >> no need to try again. > > It was enabled so now I disabled it. I'm not even sure why it was > enabled in the first place, it sounds useless and is documented as > "Say N if not sure." Haven't had any issues to far. Great! PSI is extremely useful, but was made primarily for servers, though there are potentially interesting use cases for dektop systems as well. It does come at a slight cost at runtime though, so unless you're using it it's probably better to just disable it. See https://www.kernel.org/doc/html/latest/accounting/psi.html and https://facebookmicrosites.github.io/psi/docs/overview for more. Unfortunately it seems that a recent change in the mainline kernel introduced a bit of an incompatibility, which is why the BMQ/PDS patch now turns it off. We're trying to get that incompatibility fixed. Anyway: glad you're up and running now! cheers Holger ^ permalink raw reply [flat|nested] 10+ messages in thread
* [gentoo-user] Re: Activating BMQ CPU Scheduler 2023-05-06 14:45 ` Holger Hoffstätte @ 2023-05-16 12:25 ` Nikos Chantziaras 0 siblings, 0 replies; 10+ messages in thread From: Nikos Chantziaras @ 2023-05-16 12:25 UTC (permalink / raw To: gentoo-user On 06/05/2023 17:45, Holger Hoffstätte wrote: > Unfortunately it seems that a recent change in the mainline kernel > introduced a bit of an incompatibility, which is why the BMQ/PDS patch > now turns it off. We're trying to get that incompatibility fixed. > > Anyway: glad you're up and running now! I had two lockups in one week, so I reverted back to CFQ. It happened while I wasn't using the machine. I came back to find it unresponsive, except the mouse cursor still moves. But you can't do anything other than move the mouse. Not even SysRq works. Usually I can do the SysRq+ REISSUB key sequence to reboot machines that stopped responding, but it doesn't do anything in this case. The log contains nothing, meaning logging has locked up too. ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-05-16 12:25 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-04-26 16:15 [gentoo-user] Activating BMQ CPU Scheduler Nikos Chantziaras 2023-04-26 20:06 ` [gentoo-user] " Holger Hoffstätte 2023-05-01 20:24 ` Nikos Chantziaras 2023-05-02 6:53 ` Holger Hoffstätte 2023-05-02 11:41 ` Alexe Stefan 2023-05-02 19:19 ` Nikos Chantziaras 2023-05-03 17:11 ` Holger Hoffstätte 2023-05-06 12:07 ` Nikos Chantziaras 2023-05-06 14:45 ` Holger Hoffstätte 2023-05-16 12:25 ` Nikos Chantziaras
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox