Re: Inode question

From: Paulo Marques
Date: Tue Jul 27 2004 - 06:19:38 EST


On Tue, 2004-07-27 at 02:28, sankarshana rao wrote:
> Thx for the inputs..
> I am trying this thing on Mips processor and creating
> 500 folders itself takes about 1.6 seconds. That's why
> I was wondering if using inodes would make it any
> faster..
> pls guide...

I really think the name lookup is not your bottleneck.

I did some more tests to check where the time to create a dir came from
and, as expected, it depends a lot on the filesystem.

Using ext3, creating 1000 dirs on my machine (P4 2.8GHz) takes about 100
ms. Using tmpfs, takes only 6 ms. Even a machine 20 times slower would
take at most 60ms to do the 500 lookups.

Both tests have to do the same lookup on the dentry cache and check for
duplicate names, etc.

So the real difference is the time *the filesystem* takes to create a
dir.

You're probably using JFFS2 or something like that, which is almost
synchronous (I don't know for sure if it is really synchronous), and
writes the updates to flash on every dir creation.

I hope this helps,

--
Paulo Marques - www.grupopie.com
"In a world without walls and fences who needs windows and gates?"

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/