9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Paweł Lasek" <pawel.lasek@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 15:32:20 +0200	[thread overview]
Message-ID: <9f3897940807170632t12dd5deej23608689137b1a64@mail.gmail.com> (raw)
In-Reply-To: <2125ed224c77c85fc13d81eb95377a2a@terzarima.net>

On Thu, Jul 17, 2008 at 11:07, 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 (or ought to be),
> because the trap path and fault recovery must do more work than syscall (perhaps much more).
> it's also difficult then to optimise the replacement strategy for the application
> without madvise calls (and you trust those implicitly?) but those are system calls that cost time.
>
>
>

A much more important reason might be the fact that memory mapping of
files is only one function of mmap() and company. Basically when you
have mmap() and munmap() you can write your own allocator (which might
be very useful, especially for databases). I won't delve into using it
for I/O, but a specialized memory allocator can get you a big speedup
- after all application developer knows the memory usage pattern of
his app better than kernel/system library.


Of course, that is assuming that the developer in question has a clue...
-- 
Paweł Lasek

  parent reply	other threads:[~2008-07-17 13:32 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
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 [this message]
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=9f3897940807170632t12dd5deej23608689137b1a64@mail.gmail.com \
    --to=pawel.lasek@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).