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:
> 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:
I suspect the case I mentioned of truncating excess space on close
is probably the main culprit.
> .+'''+. .+'''+. .+'''+. .+'''+. .+''
> Kelemen Péter / \ / \ / fuji@xxxxxxx
> .+' `+...+' `+...+' `+...+' `+...+'