linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Btrfs RAID 1 Very poor file re read cache
@ 2015-03-24  4:00 Chris Severance
  2015-03-25  7:45 ` Duncan
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Severance @ 2015-03-24  4:00 UTC (permalink / raw)
  To: linux-btrfs

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-25  7:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-24  4:00 Btrfs RAID 1 Very poor file re read cache Chris Severance
2015-03-25  7:45 ` Duncan

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).