From: Rogier Wolff <R.E.Wolff@BitWizard.nl>
To: linux-kernel@vger.kernel.org
Subject: Caching.
Date: Fri, 6 Aug 2004 12:06:28 +0200 [thread overview]
Message-ID: <20040806100628.GA23325@bitwizard.nl> (raw)
On our server we run:
Linux version 2.4.25-rmap-nonapi (root@obelix) (gcc version 2.95.4
20011002 (Debian prerelease)) #1 SMP Tue Jun 15 13:35:04 CEST 2004
I have this file:
249412 -rw-rw-r-- 2 wolff hdr 1073741824 Aug 5 15:21 disk.img3
which takes some 250Mb on disk, but is 1Gb in size. It's sparse.
When I repeatedly GREP trhough this file, I see large amounts of the
file being reread from disk every time, even though the machine easily
has enough memory to cache the whole 250Mb of diskblocks that the file
compromises.
The server has 1Gb of memory.
To be sure the memory was free, I created a 900Mb application that
would run-and-touch all it's memory. Killing that would leave the
machine with "900Mb free" (actualy just over 908000 kb). Then running
the multiple searches would still page in about half the pages that
should have been cached.
Even when the file on disk only takes about 1Mb of disk space, still
500 of the 1000 kbytes of data on the disk was read every time through
the loop.
My "task at hand" will be done by the time anybody reads this, but
kernel-memory managing could be better, and someone might want to take
a look what's going on.
Roger.
--
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
**** "Linux is like a wigwam - no windows, no gates, apache inside!" ****
reply other threads:[~2004-08-06 10:06 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=20040806100628.GA23325@bitwizard.nl \
--to=r.e.wolff@bitwizard.nl \
--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