Re: [PATCH 00/37] Permit filesystem local caching

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Howells
Date: Thursday, February 21, 2008 - 4:33 pm

David Howells <dhowells@redhat.com> wrote:


Attached here are results using BTRFS (patched so that it'll work at all)
rather than Ext3 on the client on the partition backing the cache.

Note that I didn't bother redoing the tests that didn't involve a cache as the
choice of filesystem backing the cache should have no bearing on the result.

Generally, completely cold caches shouldn't show much variation as all the
writing can be done completely asynchronously, provided the client doesn't
fill its RAM.

The interesting case is where the disk cache is warm, but the pagecache is
cold (ie: just after a reboot after filling the caches).  Here, for the two
big files case, BTRFS appears quite a bit better than Ext3, showing a 21%
reduction in time for the smaller case and a 13% reduction for the larger
case.

For the many small/medium files case, BTRFS performed significantly better
(15% reduction in time) in the case where the caches were completely cold.
I'm not sure why, though - perhaps because it doesn't execute a write_begin()
stage during the write_one_page() call and thus doesn't go allocating disk
blocks to back the data, but instead allocates them later.

More surprising is that BTRFS performed significantly worse (15% increase in
time) in the case where the cache on disk was fully populated and then the
machine had been rebooted to clear the pagecaches.

It's important to note that I've only run each test once apiece, so the
numbers should be taken with a modicum of salt (bad statistics and all that).

David
---
===========================
FEW BIG FILES TEST ON BTRFS
===========================

Completely cold caches:

	[root@andromeda ~]# time cat /warthog/bigfile >/dev/null
	real    0m2.124s
	user    0m0.000s
	sys     0m1.260s
	[root@andromeda ~]# time cat /warthog/biggerfile >/dev/null
	real    0m4.538s
	user    0m0.000s
	sys     0m2.624s

Warm NFS pagecache:

	[root@andromeda ~]# time cat /warthog/bigfile >/dev/null
	real    0m0.061s
	user    0m0.000s
	sys     0m0.064s
	[root@andromeda ~]# time cat /warthog/biggerfile >/dev/null
	real    0m0.118s
	user    0m0.000s
	sys     0m0.116s

Warm BTRFS pagecache, cold NFS pagecache:

	[root@andromeda ~]# time cat /warthog/bigfile >/dev/null
	real    0m0.189s
	user    0m0.000s
	sys     0m0.188s
	[root@andromeda ~]# time cat /warthog/biggerfile >/dev/null
	real    0m0.369s
	user    0m0.000s
	sys     0m0.368s

Warm on-disk cache, cold pagecaches:

	[root@andromeda ~]# time cat /warthog/bigfile >/dev/null
	real    0m1.540s
	user    0m0.000s
	sys     0m1.440s
	[root@andromeda ~]# time cat /warthog/biggerfile >/dev/null
	real    0m3.132s
	user    0m0.000s
	sys     0m1.724s


============================================
MANY SMALL/MEDIUM FILE READING TEST ON BTRFS
============================================

Completely cold caches:

	[root@andromeda ~]# time tar cf - /warthog/aaa >/dev/zero
	real    0m31.838s
	user    0m0.192s
	sys     0m6.076s

Warm NFS pagecache:

	[root@andromeda ~]# time tar cf - /warthog/aaa >/dev/zero
	real    0m14.841s
	user    0m0.148s
	sys     0m4.988s

Warm BTRFS pagecache, cold NFS pagecache:

	[root@andromeda ~]# time tar cf - /warthog/aaa >/dev/zero
	real    0m16.773s
	user    0m0.148s
	sys     0m5.512s

Warm on-disk cache, cold pagecaches:

	[root@andromeda ~]# time tar cf - /warthog/aaa >/dev/zero
	real    2m12.527s
	user    0m0.080s
	sys     0m2.908s

-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 00/37] Permit filesystem local caching, David Howells, (Wed Feb 20, 9:05 am)
[PATCH 19/37] CacheFiles: Export things for CacheFiles, David Howells, (Wed Feb 20, 9:07 am)
[PATCH 22/37] NFS: Add FS-Cache option bit and debug bit, David Howells, (Wed Feb 20, 9:07 am)
[PATCH 25/37] NFS: Define and create server-level objects, David Howells, (Wed Feb 20, 9:08 am)
[PATCH 28/37] NFS: Use local disk inode cache, David Howells, (Wed Feb 20, 9:08 am)
[PATCH 31/37] NFS: FS-Cache page management, David Howells, (Wed Feb 20, 9:08 am)
[PATCH 36/37] NFS: Display local caching state, David Howells, (Wed Feb 20, 9:09 am)
Re: [PATCH 00/37] Permit filesystem local caching, Serge E. Hallyn, (Wed Feb 20, 12:58 pm)
Re: [PATCH 00/37] Permit filesystem local caching, David Howells, (Wed Feb 20, 1:11 pm)
Re: [PATCH 00/37] Permit filesystem local caching, Daniel Phillips, (Wed Feb 20, 8:07 pm)
Re: [PATCH 00/37] Permit filesystem local caching, David Howells, (Thu Feb 21, 5:31 am)
Re: [PATCH 00/37] Permit filesystem local caching, David Howells, (Thu Feb 21, 7:55 am)
Re: [PATCH 00/37] Permit filesystem local caching, Kevin Coffman, (Thu Feb 21, 8:17 am)
Re: [PATCH 00/37] Permit filesystem local caching, Daniel Phillips, (Thu Feb 21, 3:44 pm)
RE: [PATCH 00/37] Permit filesystem local caching, Muntz, Daniel, (Thu Feb 21, 3:52 pm)
Re: [PATCH 00/37] Permit filesystem local caching, David Howells, (Thu Feb 21, 4:33 pm)
Re: [PATCH 00/37] Permit filesystem local caching, David Howells, (Thu Feb 21, 5:07 pm)
Re: [PATCH 00/37] Permit filesystem local caching, Daniel Phillips, (Thu Feb 21, 5:57 pm)
Re: [PATCH 00/37] Permit filesystem local caching, David Howells, (Fri Feb 22, 5:48 am)
Re: [PATCH 00/37] Permit filesystem local caching, Chris Mason, (Fri Feb 22, 6:52 am)
Re: [PATCH 00/37] Permit filesystem local caching, David Howells, (Fri Feb 22, 9:12 am)
Re: [PATCH 00/37] Permit filesystem local caching, David Howells, (Fri Feb 22, 9:14 am)
Re: [PATCH 00/37] Permit filesystem local caching, David Howells, (Fri Feb 22, 9:47 am)
Re: [PATCH 00/37] Permit filesystem local caching, Daniel Phillips, (Fri Feb 22, 3:25 pm)
Re: [PATCH 00/37] Permit filesystem local caching, David Howells, (Fri Feb 22, 6:22 pm)