xfs
[Top] [All Lists]

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

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 2/2] xfs: improve buffer cache hash scalability
From: Alex Elder <aelder@xxxxxxx>
Date: Fri, 27 Aug 2010 13:11:53 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1282522546-7892-3-git-send-email-david@xxxxxxxxxxxxx>
References: <1282522546-7892-1-git-send-email-david@xxxxxxxxxxxxx> <1282522546-7892-3-git-send-email-david@xxxxxxxxxxxxx>
Reply-to: aelder@xxxxxxx
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@xxxxxxx>

. . .


<Prev in Thread] Current Thread [Next in Thread>