[PATCH 2/2] xfs: improve buffer cache hash scalability

Alex Elder aelder at sgi.com
Fri Aug 27 13:11:53 CDT 2010


On Mon, 2010-08-23 at 10:15 +1000, Dave Chinner wrote:
> When doing large parallel file creates on a 16p machines, large amounts of
> time is being spent in _xfs_buf_find(). A system wide profile with perf top
> shows this:
> 
>           1134740.00 19.3% _xfs_buf_find
>            733142.00 12.5% __ticket_spin_lock
> 
> The problem is that the hash contains 45,000 buffers, and the hash table width
> is only 256 buffers. That means we've got around 200 buffers per chain, and
> searching it is quite expensive. The hash table size needs to increase.

My only comment on this is that 4096 buckets is
good now but someday that may not be right either.
Is there any better way (based on size of underlying
block_device and maybe taking into account other things
like page size or CPU count) to decide this hash size?

Either way it looks good.

Reviewed-by: Alex Elder <aelder at sgi.com>

. . .





More information about the xfs mailing list