Re: Very poor latency when using hard drive (raid1)

From: Mike Galbraith
Date: Tue Apr 16 2013 - 03:24:21 EST


On Tue, 2013-04-16 at 08:49 +0200, lkml@xxxxxxxxxxx wrote:
> On 15/04/13 11:59, lkml@xxxxxxxxxxx wrote:
> > There are 2 hard drives (normal, magnetic) in software raid 1
> > on 3.2.41 kernel.
> >
> > When I write into them e.g. using dd from /dev/zero to a local file
> > (ext4 on default settings), running 2 dd at once (writing two files) it
> > starves all other programs that try to use the disk.
> >
> > Running ls on any directory on same disk (same fs btw), takes over half
> > minute to execute, same for any other disk touching action.
> >
> > Did anyone seen such problem, where too look, what to test?
> >
> > What could solve it (other then ionice on applications that I expect to
> > use hard drive)?
>
> I got reply (by e-mail) suggesting to use XFS.
> Thanks, possible for other/next server.
>
> But I fell this should work correctly as well on ext4.

It should not starve readers that badly, something is wrong.

You can try setting low_latency for the devices if you're using CFQ
ioscheduler. For my box, that would be..

echo 1 > /sys/devices/pci0000:00/0000:00:1f.2/ata2/host0/target0:0:0/0:0:0:0/block/sda/queue/iosched/low_latency

Or, you can try a different scheduler. cat (blabla)/sda/queue/scheduler
to see which choices are available, and echo your choice back to the
file to select it.

-Mike

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/