You are not logged in.

#1 2012-10-20 19:31:52

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

CPU schedulers compared (bfs vs cfs)

Abstract
Con Kolivas’ Brain Fuck Scheduler (bfs) was designed to provide superior desktop interactivity and responsiveness to machines running it.[1]  However, it was not implicitly designed to provide superior performance.  The purpose of this study was to evaluate the Completely Fair Scheduler (cfs) in the vanilla Linux kernel and the bfs in the corresponding kernel patched with the ck1 patchset.  Seven (7) different machines were used to see if differences exist and, to what degree they scale using performance based metrics.  Again, these end-points were never factors in the primary design goals of the bfs.  Results were encouraging. 

Kernels patched with the ck1 patch set including the bfs outperformed the vanilla kernel using the cfs at nearly all the performance-based benchmarks tested. Further study with a larger test set could be conducted, but based on the small test set of 7 PCs evaluated, these increases in process queuing, efficiency/speed are, on the whole, independent of CPU type (mono, dual, quad, hyperthreaded, etc.), CPU architecture (32-bit and 64-bit), 64 bit) and of CPU multiplicity (mono or dual socket).

Moreover, several "modern" CPUs (Intel C2D and Ci7) that represent common workstations and laptops, consistently outperformed the cfs in the vanilla kernel at all benchmarks.  Efficiency and speed gains were small to moderate.

Link to complete study
http://repo-ck.com/bench/cpu_schedulers_compared.pdf

[1] http://ck.kolivas.org/patches/bfs/bfs-faq.txt

Comments are welcomed.

Last edited by graysky (2012-10-20 20:07:46)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Online

#2 2012-10-20 20:05:13

boast
Member
Registered: 2010-09-28
Posts: 219

Re: CPU schedulers compared (bfs vs cfs)

interesting


Asus M4A785TD-V ;; Phenom II X4 @ 3.9GHz ;; Ripjaws 12GB DDR3-1600 ;; 128GB Samsung 830 ;; MSI GTX460 v2 w/ blob ;; Arch Linux + KDE 4.x

Offline

#3 2012-10-20 20:46:06

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: CPU schedulers compared (bfs vs cfs)

Thanks graysky!  You have done these kinds of test before, haven't you?  I remember looking over one not too long ago where you did similar tests, but also turned off the hyperthreading on various machines.

Offline

#4 2012-10-20 20:56:04

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: CPU schedulers compared (bfs vs cfs)

WonderWoofy wrote:

I remember looking over one not too long ago where you did similar tests, but also turned off the hyperthreading on various machines.

Good memory.  Yes, but the current study contains more endpoints, is organized in simple tables, and uses the latest kernel versions.

Last edited by graysky (2012-10-20 20:59:49)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Online

#5 2012-10-20 21:17:12

blackout23
Member
Registered: 2011-11-16
Posts: 781

Re: CPU schedulers compared (bfs vs cfs)

Do you have any idea why BFQ slows down boot so much with systemd? At least on all my SSDs.

Offline

#6 2012-10-20 21:18:52

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: CPU schedulers compared (bfs vs cfs)

blackout23 wrote:

Do you have any idea why BFQ slows down boot so much with systemd? At least on all my SSDs.

BFQ is a disk (i/o) scheduling algorithm, BFS is a cpu scheduler - different stuff.

Last edited by karol (2012-10-20 21:19:19)

Offline

#7 2012-10-20 21:22:22

blackout23
Member
Registered: 2011-11-16
Posts: 781

Re: CPU schedulers compared (bfs vs cfs)

karol wrote:
blackout23 wrote:

Do you have any idea why BFQ slows down boot so much with systemd? At least on all my SSDs.

BFQ is a disk (i/o) scheduling algorithm, BFS is a cpu scheduler - different stuff.

Thanks. Learned something new here. I thought there would only be one scheduler.

Offline

#8 2012-10-20 21:44:31

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: CPU schedulers compared (bfs vs cfs)

blackout23 wrote:

Thanks. Learned something new here. I thought there would only be one scheduler.

Mainline only supplies one: cfs.  User can elect to use alternatives -- this is GNU Linux after all!

Last edited by graysky (2012-10-20 21:44:40)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Online

#9 2012-10-20 22:24:02

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,866

Re: CPU schedulers compared (bfs vs cfs)

Interesting results, pity you didn't have access to modern AMD systems .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#10 2012-10-20 22:36:25

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: CPU schedulers compared (bfs vs cfs)

Lone_Wolf, If you are an AMD user, you could test it.

Offline

#11 2012-10-20 22:47:39

Thaodan
Member
From: Dortmund, Nordrein-Westfalen
Registered: 2012-04-28
Posts: 448

Re: CPU schedulers compared (bfs vs cfs)

Will it replace cfs?


Linux odin 3.13.1-pf #1 SMP PREEMPT Wed Mar 5 21:47:28 CET 2014 x86_64 GNU/Linux

Offline

#12 2012-10-20 22:50:57

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: CPU schedulers compared (bfs vs cfs)

Thaodan wrote:

Will it replace cfs?

AFAIK, Con Kolivas (creator of BFS) has no intentions of bringing it to the mainline: http://ck.kolivas.org/patches/bfs/bfs-faq.txt

Are you looking at getting this into mainline?

LOL.

No really, are you?

LOL.

Really really, are you?

No. They would be crazy to use this scheduler anyway since it won't scale to
their 4096 cpu machines. The only way is to rewrite it to work that way, or
to have more than one scheduler in the kernel. I don't want to do the former,
and mainline doesn't want to do the latter. Besides, apparently I'm a bad
maintainer, which makes sense since for some reason I seem to want to have
a career, a life, raise a family with kids and have hobbies, all of which
have nothing to do with linux.

Offline

#13 2012-10-20 22:56:41

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: CPU schedulers compared (bfs vs cfs)

WonderWoofy wrote:

Lone_Wolf, If you are an AMD user, you could test it.

I made the source to the script that runs the benchmarks available.  Anyone is free to experiment at will.  The most modern AMD system I have access to is the XP 3200+ that I used in the study.  I don't think it qualifies as 'modern' in computer terms smile

Last edited by graysky (2012-10-20 23:05:53)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Online

#14 2012-10-20 22:57:27

Thaodan
Member
From: Dortmund, Nordrein-Westfalen
Registered: 2012-04-28
Posts: 448

Re: CPU schedulers compared (bfs vs cfs)

Schade


Linux odin 3.13.1-pf #1 SMP PREEMPT Wed Mar 5 21:47:28 CET 2014 x86_64 GNU/Linux

Offline

#15 2012-10-20 23:00:56

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: CPU schedulers compared (bfs vs cfs)

Thaodan wrote:

Schade

In case anyone wonders, German 'Schade' means 'too bad' in English.

Offline

#16 2012-10-21 00:04:46

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: CPU schedulers compared (bfs vs cfs)

Thanks for saving me a translation lookup karol.

Offline

Board footer

Powered by FluxBB