linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Tso <tytso@mit.edu>
To: William Cohen <wcohen@redhat.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Looking at space used by objects in slab allocator
Date: Tue, 13 Feb 2007 09:23:35 -0500	[thread overview]
Message-ID: <20070213142335.GC8670@thunk.org> (raw)
In-Reply-To: <45D0B78F.4030309@redhat.com>

On Mon, Feb 12, 2007 at 01:53:03PM -0500, William Cohen wrote:
> After last week's experiment reducing size of task_struct on I was
> The is a signficant amount of space wasted for ext3_inode_cache. If
> the struct used for ext3_inode_cache struct could be made smaller,
> three objects rather than two could fit in a slab. Fitting 3 objects
> to a page would decrease the space required for ext3_inod_cache from
> 20.4MB to 13.6MB in this example.

The problem is the size of "struct inode" (which is included in struct
ext3_inode_info).  There is quite a few fields in struct inode which
are only used when the inode has been opened and being referenced by
one or more file descriptors, but which take up a huge amount of
space.  One of the biggies is inode.i_data; struct address_space is
*huge*, and we're keeping a copy of it in every single inode which
we're caching.

It was next on my list on my inode-diet project that I worked on about
six months ago, but it was non-trivial, and my time got sucked away
with other projects, so I never got back to it.  But if you want to
try to save space, that's the next logical step --- we've already done
all or most of the low-hanging fruit to save space wasted by struct
inode and by extension in the ext3_inode_cache.

						- Ted


      reply	other threads:[~2007-02-13 14:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-12 18:53 Looking at space used by objects in slab allocator William Cohen
2007-02-13 14:23 ` Theodore Tso [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=20070213142335.GC8670@thunk.org \
    --to=tytso@mit.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wcohen@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).