All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Scott <nathans@sgi.com>
To: SE Linux <selinux@tycho.nsa.gov>
Cc: linux-xfs@oss.sgi.com
Subject: Re: XFS and SE Linux
Date: Wed, 10 Mar 2004 12:34:56 +1100	[thread overview]
Message-ID: <20040310013456.GC1004@frodo> (raw)
In-Reply-To: <200403100014.03542.russell@coker.com.au>

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

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

      parent reply	other threads:[~2004-03-10 19:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-09 13:14 XFS and SE Linux Russell Coker
2004-03-09 14:00 ` Stephen Smalley
2004-03-09 14:04   ` Russell Coker
2004-03-10  1:34 ` Nathan Scott [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040310013456.GC1004@frodo \
    --to=nathans@sgi.com \
    --cc=linux-xfs@oss.sgi.com \
    --cc=selinux@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.