Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
CFQ magic!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
venkat
Tux's lil' helper
Tux's lil' helper


Joined: 18 Sep 2003
Posts: 110
Location: USA

PostPosted: Wed Feb 11, 2004 7:33 pm    Post subject: CFQ magic! Reply with quote

Hi guys,

I had a significant improvement in application start-up times once I switched to CFQ scheduler yesterday. Applications started up real quick and the whole UI became very responsive.

I started with an upgrade to KDE 3.2 on a 2.4.23-ck1, looks nice, had some bugs here and there but didn't do much on performance. Enabling transparency on panels and menus looks good but only at the cost of performance.

I switched to 2.6.2-mm1, had few non-fatal errors but everything worked fine. But I didn't notice a performance gain here.

I switched to NPTL, compiling glibc again. Had the /lib/libc.so.6 error that the other threads here mention about. It didn't do any harm though. I noticed xmms, mozilla-firefox loading with once instance instead of usual many. But again, no big performance boost here.

I read about scheduler options somewhere here and looked for what scheduler I was using from dmesg. Looked like I used anticipatory. I inserted the kernel parameter elevator=cfq and rebooted the box.

Just couldn't believe my eyes, things started responding so fast. I saw some significant improvement in oofice startup times. Everything loads fast and clean!

I haven't noticed a crash untill now! Let's see. Now I wonder, is it just CFQ or the combined effect of 2.6.2+NPTL+KDE-3.2???

Have fun!
Back to top
View user's profile Send private message
Moled
l33t
l33t


Joined: 09 Jul 2003
Posts: 635

PostPosted: Wed Feb 11, 2004 8:50 pm    Post subject: Re: CFQ magic! Reply with quote

venkat wrote:
I switched to NPTL, compiling glibc again. Had the /lib/libc.so.6 error that the other threads here mention about.



this is fixed in the latest version

I ought to give cfq a go
Back to top
View user's profile Send private message
venkat
Tux's lil' helper
Tux's lil' helper


Joined: 18 Sep 2003
Posts: 110
Location: USA

PostPosted: Thu Feb 12, 2004 7:02 pm    Post subject: Reply with quote

I think by latest version you mean from the ~x86 branch? I have latest stable version of glibc. It is still there.

But this whole thing rocks, I was compiling QT yesterday with 100% CPU load, the whole damn system was as responsive as there was nothing going on in the background!

I gotta fine tune the system now to make it more stable and to remove unwanted/unused packages.
Back to top
View user's profile Send private message
pranyi
Apprentice
Apprentice


Joined: 06 Mar 2003
Posts: 293
Location: Germany

PostPosted: Fri Feb 13, 2004 9:45 pm    Post subject: Reply with quote

I see significant performance improvement in KDE 3.2 without changing away from the anticipatory scheduler.
Back to top
View user's profile Send private message
IvanHoe
l33t
l33t


Joined: 05 Oct 2002
Posts: 658

PostPosted: Fri Feb 13, 2004 9:52 pm    Post subject: Reply with quote

Can anybody explain the fundamental differences between anticipatory and CFQ?
Back to top
View user's profile Send private message
Spawn of Lovechild
Apprentice
Apprentice


Joined: 03 Feb 2004
Posts: 253
Location: Århus, Denmark

PostPosted: Fri Feb 13, 2004 10:17 pm    Post subject: Reply with quote

with CFQ you create a runqueue for every process (user, or what ever you want to schedule fairly between - default to processes) and add the processes request of IO access to the runqueue - then you round robin between them.
Thus every runqueue has equal access to IO read and write.

With AS the basic idea is to wait a tiny bit after each read operation, so if a process requests data again it will get it at once rather than waiting - the boon is that the program gets it's data without having to wait however if the program doesn't read again the wait period is wasted and add to the latency between request and completion. Write requests are just executed since those normally go directly to the harddisks hardware since that takes care of writing once the disk is idle.
Thus every process has timelimited priority access to Read IO and unlimited write access.

In theory AS should be faster but as it turns out it's extremely hard to predict when to wait and when not to.

CFQ has certain server uses, when you want to limit IO to user groups fx. it's mighty smart technology
_________________
Proud to be a 22 year old Infidel, GNOME lover and member of LIK.
Back to top
View user's profile Send private message
feffi
Apprentice
Apprentice


Joined: 29 Mar 2003
Posts: 216
Location: Sol->Earth->Germany->Giessen

PostPosted: Fri Feb 13, 2004 11:38 pm    Post subject: AS CQF or NOOP Reply with quote

Hi guys,
i definetly can confirm that the system is more responsive with any elevator orther than the default anticipatory scheduler. I try NOOP at the moment (which is not really a scheduler, is does merely nothing to schedule) and will give CFQ a try later...
_________________
have fun

feffi

/(bb|[^b]{2})/ that is the Question!

Gentoo-Wiki: Acer Travelmate 803 LCi manual
Back to top
View user's profile Send private message
IvanHoe
l33t
l33t


Joined: 05 Oct 2002
Posts: 658

PostPosted: Wed Feb 18, 2004 12:47 am    Post subject: Reply with quote

Thanks for the info, Spawn of Lovechild.
:)
Back to top
View user's profile Send private message
castorilo
Apprentice
Apprentice


Joined: 25 Dec 2002
Posts: 157

PostPosted: Wed Feb 18, 2004 2:27 am    Post subject: I'll second that Reply with quote

