Ying-Hung Chen wrote:
pre-allocation before writing would still be your best bet. If you
pre-allocate on a fresh fs before writing, you should get very large
extents.
does this mean, if I create a 2GB file via dd (not sparse file), when i
'overwrite' to the same file, it will stay there? (same physical place)
Depends on if you truncate it before you re-write to it, I think.
But don't use dd - use xfs's preallocation calls, it will be MUCH more
efficient.
Other things you could try; if you put each file in its own dir, it will
tend to go into its own allocation group.
You could make the filesystem with allocation groups sized at 2GB
I just thought of wild idea... since i am creating 90 files, what if i
just create 90 allocation group via -d agcount=90, does this make sense
or it won't work at all?
well, give it a shot.
But I'd try the preallocation calls first - that's what they are for.
-Eric
|