From: Chris Severance <linuxkernel.severach@spamgourmet.com>
To: linux-btrfs@vger.kernel.org
Subject: Btrfs RAID 1 Very poor file re read cache
Date: Tue, 24 Mar 2015 00:00:32 -0400 [thread overview]
Message-ID: <1427169632.2878415.244369134.44ED7B24@webmail.messagingengine.com> (raw)
System:
Thinkserver TS140 E3-1225, 32GB ECC RAM, LSI9211-8i (IT unraid), 2 WD xe
SAS as mdraid-raid1-ext4, 2 WD xe SAS as btrfs-raid1
Linux xyzzy 3.19.2-1-ARCH #1 SMP PREEMPT Wed Mar 18 16:21:02 CET 2015
x86_64 GNU/Linux
btrfs-progs v3.19
btrfs fi: partition already removed, created with mkfs.btrfs -m raid1 -d
raid1 -L sdmdata /dev/sdc /dev/sdd
dmesg: (not a problem with crashing)
Problem:
Very poor file reread cache. The database I use organizes both data and
keys in a single file as a btree. This means that each successive record
is located randomly around the file. Reading from first to last
generates a lot of seeks.
On btrfs the speed is consistent throughout the whole file as it is on
any system with too little memory for an effective cache. Every reread
runs at the same slow and consistent speed.
So I unmount btrfs, quick zero the drives, mkfs.ext4, mount, and unpack
the same data and run the same test on the same drives.
On ext4 (and xfs from other testing) the first time I read through the
whole file it starts slow as it seeks around to uncached data and
speeds up as more of the file is found in the cache. It is very fast by
the end. Once in the cache I can read the file over and over super
fast. The ext4 read cache is mitigating the time cost from the poor
arrangement of the file.
I'm the only user on this test system so nothing is clearing my 32GB.
next reply other threads:[~2015-03-24 4:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-24 4:00 Chris Severance [this message]
2015-03-25 7:45 ` Btrfs RAID 1 Very poor file re read cache Duncan
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=1427169632.2878415.244369134.44ED7B24@webmail.messagingengine.com \
--to=linuxkernel.severach@spamgourmet.com \
--cc=linux-btrfs@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).