mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Q: I/O to block devices
@ 2006-10-09 11:39 Ulrich Windl
  2006-10-12  1:08 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: Ulrich Windl @ 2006-10-09 11:39 UTC (permalink / raw)
  To: linux-kernel

Hello!

I'm surprised: To my knowledge I/O to block devices is synchronous (at least write 
I thought), but:

Trying to sort my Compact Flash cards according to speed I did these tests:
1. Plug in card
2. dd if=/dev/sda of=disk_file
3. Record numbers printed for reading the card (they roughly correspond to those 
of "hdparm -t")
4. dd of=/dev/sda if=disk_file
5. Record the numbers printed for write speed

At that time I realized that write was terribly fast; way too fast. When unpluggin 
the card, replugging the card, and redoing step 4. and 5., the speed was as 
expected.

Now the first big question: Does the Linux kernel suppress writes if it knows the 
data are already on the block device? That seems to be the only possible 
explanation for that.

Then we all know that sync writes suddenly became very slow in the near past. When 
using "oflag=dsync" for the dd command in step 4., the data rate was as low as 
22kB/s (!!!). I would expect unbuffered writes with a speed of at least 500kB/s.
Now the second big question: Where did I/O speed go?

If some kind sould would answer, or point me to an answer, that would be very much 
appreciated (Please CC: to me, I'm not subscribed here).

The system used for testing was SuSE Linux 10.1 with a built-in USB 2.0 card 
reader, and the rest of the system is definitely not the reason for this type of 
slowdown.

Regards,
Ulrich


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-10-12  1:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-09 11:39 Q: I/O to block devices Ulrich Windl
2006-10-12  1:08 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®