9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "ron minnich" <rminnich@gmail.com>
To: "Fans of the OS Plan 9 from Bell Labs" <9fans@9fans.net>
Subject: Re: [9fans] 8 cores
Date: Thu, 17 Jul 2008 05:55:00 -0700	[thread overview]
Message-ID: <13426df10807170555s746fa829p130970922058f692@mail.gmail.com> (raw)
In-Reply-To: <2125ed224c77c85fc13d81eb95377a2a@terzarima.net>

On Thu, Jul 17, 2008 at 2:07 AM, Charles Forsyth <forsyth@terzarima.net> wrote:
>> I could imagine that databases use mmap() havily
>
> it's a little mystery for me why they would do that since it's slower


Well, depends. Non-mmap you have to do the storage management in the
app. mmap, you're using the storage management in the kernel to figure
out where the data goes, as well as all the LRU stuff to figure out
what happens when you're running out of memory and you need to get rid
of some of it.. Most kernels do a better job than most people at this
sort of thing (at least from code I've seen).

mmap can also reduce memory pressure, since there's only one copy of
the data (for some kernels anyway; others are smarter).

In a number of kernels, the read path for page-aligned page-sized data
is via mmap anyway, so any measurement at that point is going to make
mmap look cheaper. Even the read path is an mmap!

Looking at the Plan 9 exec path it's hard to see a reason that Plan 9
could not do mmap, it just doesn't. But lots of code nowadays depends
on mmap being there. Is there something I'm missing?

ron



  parent reply	other threads:[~2008-07-17 12:55 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-15 22:28 erik quanstrom
2008-07-15 22:27 ` Benjamin Huntsman
2008-07-15 22:35 ` Williams, Mitch
2008-07-16  1:39   ` erik quanstrom
2008-07-16  5:12     ` Benjamin Huntsman
2008-07-16  7:00       ` sqweek
2008-07-16 12:54         ` Russ Cox
2008-07-16 11:37       ` C H Forsyth
2008-07-16 12:13         ` John Waters
2008-07-16 13:03           ` a
2008-07-16 13:44           ` Uriel
2008-07-16 13:55             ` John Waters
2008-07-16 14:16             ` Robert William Fuller
2008-07-16 13:07       ` erik quanstrom
2008-07-16 13:42         ` Uriel
2008-07-16 15:02         ` Benjamin Huntsman
2008-07-16 18:56           ` Uriel
2008-07-17  7:59             ` Kernel Panic
2008-07-17  9:07               ` Charles Forsyth
2008-07-17 10:04                 ` Kernel Panic
2008-07-17 10:14                 ` Roman V. Shaposhnik
2008-07-17 12:55                 ` ron minnich [this message]
2008-07-17 12:58                   ` William Josephson
2008-07-17 13:45                   ` erik quanstrom
2008-07-17 14:11                     ` ron minnich
2008-07-17 14:32                   ` Roman V. Shaposhnik
2008-07-17 13:32                 ` Paweł Lasek
2008-07-17 14:07                   ` Kernel Panic
2008-07-16 22:44       ` Iruata Souza
2008-07-17  8:38         ` Kernel Panic
2008-07-17 18:14           ` Iruata Souza
2008-07-23 11:42             ` matt
2008-07-23 18:32               ` Iruata Souza
2008-07-16  1:41 ` andrey mirtchovski
2008-07-16 20:38 ` Roman V. Shaposhnik
2008-07-17  2:09   ` erik quanstrom
2008-07-17 10:18     ` Roman V. Shaposhnik
2008-07-17 12:41 erik quanstrom
2008-07-17 12:56 ` William Josephson
2008-07-17 12:58 ` ron minnich
2008-07-17 13:46   ` erik quanstrom
2008-07-17 14:06     ` ron minnich

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=13426df10807170555s746fa829p130970922058f692@mail.gmail.com \
    --to=rminnich@gmail.com \
    --cc=9fans@9fans.net \
    /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).