xfs
[Top] [All Lists]

Re: Tons of empty transactions

To: KELEMEN Peter <fuji@xxxxxxx>
Subject: Re: Tons of empty transactions
From: Stephen Lord <lord@xxxxxxx>
Date: 27 May 2002 13:26:35 -0500
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <20020526225657.GA4965@chiara.elte.hu>
References: <20020526225657.GA4965@chiara.elte.hu>
Sender: owner-linux-xfs@xxxxxxxxxxx
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@xxxxxxx
> .+'         `+...+'         `+...+'         `+...+'         `+...+'




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