You are not logged in.
Hi,
For years, I have been amazed at how unresponsive Linux can be when my disk(s) are active and I decided to inquire about it now. In the olden days (Pentium 120), I could play Quake while burning a CD on a 2X burner (without BurnFree...). That's something Windows couldn't do at the time. But now, windows is a lot more responsive when the disk is active.
Whenever I do something disk intensive (like currently doing 'dd if=/dev/urandom of=junk bs=10M' to a USB disk to erase unused sectors), all other programs become super unresponsive. I have to wait several minutes before programs respond to clicks. It's getting very annoying. A few days ago, I was running Photorec (data recovery tool) on a disk image, with the same result.
This is not a matter of turning DMA on, or whatever (I'm not a complete noob). Disk throughput when syncing my RAID array is easily 80 MB/s. And, they're SATA disks:
# hdparm -t /dev/sda
/dev/sda:
Timing buffered disk reads: 286 MB in 3.01 seconds = 95.17 MB/sec
I've had this with Gentoo which I used for years, and now with Arch. I've had it with single disk systems, RAID systems and different disks.
All disks are set to CFQ scheduling:
# RAID component
cat /sys/block/sda/queue/scheduler
noop deadline [cfq]
# RAID component
cat /sys/block/sdb/queue/scheduler
noop deadline [cfq]
# The USB disk
cat /sys/block/sdc/queue/scheduler
noop deadline [cfq]
The write-intensive write-intent-bitmap is not active on the array:
# cat /dev/mdstat:
Personalities : [raid1]
md1 : active raid1 sda2[0] sdb2[1]
1464969720 blocks super 1.0 [2/2] [UU]
md0 : active raid1 sda1[0] sdb1[1]
156788 blocks super 1.0 [2/2] [UU]
unused devices: <none>
I've been hearing about discussing about kernel disk schedulers. Some people say the Linux disk scheduling is very much tailored to servers and that any interactive scheduler can't be benchmarked and because it can't be proven to be faster, is rejected from the kernel. This supposedly frustrates some kernel developers.
Can anybody help me out here?
Offline
ja soms word je er "halfgaar" van ja..... groetjes
Offline
Have you tried using 'ionice'?
Offline
gregor, what's with the non-English post. Also its off-topic. Please refrain from posting if you cannot remain on topic.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
See previous stuff regarding BFS, schedtool and ionice.
Your command should begin with:
ionice -c3 schedtool -D -e
Then, with BFS, you'll hardly know it's running.
Offline
Are you running i686 or x86_64? It seems that it is usually 64-bit users who complain about such things. I have personally always found Linux distros to run smoother than Windowses, but I avoid 64 bits.
You can try with kernel26-pf, which has the BFS cpu scheduler, mentioned by brebs, and an alternate io scheduler, which might also help.
Offline
alternate io scheduler
No, stick with CFS, which supports the ionice command.
Offline
If BFQ (the alternate io scheduler) doesn't support ionice, then you have to compile your own kernel with BFS, halfgaar, because precompiled kernel26-pf packages have only BFQ.
-edit-
BFQ seems to be supporting ionice.
Last edited by lucke (2011-06-22 23:01:45)
Offline
First, my system is 64 bit, but I had the same on my 32 bit Gentoo.
And about the scheduler; isn't it odd that I have to use a patched kernel and start commands with ionice? I don't really want to use a non-standard kernel. And I experience this slowness as well when some program suddenly decides to access the disk. I can't be ionicning all the time.
I also don't understand the reasoning why one program can hog the disk for minutes at a time? Is this desired behavior? I would think that a normal system, and especially when I use CFQ as disk scheduler (which means completely fair queue...), resources are distributed equally. I mean, people would find it outrageous if a process that consumes 100% CPU would block the entire system, and justly. I'm glad it doesn't. It slows things down, but programs still respond quickly.
BTW, BFS is a CPU scheduler right? How will it improve disk performance.
Anyway, I will be giving kernel26-pf a try. If it improves performance, I would be very happy, but I would also be very confused that mainline wants to keep the kernel unresponsive...
Offline
I can't be ionicning all the time.
Of course you can. It's nowhere near as big a problem as you seem to think. Set up your ~/.bashrc
alias audacious="ionice -c2 /usr/bin/audacious"
alias transmission="ionice -c3 schedtool -D -e /usr/bin/transmission-gtk"
alias pidgin="nice /usr/bin/pidgin"
alias liferea="ionice -c3 nice /usr/bin/liferea"
alias skype="nice /usr/bin/skype"
alias ekiga="nice /usr/bin/ekiga"
alias xchat="ionice -c3 nice /usr/bin/xchat"
alias dropboxd="ionice -c3 schedtool -D -e /usr/bin/dropboxd"
alias gtk-gnutella="ionice -c3 schedtool -D -e /usr/bin/gtk-gnutella"
alias verynice="ionice -c3 schedtool -D -e "
Notice that "verynice" - if you want a program to work in the background, start it with prefixed with "verynice" - not difficult.
We're trying to help you, but we are not kernel devs. If you're experiencing a bug in the kernel (quite likely, they screw things up all the time), use https://bugzilla.kernel.org/
BFS is a CPU scheduler right? How will it improve disk performance.
The CPU scheduler is absolutely critical for everything else to work smoothly and quickly.
Sticking to the vanilla kernel is hardly the only strategy. Major distros patch the heck out of the vanilla kernel.
Offline