From: "Ihar `Philips` Filipau" <thephilips@gmail.com>
To: "Bryan Henderson" <hbryan@us.ibm.com>
Cc: "Josef Sipek" <jsipek@fsl.cs.sunysb.edu>,
avishay <atraeger@cs.sunysb.edu>,
linux-fsdevel@vger.kernel.org
Subject: Re: Allocation strategy - dynamic zone for small files
Date: Tue, 14 Nov 2006 00:32:07 +0100 [thread overview]
Message-ID: <efa6f5910611131532j6cb43a3apf0ce7326a4271d3d@mail.gmail.com> (raw)
In-Reply-To: <OF181C0544.AEFFEF29-ON88257225.0072F94B-88257225.0074828E@us.ibm.com>
On 11/13/06, Bryan Henderson <hbryan@us.ibm.com> wrote:
> >
> >Good point. But wouldn't the page cache suffer regardless? (You can't split
> >up pages between files, AFAIK.)
>
> Yeah, you're right, if we're talking about granularity finer than the page
> size. But furthermore, as long as we're just talking about techniques to
> reduce internal fragmentation in the disk allocations, there's no reason
> either the cache usage or the data transfer traffic has to be affected
> (the fact that a whole block is allocated doesn't mean you have to read or
> cache the whole block).
>
> But head movement and rotational latency are worth considering. If you
>
As person throwing in the idea, I feel bit responsible. So here go my
results from my primitive script (bear with my bashism) on my plain
Debian/unstable with 123k files on 10GB partition with ext3, default
8K block.
Script to count small files:
-+-
#!/bin/bash
find / -xdev 2>/dev/null | wc -l
find / -xdev -\( $(seq -f '-size %gc -o' 1 63) -false -\) 2>/dev/null | wc -l
find / -xdev -\( $(seq -f '-size %gc -o' 64 128) -false -\) 2>/dev/null | wc -l
-+-
First line to find all files on root fs, second to find all files with
sizes 1-63 bytes, third - 64-128. (Param '-xdev' tells find to remain
on same fs to exclude proc/sys/tmp and so on)
And on my system counts are:
-+-
107313
8302
2618
-+-
This is 10.1% of all files - are small files under 128 bytes. (7.7% < 63 bytes)
[ Results for /etc: 1712, 666, 143 (+ 221 file of size in range
129-512 bytes) - small files are better half of whole /etc. ]
[ In fact, the optimization of small blocks is widely used in network
equipment: many intelligent devices can use several packet queues to
send ingress packets to RAM - sorted by size. One device I programmed
driver for allowed to have four queues with recommended sizes: 32,
128, 512, 2048 - the sizes allowing to suck in RAM lots of
small/medium packets (normally used for control - ICMP, TCP's ACK/SYN,
etc) w/o depleting all buffers (normally used for data traffic). I
have posted the link here because I was bit surprised that somebody
tries to apply similar idea to file systems. ]
Most important outcome of the optimization might be that future FSs
wouldn't be afraid to set cluster size higher than it is accepted now:
e.g. standard 4/8/16K now - but with small file (+ tail) optimization
ramp it to 32/64/128K.
--
Don't walk behind me, I may not lead.
Don't walk in front of me, I may not follow.
Just walk beside me and be my friend.
-- Albert Camus (attributed to)
next prev parent reply other threads:[~2006-11-13 23:33 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-13 10:37 Allocation strategy - dynamic zone for small files Ihar `Philips` Filipau
2006-11-13 13:56 ` avishay
2006-11-13 17:46 ` Bryan Henderson
2006-11-13 19:38 ` Josef Sipek
2006-11-13 21:12 ` Bryan Henderson
2006-11-13 23:32 ` Ihar `Philips` Filipau [this message]
2006-11-13 23:57 ` Andreas Dilger
2006-11-14 2:19 ` Dave Kleikamp
2006-11-14 13:15 ` Jörn Engel
[not found] ` <efa6f5910611140541m302201e6t4e84551b75e79611@mail.gmail.com>
2006-11-14 13:56 ` Jörn Engel
2006-11-14 18:23 ` Andreas Dilger
2006-11-14 15:19 ` phillip
2006-11-14 18:19 ` Andreas Dilger
2006-11-14 0:15 ` Josef Sipek
2006-11-14 0:59 ` Bryan Henderson
2006-11-14 1:02 ` Theodore Tso
2006-11-14 11:21 ` Al Boldi
2006-11-14 14:25 ` Theodore Tso
2006-11-14 15:43 ` Al Boldi
2006-11-14 15:46 ` Matthew Wilcox
2006-11-14 16:59 ` Al Boldi
2006-11-14 17:27 ` Matthew Wilcox
2006-11-14 17:55 ` Theodore Tso
2006-11-14 18:23 ` Al Boldi
2006-11-14 14:30 ` phillip
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=efa6f5910611131532j6cb43a3apf0ce7326a4271d3d@mail.gmail.com \
--to=thephilips@gmail.com \
--cc=atraeger@cs.sunysb.edu \
--cc=hbryan@us.ibm.com \
--cc=jsipek@fsl.cs.sunysb.edu \
--cc=linux-fsdevel@vger.kernel.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 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).