linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Noack <fsf.deathman@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: Mmap on SSD (directly mapping the device vs. mapping a file)
Date: Wed, 15 Aug 2012 11:26:06 +0200	[thread overview]
Message-ID: <CAAv8mH2_MYPGOZ2Qed51jfBhd0vmovWeW6sJDyYKjgAyX9-KKw@mail.gmail.com> (raw)

Hi, folks!

Like you can see on the subject I experimented a little with mmap in
the last time. I've written a little B+tree library which uses mmap to
store the tree to a file or the whole device (means it is also
possible to map the raw device (i.e. /dev/sdb)). I used msync after
every successfull change on the tree. Next thing I did was to use this
for a little benchmark on performance of different storage devices
(ramdisk, HDD, and a very fast flashcard directly atteched to the PCIe
bus). I recognized that in allmost all cases when directly mapping the
device without a filesystem the file-mapped version was a little bit
slower. But when I tried it on an SSD device the file-mapped version
was an order of magnitude faster. I also tried secure erase and did
the benchmarks many times and in many configurations, but I came to
the same results.
Last thing I tried were the different queue schedulers, without any changes.

In one of the posts from january I read that there is a performance
bug when directly reading from the raw SSD device, but I didn't find
any else comment which stated this as true. For the benchmarks I used
a current Ubuntu with a 3.2.16 kernel (from kernel.org). Is this
behavior normal, or did I miss something.

             reply	other threads:[~2012-08-15  9:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-15  9:26 Daniel Noack [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-08-14 10:59 Mmap on SSD (directly mapping the device vs. mapping a file) Daniel Noack

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=CAAv8mH2_MYPGOZ2Qed51jfBhd0vmovWeW6sJDyYKjgAyX9-KKw@mail.gmail.com \
    --to=fsf.deathman@gmail.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;
as well as URLs for NNTP newsgroup(s).