LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-23-2008, 04:23 PM   #1
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
IO Schedulers, strangeness


Today I ripped some of my old CDs so I could remix them and burn them again, and while trying to play the '.wav' files I noticed that I got a lot of skipping. First thing I thought was damn, my CDs have been scathed beyond repair ... want to cry . Then I thought ... hmm, but wait they can't be, I looked at the CDs and there was hardly a scratch an any of them ... hmmmm. So, I thought and thought, and then just at random I decided to change my IO scheduler ... it happened to be on CFQ, I forgot that I changed it from deadline to CFQ just to test it some time ago. So after I changed the IO scheduler and tried playing the music again, the skipping disappeared ! I thought, damn the IO scheduler can't be that important, can it ? Can it do this ? So, I tried more of the music clips, they played perfectly with deadline, then I switched to CFQ and the stuttering/skipping was back, I tried more and more, and the same results. Restart the computer, try again ... same result. Does CFQ just suck in this particular case ?

I know I've seen benchmarks like these:
http://www.redhat.com/magazine/008ju...es/schedulers/

They say CFQ is best (notably with deadline in 2nd place).

So, has anyone else had these kind of issues, or are there any suggestions for why this might happen. Also, note that my filesystem is JFS, if it makes too much of a difference.
 
Old 03-23-2008, 04:55 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,129

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Benchmarks relevance is heavily dependant on workload.
You can set the scheduler per device, BTW.
 
Old 03-24-2008, 01:06 AM   #3
iiv
Member
 
Registered: Jun 2007
Location: Russia, Moscow Region
Distribution: Slackware
Posts: 167

Rep: Reputation: 30
When I switch on two output devices in MPD, one of them starts to collect gaps in playback(however the other does not), could it be connected with IO scheduler?

And are there any ways of switching it 'on the fly'? I personally know the one way: to edit config and recompile the kernel.
 
Old 03-24-2008, 08:56 AM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Quote:
Originally Posted by iiv View Post
And are there any ways of switching it 'on the fly'? I personally know the one way: to edit config and recompile the kernel.
That's not necessary, you can switch it on the fly by first running:
Code:
cat /sys/block/hda/queue/scheduler
It will show something like:
Code:
noop [deadline] cfq
So, to change it do:
Code:
echo cfq > /sys/block/hda/queue/scheduler
Then run cat again and it should say:
Code:
noop deadline [cfq]
So the one in [brackets] is the one that is currently active. Also, note that I used 'hda' in this example, you can use this for other devices that support it, you might not even have 'hda'.

As for the workload, I was not running anything else at the time, I had FF up in the background and that's it. Also, note that I was running the wavs off the hard drive not the CD drive, I ripped them. I tried increasing the workload by doing other things while playing the music, this seemed not to affect anything while using deadline, but may have affected it some with cfq in that the skipping may have increased some, although not too noticeably, can't be sure of cause and effect here. I mean if it's skipping kinda randomly with cfq, how can you tell if your activity has an effect on it ? Either way it was doing this regardless of disk usage by other processes, whether none or some.

Last edited by H_TeXMeX_H; 03-24-2008 at 09:01 AM.
 
Old 03-24-2008, 04:39 PM   #5
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
Well CFQ was only just implemented into the kernel. this could be a bug.

you should prob file a bug report to lkml or something.
 
Old 03-24-2008, 04:54 PM   #6
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Well, I guess it could be a bug, but it's more like a performance issue than a bug I say. I'll have to test this on some other machines to see if it happens there too. Maybe it's just this particular machine. If anyone else has experienced this, please say so, that way I can be more confident in whatever bug report I might file. I'll also search around a bit before I file it.
 
Old 03-27-2008, 05:46 AM   #7
samwise17
Member
 
Registered: Jul 2007
Location: Sydney
Distribution: Arch,Slackware,Puppy
Posts: 87

Rep: Reputation: 15
I had a similar problem when watching DVD's. They were skipping badly enough to be unwatchable. The problem was that my SCSI disk drive was using IDE emulation, as the IDE cdrom drivers captured the device before the libata ones. I fixed it by adding 'combined_mode=libata' to the kernel boot line in grub. (Later on I recompiled the kernel without the IDE drivers). Just something to check, as it really wasn't obvious at all to me and I spent many fustrated hours blaming MPlayer. Not really sure how the IO schedulers would affect this though.

Last edited by samwise17; 03-27-2008 at 05:47 AM.
 
Old 03-27-2008, 09:41 AM   #8
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Sorry, I didn't mention my hardware, the HDD is just a regular IDE/ATA drive.

Some info from smartctl:
Code:
Model Family:     HITACHI Travelstar DK23XX/DK23XXB series
Device Model:     HITACHI_DK23EA-60
...
User Capacity:    60,011,642,880 bytes
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   5
ATA Standard is:  ATA/ATAPI-5 T13 1321D revision 3
If you need more info, just say what I should post.
 
Old 03-29-2008, 04:37 AM   #9
iiv
Member
 
Registered: Jun 2007
Location: Russia, Moscow Region
Distribution: Slackware
Posts: 167

Rep: Reputation: 30
Deadline seems to work much smoother. The system is more responsive when copying large files with deadline than cfq scheduler.

p.s. ide hdd
 
Old 03-29-2008, 05:42 AM   #10
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Quote:
Originally Posted by iiv View Post
Deadline seems to work much smoother. The system is more responsive when copying large files with deadline than cfq scheduler.

p.s. ide hdd
What filesystem is this on ? Just so I know if the filesystem I use has anything to do with it.
 
Old 03-29-2008, 11:16 AM   #11
iiv
Member
 
Registered: Jun 2007
Location: Russia, Moscow Region
Distribution: Slackware
Posts: 167

Rep: Reputation: 30
It is LUKS-encrypted LVM with JFS inside.
 
Old 03-29-2008, 01:07 PM   #12
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928

Original Poster
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Ok, well I also use JFS, so it doesn't rule it out.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Disabling I/O schedulers pennyg_8 Linux - Newbie 4 03-20-2008 02:36 PM
schedulers anjana Programming 1 05-29-2007 06:55 AM
new schedulers in linux anjana Programming 1 05-28-2007 11:00 AM
LXer: Linux: Comparing New CPU Schedulers LXer Syndicated Linux News 0 04-22-2007 03:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration