Re: little cp diff

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ted Unangst
Date: Saturday, February 6, 2010 - 10:58 am

On Sat, Feb 6, 2010 at 9:53 AM, Otto Moerbeek <otto@drijf.net> wrote:

How?  cp reads 64k.  How much extra should the kernel read ahead?  How
is this determined?  What if you're only reading a small part of a
file?

cp writes 64k.  How does the buffer cache optimize that into a larger
write if cp hasn't even read the data yet?  Does it hide the write on
a secret "to be continued" queue?  How long does it stay there?  What
if you're only writing to a part of the file?

We're already seeing problems just making the buffer cache bigger.
You think adding the complexity to optimize access patterns is going
to make things better?  cp at least has a very good idea of exactly
what data it's going to need next.  Putting heuristics in the kernel
is exactly the wrong approach.


What resources?  It uses a small fraction of your RAM.  If a 4 gig
machine can't spare a couple megs for a file copy, you're in trouble.
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
little cp diff, Ted Unangst, (Fri Feb 5, 7:24 pm)
Re: little cp diff, Otto Moerbeek, (Sat Feb 6, 5:32 am)
Re: little cp diff, Mark Kettenis, (Sat Feb 6, 6:44 am)
Re: little cp diff, Ted Unangst, (Sat Feb 6, 7:14 am)
Re: little cp diff, Otto Moerbeek, (Sat Feb 6, 7:53 am)
Re: little cp diff, Vadim Zhukov, (Sat Feb 6, 8:27 am)
Re: little cp diff, Bob Beck, (Sat Feb 6, 9:45 am)
Re: little cp diff, Ted Unangst, (Sat Feb 6, 10:58 am)
Re: little cp diff, Bob Beck, (Sat Feb 6, 11:32 am)
Re: little cp diff, Otto Moerbeek, (Sat Feb 6, 11:35 am)
Re: little cp diff, Claus Assmann, (Sat Feb 6, 11:37 am)
Re: little cp diff, Claudio Jeker, (Sat Feb 6, 11:42 am)
Re: little cp diff, Bob Beck, (Sat Feb 6, 11:45 am)
Re: little cp diff, Bob Beck, (Sat Feb 6, 11:49 am)
Re: little cp diff, Ted Unangst, (Sat Feb 6, 8:42 pm)