[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tons of empty transactions
On Sun, 2002-05-26 at 17:56, KELEMEN Peter wrote:
> XFS fellows,
>
> The other day I was lurking around on several machines of mine and
> on one of them I found the following:
>
> Transactions
> xs_trans_sync........ 16615 ( 1.1480%)
> xs_trans_async....... 298806 ( 20.6458%)
> xs_trans_empty....... 1131876 ( 78.2062%)
>
> in other words, four-fifth of XFS transactions are empty. The
> machine has light load and this was observed after approx. 80 days
> uptime. What could be the reason for such high number of empty
> transactions? (no sources at hand to check for myself)
There are some paths in xfs which allocate a transaction, and
then discover they do not need it. One example of this is
removing the excess space at the end of a file during close,
this frequently does not need a transaction. At the
point we are in a position to know this for sure, we hold
locks which mean we cannot allocate a transaction. So
we end up with a transaction which is not used. 78% is
a very high number of this, but it depends on the pattern
of access on a machine.
This is from my workstation after 10 days of uptime - which
includes 2 weekends:
Transactions
xs_trans_sync........ 4850
xs_trans_async....... 973346
xs_trans_empty....... 228719
I suspect the case I mentioned of truncating excess space on close
is probably the main culprit.
Steve
>
> Peter
>
> --
> .+'''+. .+'''+. .+'''+. .+'''+. .+''
> Kelemen Péter / \ / \ / fuji@elte.hu
> .+' `+...+' `+...+' `+...+' `+...+'