SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 ?
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.
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.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.