linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Justin T. Gibbs" <gibbs@scsiguy.com>
To: Jens Axboe <axboe@suse.de>
Cc: Matthew Jacob <mjacob@feral.com>,
	"Pedro M. Rodrigues" <pmanuel@myrealbox.com>,
	Mathieu Chouquet-Stringer <mathieu@newview.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Warning - running *really* short on DMA buffers while doing file transfers
Date: Fri, 27 Sep 2002 11:19:38 -0600	[thread overview]
Message-ID: <2483176224.1033147178@aslan.btc.adaptec.com> (raw)
In-Reply-To: <20020927143040.GF23468@suse.de>

> If the above is what has been observed in the real world, then there
> would be no problem. Lets say I have 32 tags pending, all writes. Now I
> issue a read. Then I go ahead and through my writes at the drive,
> basically keeping it at 32 tags all the time. When will this read
> complete? The answer is, well it might not within any reasonable time,
> because the drive happily starves the read to get the best write
> throughput.

Just because you use 32 or 4 or 8 or whatever tags you cannot know the
number of commands still in the drive's cache.  Have you disabled
turned off the WCE bit on your drive and retested your latency numbers?

> The size of the dirty cache back log, or whatever you want to call it,
> does not matter _at all_. I don't know why both you and Matt keep
> bringing that point up. The 'back log' is just that, it will be
> processed in due time. If a read comes in, the io scheduler will decide
> it's the most important thing on earth. So I may have 1 gig of dirty
> cache waiting to be flushed to disk, that _does not_ mean that the read
> that now comes in has to wait for the 1 gig to be flushed first.

But it does matter.  If single process can fill the drive's or array's
cache with silly write data as well as have all outstanding tags busy
on its writes, you will incur a significant delay.  No single process
should be allowed to do that.  It doesn't matter that the read becomes
the most important thing on earth to the OS, you can't take back what
you've already issued to the device.  Sorry.  It doesn't work that
way.

> However, I maintain that going beyond any reasonable number of tags for
> a standard drive is *stupid*. The Linux io scheduler gets very good
> performance without any queueing at all. Going from 4 to 64 tags gets
> you very very little increase in performance, if any at all.

Under what benchmarks?  http load?  Squid, News, or mail simulations?
All I've seen are examples crafted to prove your point that I don't
think mirror real world workloads.

>> In all I/O studies that have been performed todate, reads far outnumber
>> writes *unless* you are creating an ISO image on your disk.  In my
>> opinion
> 
> Well it's my experience that it's pretty balanced, at least for my own
> workload. atime updates and compiles etc put a nice load on writes.

These are very differnet than the "benchmark" I've seen used in this
dicussion:

dd if=/dev/zero of=somefile bs=1M &
cat somefile.

Have you actually timed some of your common activities (say a full
build of the Linux kernel w/modules) at different tag depths, with
or without write caching enabled, etc?
 
> If you care to show me this cake, I'd be happy to devour it. I see
> nothing even resembling a solution to this problem in your email, except
> from you above saying I should ignore it and optimize for 'the common'
> concurrent read case.

Take a look inside True64 (I believe there are a few papers about this)
to see how to use command response times to modulate device workload.
FreeBSD has several algorithms in its VM to prevent a single process
from holding onto too many dirty buffers.  FreeBSD, Solaris, True64,
even WindowsNT have effective algorithms for sanely retiring dirty
buffers without saturating the system.  All of these algorithms have
been discussed at length in conference papers.  You just need to go
do a google search.  None of these issues are new and the solutions
are not novel.
 
> It's pointless to argue that tagging is oh so great and always
> outperforms the os io scheduler, and that we should just use 253 tags
> because the drive knwos best, when several examples have shown that this
> is _not the case_.

You are trying to solve these problems at the wrong level.

