From: Peter Zaitsev <pz@spylog.ru>
To: Oleg Drokin <green@namesys.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re[2]: MMAP vs READ/WRITE
Date: Thu, 14 Mar 2002 12:27:15 +0300 [thread overview]
Message-ID: <1781804867952.20020314122715@spylog.ru> (raw)
In-Reply-To: <20020313164158.A1219@namesys.com>
In-Reply-To: <861732271654.20020313161718@spylog.ru> <20020313164158.A1219@namesys.com>
Hello Oleg,
Wednesday, March 13, 2002, 4:41:58 PM, you wrote:
OD> Hello!
OD> On Wed, Mar 13, 2002 at 04:17:18PM +0300, Peter Zaitsev wrote:
>> So I would say mmap is not really optimized nowdays in Linux and so
>> read() may be wining in cases it should not. May be read-ahead is
>> used with read and is not used with mmap.
OD> how about reading manual page on madvise(2) and redoing your test?
OK. I did but no luck. The results are quite the same.
I think the hugest problem is:
0 2 0 210736 19472 2000 733188 216 0 5068 2 382 340 4 2 94
0 2 0 210424 20108 1860 729596 219 0 4732 0 319 352 4 1 96
0 2 0 210216 19652 1616 727280 254 0 4718 10 313 298 3 4 93
1 1 0 209756 19988 1744 723940 285 0 4523 14 313 197 6 6 88
0 2 0 209700 20096 1904 722236 223 0 4485 15 307 265 7 5 88
So then file is memory mapped and is read from some pages are coming
out from swap instead of being read from file....
OD> Also cache is best cleaned by unmounting filesystem in question
OD> and then mounting it back.
Well. This was not really needed as I repeated the test several times
in a loop without clearing the cache after initial cleaning to see how
stable are results.
--
Best regards,
Peter mailto:pz@spylog.ru
prev parent reply other threads:[~2002-03-14 9:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-13 13:17 Peter Zaitsev
2002-03-13 13:41 ` Oleg Drokin
2002-03-13 13:58 ` Rik van Riel
2002-03-13 14:48 ` Re[2]: " Peter Zaitsev
2002-03-13 14:58 ` Rik van Riel
2002-03-13 15:17 ` Re[3]: " Peter Zaitsev
2002-03-14 9:27 ` Peter Zaitsev [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=1781804867952.20020314122715@spylog.ru \
--to=pz@spylog.ru \
--cc=green@namesys.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
all inboxes | Powered by JetHome®