All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Jarkko Lavinen <jlavi@iki.fi>
Cc: jffs-dev@axis.com, MTD List <linux-mtd@lists.infradead.org>
Subject: Re: JFFS2 empty file overhead questions
Date: Wed, 08 May 2002 09:46:48 +0100	[thread overview]
Message-ID: <5014.1020847608@redhat.com> (raw)
In-Reply-To: <20020508113056.A2123@kosh.hut.fi>

jlavi@iki.fi said:
>  After creating 25531 the used space had grown to 3312 K. Initially it
> had been 320K. This would suggest the empty file size overhead on
> JFFS2 is (3312 - 320)*1024 / 25531 =  120.00 bytes.

Sounds about right. 

((sizeof(struct jffs2_raw_dirent) + strlen(name) + 3) & ~3)
	+ sizeof(struct jffs2_raw_inode)

Where sizeof(jffs2_raw_dirent) == 40, sizeof(jffs2_raw_inode) == 68.


>  I also tracked the file creation time. This showed linear first
> degree dependence on the number of files created. On that particular
> device empty file creation (file open) time can be presented as a
> function t_c over the number of created files so far: 

That one I can probably settle without seeing a profile -- we look through a
single (but sorted) linked list in jffs2_lookup(). We could consider
optimising that if it's a problem, but I suspect it's not in the real world.

>  After 25519 files I couldn't track space usage with "df" anymore
> because it started to give out of memory message. After 26647 my test
> program couldn't run anymore because of out of memory. Needles to say,
> but my test program doesn't allocate memory nor leave files open when
> it proceeds. 

cat /proc/slabinfo /proc/meminfo /proc/sys/fs/inode-nr

--
dwmw2

  reply	other threads:[~2002-05-08  8:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-08  8:30 JFFS2 empty file overhead questions Jarkko Lavinen
2002-05-08  8:46 ` David Woodhouse [this message]
2002-05-14  8:48   ` Jarkko Lavinen

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=5014.1020847608@redhat.com \
    --to=dwmw2@infradead.org \
    --cc=jffs-dev@axis.com \
    --cc=jlavi@iki.fi \
    --cc=linux-mtd@lists.infradead.org \
    /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.