You are not logged in.

#1 2012-01-26 16:25:47

gothicknight
Member
From: Portugal
Registered: 2006-04-08
Posts: 219

Poor CFS performance since 3.x kernels

Hi to all,


Some time ago I started getting the impression that my system was getting more and more unresponsive.

At first I though  it was just an impression when something that I haven't seen in a long time happened: I was compiling something at work (I'm a software dev) while listening to some music when, all of the sudden, the audio starts to hick.

Again at first I thought it might be a disk read starvation problem and ignored the problem once more.

Further kernel releases only made this worse to the point that I today compiled linux-bfs and give it another try, that to my surprise, made all my problems go away.

Is anyone else experiencing this kind of latency problems?

Offline

#2 2012-01-26 16:45:22

Grinch
Member
Registered: 2010-11-07
Posts: 265

Re: Poor CFS performance since 3.x kernels

Well alot of people (me included) have had stuttering when copying large files etc and that's a well know problem but I haven't noticed it getting worse in any way, in fact I feel that it's gotten better in kernel 3.2 but that may just be a placebo effect. And yes, I've had a Linux bfs-bfq alternate kernel before and there was a very noticeable difference, and if you find the stuttering really annoying then that is a good solution.

Offline

#3 2012-01-26 17:19:21

hadrons123
Member
From: chennai
Registered: 2011-10-07
Posts: 1,249

Re: Poor CFS performance since 3.x kernels

I am feeling the quite opposite.My copy speeds have increased since 3.2 upgrade, by a significant difference.

Offline

#4 2012-01-26 20:46:00

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

Re: Poor CFS performance since 3.x kernels

# echo madvise > /sys/kernel/mm/transparent_hugepage/enabled # https://bbs.archlinux.org/viewtopic.php?id=112846

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

Offline

#5 2012-01-27 09:07:53

gothicknight
Member
From: Portugal
Registered: 2006-04-08
Posts: 219

Re: Poor CFS performance since 3.x kernels

My issue isn't with data I/O starvation, but with CPU intensive tasks clogging "real time" tasks such as amarok playing something.

I do a lot of compiling over the day while listening. And it got overly difficult to do just that with the newer releases.

PS. I just upgraded to 3.2.2 I'll reboot into it in and retest...

Offline

#6 2012-01-27 10:18:38

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

Re: Poor CFS performance since 3.x kernels

Have you tried a bfs patched kernel suck as Linux-ck?


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

Offline

#7 2012-01-27 10:35:08

gothicknight
Member
From: Portugal
Registered: 2006-04-08
Posts: 219

Re: Poor CFS performance since 3.x kernels

graysky wrote:

Have you tried a bfs patched kernel suck as Linux-ck?

Yes yesterday, before posting this thread. And the results were noticeable, for example at:
  1) Music didn't glitched when compiling;
  2) Netbeans menus were keeping pace with mouse hovering over them;

I'm currently compiling the latest linux-bfs update (using arch's stock kernel) and amarok is once again glitching with an average of 3x~4x per song.

Offline

#8 2012-01-27 11:06:29

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

Re: Poor CFS performance since 3.x kernels

Interesting... Under 3.1 or 3.0?


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

Offline

#9 2012-01-27 11:48:12

gothicknight
Member
From: Portugal
Registered: 2006-04-08
Posts: 219

Re: Poor CFS performance since 3.x kernels

Using up to date arch stock kernel.

Linux Zeferino 3.2.2-1-ARCH #1 SMP PREEMPT Thu Jan 26 08:40:20 CET 2012 x86_64 Intel(R) Core(TM)2 Duo CPU T8100 @ 2.10GHz GenuineIntel GNU/Linux

Offline

#10 2012-01-27 11:56:14

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

Re: Poor CFS performance since 3.x kernels

No, I mean did 3.0 or 3.1 NOT do this?


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

Offline

#11 2012-01-27 12:58:00

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Poor CFS performance since 3.x kernels

gothicknight wrote:

Is anyone else experiencing this kind of latency problems?

I expect everyone is. They just assume it's normal.

Just using a better scheduler is not the final answer.

You should set the priority (both CPU and I/O) for music higher, and for compilations lower. Like I do.

Offline

#12 2012-01-27 13:23:56

gothicknight
Member
From: Portugal
Registered: 2006-04-08
Posts: 219

Re: Poor CFS performance since 3.x kernels

Hi brebs, thanks for the links and I will look into those forum tips.

I have a small perception on the scheduler "war" between CK vs Molnar schedulers, and there was a time where I've noticed BFS wasn't bringing anything new against CFS. And so I've rollback to arch's stock kernel.

Now, back to my problem, with BFS patched kernel I don't have to set anything. It just works. I can have two "make -j2" that amarok doesn't glitch, and still maintain a good latency level in the KDE/chromium/...

I will test the ionice since my work laptop has a quite slow hard drive and it may help in some cases where I'm copying something and keep getting read starvation almost making the system unusable.

Offline

#13 2012-01-27 13:33:42

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Poor CFS performance since 3.x kernels

gothicknight wrote:

back to my problem

File a kernel bug wink

They'll probably tell you to set up cgroups.

Offline

#14 2012-01-27 13:35:08

gothicknight
Member
From: Portugal
Registered: 2006-04-08
Posts: 219

Re: Poor CFS performance since 3.x kernels

Exactly... "my problem", that's why I'm querying the forum for similar experiences. Otherwise is just my problem :\

Offline

#15 2012-01-27 13:46:31

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Poor CFS performance since 3.x kernels

gothicknight wrote:

querying the forum for similar experiences. Otherwise is just my problem :\

Of course it's not just you. Would a bunch of "me too"s make you happy? You're asking the question wrongly - just use the search button better, to see other people with similar moans.

This problem is *inevitable*, even with BFS, when people don't use nice & ionice properly, if their system load is sufficiently high.

So, use nice & ionice properly, and the problem is solved, regardless of occasional scheduler tweaks.

Offline

#16 2012-01-27 22:31:34

defears
Member
Registered: 2010-07-26
Posts: 218

Re: Poor CFS performance since 3.x kernels

Try this and do some heavy loads.

sudo renice -n -2 -u $USER

To make it permanant, add this to /etc/security/limits.conf

username - priority -2

This one line has made more of an impact than all these for me.
kernel-ck
kernel-pf
ionice
verynice
deadline
noop

For a desktop, I think this is the way it should be. User apps should have a bit higher priority than roots. I want firefox to be more respnsive than avahi, updatedb, cron jobs, or any type of transfer. It even helps with gnome-shell's menu startup.

Offline

Board footer

Powered by FluxBB