Re: Read starvation by sync writes

From: Jan Engelhardt
Date: Tue Dec 11 2012 - 19:13:14 EST



On Monday 2012-12-10 23:12, Jan Kara wrote:
>
> I was looking into IO starvation problems where streaming sync writes (in
>my case from kjournald but DIO would look the same) starve reads. This is
>because reads happen in small chunks and until a request completes we don't
>start reading further (reader reads lots of small files) while writers have
>plenty of big requests to submit. Both processes end up fighting for IO
>requests and writer writes nr_batching 512 KB requests while reader reads
>just one 4 KB request or so.[...]
>Simple reproducer is:
>
>echo 3 >/proc/sys/vm/drop_caches
>dd if=/dev/zero of=/tmp/f bs=1M count=10000 &
>sleep 30
>time cat /etc/* 2>&1 >/dev/null
>killall dd
>rm /tmp/f
>
> The question is how can we fix this?

The ROW scheduler attempts to address it up by prioritizing reads,
and it works out for me.

(Mail info.)
Date: Tue, 11 Dec 2012 14:41:18
From: Tanya Brokhman <tlinder@xxxxxxxxxxxxxx>
Subject: [PATCH v4 0/2] ROW scheduling Algorithm
--
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/