Questions tagged [cfs]

Completely Fair Scheduler (CFS) is the default CPU Linux scheduler

The Completely Fair Scheduler (CFS) is a process scheduler which was merged into the 2.6.23 release of the Linux kernel and is the default scheduler. It handles CPU resource allocation for executing processes, and aims to maximize overall CPU utilization while also maximizing interactive performance.

See here for further details.

48 questions
52
votes
2 answers

Linux SCHED_OTHER, SCHED_FIFO and SCHED_RR - differences

Can someone explain the differences between SCHED_OTHER, SCHED_FIFO and SCHED_RR? Thanks
eve
  • 2,959
  • 4
  • 21
  • 18
12
votes
1 answer

Completely Fair Scheduler (CFS): vruntime of long running processes

If vruntime is counted since creation of a process how come such a process even gets a processor if it is competing with a newly created processor-bound process which is younger let say by days? As I've read the rule is simple: pick the leftmost…
listerreg
  • 584
  • 1
  • 6
  • 15
4
votes
1 answer

What is the relationship between cpu.shares and cpu.cfs_quota_us in context of cgroup?

I'm using centos6/7 and using cgroup to manage cpu resources. I have read through the RHEL document but have no answer to my question below: If I set both cfs_quota_us and shares among cgroups, then what will happen? (e.g. will cfs_quota_us take…
magodo
  • 91
  • 1
  • 4
4
votes
1 answer

Linux - lower priority threads are not scheduled when higher priority task is busy

Environment - embedded device with linux kernel 2.6.18 Requirements - 3 threads (created from one process, lets say P1 created T1, T2, T3) T1 is at linux priority 99 (The highest), T2 is at linux priority 50 (The mid), T3 is at linux priority 2 (the…
BaskarA
  • 75
  • 5
3
votes
0 answers

Is switching between threads much more efficient than processes in Linux?

From this question we know that both thread and process are treated as same schedule units in kernel and have little difference in scheduling scheme. However, I'm curious about the general cost of switching between threads and processes. For…
choxsword
  • 3,187
  • 18
  • 44
3
votes
0 answers

How vruntime of a newly created process initialised in CFS scheduler linux ?

In CFS scheduler, it always picks a process with minimum vruntime. vruntime of a running process is increased by the amount of CPU it consumes. I have following two questions related to CFS and vruntime. When multiple processes/threads are newly…
bholanath
  • 1,699
  • 1
  • 22
  • 40
3
votes
0 answers

Why vruntime of a running process is decreased in CFS scheduler in linux?

I was exploring CFS scheduler. As per CFS, vruntime is the amount of time a process runs on a CPU. So, once a process consumes some CPU its vruntime is increased. To understand the context_switch concept in depth, I looked into context_switch method…
bholanath
  • 1,699
  • 1
  • 22
  • 40
3
votes
0 answers

Why Free CPU is not allocated to process in linux?

I have one Program P1 having N (100) threads. Initially all threads are in blocking state (using semaphore) except thread 0. // Program - P1 static void handler(int sig, siginfo_t *si, void *uc) { thread_no++; ret =…
bholanath
  • 1,699
  • 1
  • 22
  • 40
2
votes
0 answers

change CFS scheduler variables

Today I wanted to change the timeslice for the CFS scheduler, So, I decided to change the below variables(parameters): kernel.sched_min_granularity_ns kernel.sched_wakeup_granularity_ns kernel.sched_latency_ns Now, on my ZORIN OS, I can see these…
AMN
  • 21
  • 2
2
votes
1 answer

What's the difference between interactive and non-interactive thread? And performance in different CPU Scheduler?

A scheduler that approximates SRTF, like a multi-level feedback queue design, will tend to favor interactive programs that perform short CPU bursts. Linux's Completely Fair Scheduler sometimes does so, but since it has a different scheduling goal,…
doudou
  • 61
  • 5
2
votes
1 answer

cfs collection showing error in react.component

I have cfs collection for file uploading. I have already used this in the template and its working well. Now I have to use this react.component but its showing this error Uncaught ReferenceError: fsFile is not defined. I have added FS.Collection but…
Kane
  • 605
  • 2
  • 8
  • 22
2
votes
1 answer

A duplicate bin range was detected. Try increasing the bin range precision

A little help wit this error ? I get it when i am running CFS in R Runnin code: best_features<- cfs(Target~.,df) where df is the dataset and Target and best_features are self explanatory. Error: Error in .jcall("weka/filters/Filter",…
2
votes
0 answers

kernel-cfs : Why is LOAD_AVG_MAX 47742?

In PELT of CFS, below parameters are used for calculating PELT. "#define LOAD_AVG_MAX 47742 /* maximum possible load avg */" "#define LOAD_AVG_MAX_N 345 /* number of full periods to produce LOAD_AVG_MAX */" Why is the LOAD_AVG_MAX 47742 ? Why is…
jaep
  • 41
  • 2
1
vote
0 answers

Why does CFS implement 100 Realtime runqueues?

In the documentation available from linux kernel, docs.kernel.org, under Chapter 6: Scheduling Classes for the topic CFS Scheduler, it says this: sched/rt.c implements SCHED_FIFO and SCHED_RR semantics, in a simpler way than the previous vanilla…
marian
  • 27
  • 7
1
vote
1 answer

Why Linux distributes threads among NUMA nodes almost equally?

I'm running an application with multiple threads and it seems Linux is distributing threads among NUMA nodes almost equally. Say my application spawns 4 threads and my machine has 4 sockets. I observe that each thread is assigned to a NUMA node…
Mohammad Siavashi
  • 1,192
  • 2
  • 17
  • 48
1
2 3 4