Kde 3.2 was an improvement. However, this was a quantum leap. This made the system incredibly responsive.

Thanks for the tip.
Back to top
View user's profile Send private message
m0sk
n00b
n00b


Joined: 18 Apr 2003
Posts: 39
Location: Belgium

PostPosted: Wed Feb 18, 2004 5:34 am    Post subject: Reply with quote

Seems I might give the CFQ scheduler a try. I have been running 2.6.1-mm5 with anticipatory scheduler for about a month, and to me my system has been incredibly responsive. Now that the whole slew of Kde/X/Qt/Firefox/Thunderbird/... updates is finally done here on my humble pIII-500, it's time again to start playing with new kernels ;)

Does CFQ only come with mm/ck patchsets, or is it available too in vanilla 2.6.x?

Btw, 2.6.3 was released today, final 2.6.3-mm series should be in Portage in a few days I suppose. Yay!
_________________
panic ("No CPUs found. System halted.\n");
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 2766
Location: Gainesville, Florida

PostPosted: Wed Feb 18, 2004 11:50 pm    Post subject: Reply with quote

I too can confirm switching to the CFQ scheduler has resulted in very noticable improvement. It's like I overclocked my 1700Mhz cpu by an extra 1000Mhz, and went to PC3200 DDR memory on a 400Mhz FSB motherboard. I just did 2.6.3-mm1, with CFQ=y, and it's really the best kernel I've used so far- and I've tested all the versions since 2.5.67, including all mm and ck patches.

Of course this is just how it works on my system, so as usual, YMMV, but I'm not exagerating here- it really does make a difference.

wrc1944
_________________
Main box- Gigabyte GIGABYTE GA-990FXA-UD3 AM3+ rev.-4.0
Amd FX 8320, 3.5 GHz, 16GB GSkill DDR3 1866mhz
Samsung SATA 1000GB, Radeon HD 6570 2GB DDR3
Gentoo ~x86, ~amd64, glibc-2.19, gcc-4.9.0, kernel 3.16.1-gentoo (USE=experimental "native")
Back to top
View user's profile Send private message
pranyi
Apprentice
Apprentice


Joined: 06 Mar 2003
Posts: 293
Location: Germany

PostPosted: Thu Feb 19, 2004 12:09 pm    Post subject: Reply with quote

Is CFQ included in the vanilla 2.6.0 kernel?
Back to top
View user's profile Send private message
NecroticFlower
n00b
n00b


Joined: 30 Jan 2004
Posts: 31
Location: Atlanta

PostPosted: Thu Feb 19, 2004 1:40 pm    Post subject: Reply with quote

it is my experience that with CFQ the system slows down and/or becomes unresponsive under heavy load. i have switched back to anticipatory scheduler and my machine runs better then it did with CFQ.
_________________
Pimped out
http://pimpress.com
Registered Linux User #346075 http://counter.li.org/
Back to top
View user's profile Send private message
Epyon
l33t
l33t


Joined: 11 Sep 2003
Posts: 754
Location: NJ, USA

PostPosted: Thu Feb 19, 2004 2:17 pm    Post subject: Reply with quote

Yeah under heavy load cfq gets kind of slow but under normal conditions it seems faster than anticipatory
Back to top
View user's profile Send private message
gurke
Apprentice
Apprentice


Joined: 10 Jul 2003
Posts: 260

PostPosted: Thu Feb 19, 2004 3:44 pm    Post subject: Reply with quote

always heavy load over here (this is gentoo), so no cfq. :wink:
Back to top
View user's profile Send private message
Crg
Guru
Guru


Joined: 29 May 2002
Posts: 345
Location: London

PostPosted: Thu Feb 19, 2004 6:47 pm    Post subject: Re: CFQ magic! Reply with quote

venkat wrote:
I switched to NPTL, compiling glibc again. Had the /lib/libc.so.6 error that the other threads here mention about. It didn't do any harm though. I noticed xmms, mozilla-firefox loading with once instance instead of usual many. But again, no big performance boost here.

That is just because of the different way the threads are implemented, each thread showed up as a process with LinuxThreads but with NPTL it doesn't show each thread - this isn't anything to do with how many instances are running.
Back to top
View user's profile Send private message
venkat
Tux's lil' helper
Tux's lil' helper


Joined: 18 Sep 2003
Posts: 110
Location: USA

PostPosted: Sat Feb 21, 2004 9:21 pm    Post subject: Reply with quote

with respect to heavy loads, i was recompiling my whole system (with -j2) with kernel compiling on another console. i still was able to load openoffice reasonably faster and NOTHING changed with respect to responsiveness. i started loving this so much that i am logging into this unstable system (~x86 glibc, kde 3.2, 2.6-mm kernels etc.) more often than my stable 2.4 based partition.
Back to top
View user's profile Send private message
venkat
Tux's lil' helper
Tux's lil' helper


Joined: 18 Sep 2003
Posts: 110
Location: USA

PostPosted: Sat Feb 21, 2004 9:29 pm    Post subject: Re: CFQ magic! Reply with quote

Crg wrote:
That is just because of the different way the threads are implemented, each thread showed up as a process with LinuxThreads but with NPTL it doesn't show each thread - this isn't anything to do with how many instances are running.


thx for the clarification Crg, i understood the concept before, but just wanted to emphasize the fact that though i had that error with libc the system was using nptl (that reflects in the thread handling) :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum