All of lore.kernel.org
 help / color / mirror / Atom feed
* New thread pools pushed out to the unstable tree
@ 2008-06-12  2:09 Chris Mason
  0 siblings, 0 replies; only message in thread
From: Chris Mason @ 2008-06-12  2:09 UTC (permalink / raw)
  To: linux-btrfs

Hello everyone,

I've been meaning to improve on checksumming scalability for a while.

The old code used workqueues to create checksums during writes and to
verify them after a read.  This didn't scale very well to multiple CPUs.
For streaming writes it might be common for a single CPU to be going at
100% while the other CPUs sit idle.

The new code uses a pool of kthreads and scales much better to a larger
number of disks and cpus.  (almost 2x faster on my larger test rig).

Of course, by scaling better I mean is better able to consume all of the
available CPU power, which might not be what everyone wants.

mount -o thread_pool=n will control the size of the pool.  2 will give
you something very close to the old code.  The new default is 8.

If you're counting kernel threads in the ps output, btrfs actually
creates one pool for readers and one for writers.  This avoids a long
list of deadlocks.

-chris



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-06-12  2:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-12  2:09 New thread pools pushed out to the unstable tree Chris Mason

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.