public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Jackson <pj@sgi.com>
To: P@draigBrady.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: IDE and locking
Date: Sun, 22 Feb 2004 01:19:06 -0800	[thread overview]
Message-ID: <20040222011906.43edc7f4.pj@sgi.com> (raw)
In-Reply-To: <4030ACA3.6020009@draigBrady.com>

This doesn't answer your real question, but I can't resist
noticing that the above would be more efficient as:

  find / -type f | xargs wc >/dev/null

Several times fewer system calls, with just a few exec's of 'wc',
instead of exec'ing a 'dd' per file, and with just one read per 16 Kb,
instead of both a read and write per 512 bytes.

Granted - I'm being silly to mention this - your compact flash
device is obviously the bottleneck here.  Doesn't really matter
if the cpu spends 1% or 2% of its time outside the idle loop.


> 4. Is there a max number of files that can be cached by linux?

As long as there is no memory pressure, I suspect it keeps caching
more.

> 5. Will the files be removed at any stage from the cache
>     if there is no memory pressure?

I don't think so - stuff seems to stay in cache 'forever',
if no one else wants the memory.

> 6. Can I reserve memory for the file cache?

Not that I know of.  If it were read-only data, I might try a ram disk,
but your application apparently is read-write.

It might be (long shot, here) that just caching the directories and
inodes was enough, without caching the file contents:

  find / ! -true


-- 
                          I won't rest till it's the best ...
                          Programmer, Linux Scalability
                          Paul Jackson <pj@sgi.com> 1.650.933.1373

      reply	other threads:[~2004-02-22  9:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-16 11:42 IDE and locking P
2004-02-22  9:19 ` Paul Jackson [this message]

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=20040222011906.43edc7f4.pj@sgi.com \
    --to=pj@sgi.com \
    --cc=P@draigBrady.com \
    --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