xfs
[Top] [All Lists]

Re: XFS and SE Linux

To: SE Linux <selinux@xxxxxxxxxxxxx>
Subject: Re: XFS and SE Linux
From: Nathan Scott <nathans@xxxxxxx>
Date: Wed, 10 Mar 2004 12:34:56 +1100
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <200403100014.03542.russell@xxxxxxxxxxxx>
References: <200403100014.03542.russell@xxxxxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.3i
Hi Russell,

Thanks for sending this out.  Couple of additions...

On Wed, Mar 10, 2004 at 12:14:03AM +1100, Russell Coker wrote:
> XFS defaults to an Inode size of 256 bytes and a block size of 4K on i386.

These default values are platform independent.

> The "security.selinux" xattr name and the data stored in it can apparently be 
> counted on to not fit into the <50 bytes left in a 256 byte Inode after all 
> the other meta-data is stored.  This will mean that a new block is used for 
> the XATTR (which in 99.99% of all cases will be the only XATTR on the file).
> 
> Using an extra 4K block per file is a significant waste of disk space, XFS 
> apparently does not support block sharing so you have 4K of disk space for 50 
> bytes of data.

It also amounts to a fairly significant performance hit, since
there is additional I/O involved once the attributes are no longer
inline.  When we tweaked the ACL code to be more conscious of this
issue, speedups were of the order 10x-12x IIRC.

Heavy users of extended attributes should always use larger inode
sizes with XFS.

> If at mkfs time you make the Inode 512 bytes in size you will have enough 
> space for the SE Linux xattr.  This will save huge amounts of space on a SE 
> Linux system as there will effectively be 256 bytes of overhead per file 
> instead of 4096.

That extra inline space is also available for use by inline
directory entries (and of course other extended attributes),
so its not useless overhead either.

cheers.

-- 
Nathan


<Prev in Thread] Current Thread [Next in Thread>
  • Re: XFS and SE Linux, Nathan Scott <=