mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Moritz Franosch <jfranosc@physik.tu-muenchen.de>
To: linux-kernel@vger.kernel.org
Subject: performance bug in 2.4.18-rc1: writing to MO/DVD-RAM blocks reading from HDD
Date: 14 Feb 2002 22:02:11 +0100	[thread overview]
Message-ID: <rxxsn83rd4c.fsf@synapse.t30.physik.tu-muenchen.de> (raw)


Hello,

I don't know which subsystem of the kernel is broken, so I report this
performance bug of kernels 2.4.x here.

Copying a large file from HDD to MO makes a concurrent read from HDD
very very slow. This is my "benchmark":


#!/bin/bash
mount /mod
time dd if=/dev/hda of=/dev/null bs=1000000 count=100
cp /somewhere/very_large_file /mod & 
CPPID=$!
sleep 20
time dd if=/dev/hda of=/dev/null bs=1000000 count=100
kill $!


It first copies 100 MB from HDD to /dev/null and measures the elapsed
time. Then it copies the same 100 MB from HDD to /dev/null while a
very large (larger than there is space on the MO) file is copied from
HDD to the MO drive. Copying that very large file effectively blocks
reading the 100 MB, as you can see from the output (kernel 2.4.17):


100+0 records in
100+0 records out

real	0m10.117s
user	0m0.000s
sys	0m2.670s

100+0 records in
100+0 records out

real	1m21.802s
user	0m0.020s
sys	0m2.800s


Reading 100 MB during a large file is written to MO takes eight times
longer as reading without concurrently accessing the MO. I'd expect
the second read to take not much longer (at most twice as long) as the
first because the MO is very slow (2 MB/s or so). I consider this to
be a performance bug.

Here is a list of kernel versions I tried and benchmark results:

Kernel     HDD HDD+MO
2.4.6      10  81
2.4.17     10  82
2.4.18-rc1  9  56
2.5.5-pre1  9  11

HDD    = first real time in seconds (HDD read time only)
HDD+MO = second real time in seconds (HDD read time while writing to MO)

As you can see from the numbers, the bug is not present in kernel
2.5.5-pre1. (I had to compile with different compile options to get it
to compile though.)

The bug also does not show up when I do 'dd if=/dev/zero of=/mod/tmp
&' instead of the 'cp /somewhere/very_large_file /mod &'. Also,
reading from MO ('cp /mod/very_large_file &> /dev/null' or 'cp
/mod/very_large_file /somewhere') while reading from HDD does not do
any harm.

The system I used is a Pentium Pro 200 MHz with a Fujitsu SCSI 640 MB
MO drive, a single IDE HDD and 128 MB RAM. But the bug also shows up
when using an Athlon 700 MHz with a Toshiba ATAPI 4.7 GB DVD-RAM
drive, a single IDE HDD and 256 MB RAM (kernel 2.4.13, 2.4.17, I've
not yet tried 2.5.x on this system).


What is the reason for this obvious misbehaviour?

Can the performance of 2.5.5-pre1 be somehow backported to 2.4.x?


Thank you in advance,

Moritz

                 reply	other threads:[~2002-02-14 21:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=rxxsn83rd4c.fsf@synapse.t30.physik.tu-muenchen.de \
    --to=jfranosc@physik.tu-muenchen.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®