Long standing ULE scheduler problem with CPU intensive tasks

Kernel development, writing drivers, coding, and questions regarding FreeBSD internals.

Long standing ULE scheduler problem with CPU intensive tasks

Postby hsn » 20 Aug 2011, 10:02

ULE scheduler in 7.X and 8.X (maybe in 6 too) has one scenario where it performs really bad. I remember that oldest release of ULE worked in this scenario well (better than 4bsd) but all following ULE versions are really bad in this.

How to reproduce:
  1. run some CPU eating task on lowest priority (best for testing is distributed.net client, because it is included in ports)
  2. then compile something which is using autoconf [file]./configure[/file] script

You will notice huge performance drop due to background dnetc client. Compile (especially [file]./configure[/file] stuff) runs really slow. It should run on the same speed as without dnetc because intelligent scheduler will steal CPU time from dnetc in favor of compiling. Dnetc is running at nice level 20 after all.

ULE scheduler can be tuned via sysctl a bit but i was not able to do any significant improvement
hsn
Junior Member
 
Posts: 25
Joined: 04 Mar 2011, 16:09

Postby fidaj » 25 Sep 2011, 23:04

Which CPU in your system where you done the tests?
fidaj
Junior Member
 
Posts: 49
Joined: 16 Nov 2008, 17:29

Postby hsn » 26 Sep 2011, 07:02

single Intel (in vmware) and dualcore intel on real hw.
hsn
Junior Member
 
Posts: 25
Joined: 04 Mar 2011, 16:09

Postby fidaj » 26 Sep 2011, 07:16

hsn wrote:single Intel (in vmware) and dualcore intel on real hw.


May cause performance degradation when the hyper-threading?
Try to disable hyper-threading and look at the changes ...
Code: Select all
echo "machdep.hyperthreading_allowed=0" >> /boot/loader.conf


At one-core and dual-core processors performance on the ULE scheduler does not suit me too...
I had to use the scheduler for Core2Duo - 4BSD.
fidaj
Junior Member
 
Posts: 49
Joined: 16 Nov 2008, 17:29

Postby hsn » 26 Sep 2011, 07:17

none of them supports HT. Did you tried my how-to repeat test?
hsn
Junior Member
 
Posts: 25
Joined: 04 Mar 2011, 16:09

Postby fidaj » 26 Sep 2011, 07:26

hsn wrote:none of them supports HT. Did you tried my how-to repeat test?


I have a Core2Duo processor - it also does NOT support hyper-threading, but disabling hyper-threading allows the kernel to properly use the topology of my CPU...

I do not repeat your test, but I noticed the same problem with ULE on other tasks running on my laptop...
fidaj
Junior Member
 
Posts: 49
Joined: 16 Nov 2008, 17:29

Postby fidaj » 26 Sep 2011, 08:25

For ULE may have to do more and sysctl kern.sched.steal_htt=0 ...
fidaj
Junior Member
 
Posts: 49
Joined: 16 Nov 2008, 17:29

Postby fidaj » 31 Oct 2011, 11:07

fidaj
Junior Member
 
Posts: 49
Joined: 16 Nov 2008, 17:29

Postby hsn » 31 Oct 2011, 12:40

steal_htt to 0 didn't make any difference.

I will try patch after it will get integrated in v10.
hsn
Junior Member
 
Posts: 25
Joined: 04 Mar 2011, 16:09


Return to FreeBSD Development

Who is online

Users browsing this forum: No registered users and 0 guests