--
Justin

  reply	other threads:[~2002-09-27 17:14 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-26  3:27 Warning - running *really* short on DMA buffers while doing file transfers Mathieu Chouquet-Stringer
2002-09-26  6:14 ` Jens Axboe
2002-09-26  7:04   ` Pedro M. Rodrigues
2002-09-26 15:31     ` Justin T. Gibbs
2002-09-27  6:13       ` Jens Axboe
2002-09-27  6:33         ` Matthew Jacob
2002-09-27  6:36           ` Jens Axboe
2002-09-27  6:50             ` Matthew Jacob
2002-09-27  6:56               ` Jens Axboe
2002-09-27  7:18                 ` Matthew Jacob
2002-09-27  7:24                   ` Jens Axboe
2002-09-27  7:29                     ` Matthew Jacob
2002-09-27  7:34                       ` Matthew Jacob
2002-09-27  7:45                         ` Jens Axboe
2002-09-27  8:37                           ` Matthew Jacob
2002-09-27 10:25                             ` Jens Axboe
2002-09-27 12:18                               ` Matthew Jacob
2002-09-27 12:54                                 ` Jens Axboe
2002-09-27 13:30                               ` Justin T. Gibbs
2002-09-27 14:26                                 ` James Bottomley
2002-09-27 14:33                                   ` Jens Axboe
2002-09-27 16:26                                   ` Justin T. Gibbs
2002-09-27 17:21                                     ` James Bottomley
2002-09-27 18:56                                       ` Justin T. Gibbs
2002-09-27 19:07                                         ` Warning - running *really* short on DMA buffers while doingfile transfers Andrew Morton
2002-09-27 19:16                                           ` Justin T. Gibbs
2002-09-27 19:36                                             ` Warning - running *really* short on DMA buffers while doingfiletransfers Andrew Morton
2002-09-27 19:52                                               ` Justin T. Gibbs
2002-09-27 21:13                                                 ` James Bottomley
2002-09-27 21:18                                                   ` Matthew Jacob
2002-09-27 21:23                                                     ` James Bottomley
2002-09-27 21:29                                                       ` Justin T. Gibbs
2002-09-27 21:32                                                       ` Matthew Jacob
2002-09-27 22:08                                                       ` Mike Anderson
2002-09-30 23:49                                                       ` Doug Ledford
2002-09-27 21:28                                                   ` Justin T. Gibbs
2002-09-28 15:52                                                     ` James Bottomley
2002-09-28 23:25                                                       ` Luben Tuikov
2002-09-29  2:48                                                         ` James Bottomley
2002-09-30  8:34                                                         ` Jens Axboe
2002-09-29  4:00                                                       ` Justin T. Gibbs
2002-09-29 15:45                                                         ` James Bottomley
2002-09-29 16:49                                                           ` [ getting OT ] " Matthew Jacob
2002-09-30 19:06                                                           ` Luben Tuikov
2002-09-30 23:54                                                     ` Doug Ledford
2002-09-27 19:58                                               ` Andrew Morton
2002-09-27 20:58                                       ` Warning - running *really* short on DMA buffers while doing file transfers Justin T. Gibbs
2002-09-27 21:38                                         ` Patrick Mansfield
2002-09-27 22:08                                           ` Justin T. Gibbs
2002-09-27 22:28                                             ` Patrick Mansfield
2002-09-27 22:48                                               ` Justin T. Gibbs
2002-09-27 18:59                                     ` Warning - running *really* short on DMA buffers while doingfile transfers Andrew Morton
2002-09-27 14:30                                 ` Warning - running *really* short on DMA buffers while doing file transfers Jens Axboe
2002-09-27 17:19                                   ` Justin T. Gibbs [this message]
2002-09-27 18:29                                     ` Rik van Riel
2002-09-27 14:56                                 ` Rik van Riel
2002-09-27 15:34                                 ` Matthew Jacob
2002-09-27 15:37                                   ` Jens Axboe
2002-09-27 17:20                                     ` Justin T. Gibbs
2002-09-27 12:28       ` Pedro M. Rodrigues

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=2483176224.1033147178@aslan.btc.adaptec.com \
    --to=gibbs@scsiguy.com \
    --cc=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mathieu@newview.com \
    --cc=mjacob@feral.com \
    --cc=pmanuel@myrealbox.com \
    /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;
as well as URLs for NNTP newsgroup(s).