* Possible to preallocate files that always begin/end on stripe unit/width?
@ 2010-09-03 20:12 Green Guy
2010-09-03 21:19 ` Nathan Scott
0 siblings, 1 reply; 2+ messages in thread
From: Green Guy @ 2010-09-03 20:12 UTC (permalink / raw)
To: xfs
[-- Attachment #1.1: Type: text/plain, Size: 2021 bytes --]
I am working on an app that will write to preallocated files. I can control
how big the files are (as long as they are between 4-6GB) and the amount of
data sent with each write() call.
I have a 3.2TB virtual drive that I need to use as much of as possible but
performance is the number one concern.
The system is an 8 disk RAID5 with a 256k stripe. Based on this, I am using:
mkfs.xfs -b size=4096 -l version=2,sunit=512 -d su=256k,sw=7 -f /dev/sdb
meta-data=/dev/sdb isize=256 agcount=32, agsize=26679232
blks
= sectsz=512 attr=0
data = bsize=4096 blocks=853735424, imaxpct=25
= sunit=64 swidth=
blks, unwritten=1
naming =version 2 bsize=4096
log =internal log bsize=4096 blocks=32768, version=2
= sectsz=512 sunit=64 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
and
mount -t xfs -o sunit=512,swidth=3584,inode64,nobarrier,logbufs=8 /dev/sdb
/mnt
Based on what I have read, it appears then my "most optimal" write/read size
would be 1835008 bytes (3584 *512).
So based on that, I want to preallocate files somewhere between 4-6GB each
that will always begin and end on the stripe unit and stripe width and be a
multiple of 1835008.
I know that XFS metadata such as the log, AG info, etc also need to be
accounted for, but I am not sure the best way to determine how much space
they will take.
I assume that the fact that, once I set the number of files on the disk,
they will not change/expand must be an advantage, but I am unsure how to
leverage it.
I have tried file sizes in several different multiples of 1835008, but for
all of them, bmap -vp has flags 00011.
How can I determine the correct file size and preallocate them in a way
where they always begin/end on stripe unit/width taking the filesystem
overhead into account?
Note: the log needs to stay on the same fs.
Thanks
g3k
[-- Attachment #1.2: Type: text/html, Size: 3762 bytes --]
[-- Attachment #2: Type: text/plain, Size: 121 bytes --]
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Possible to preallocate files that always begin/end on stripe unit/width?
2010-09-03 20:12 Possible to preallocate files that always begin/end on stripe unit/width? Green Guy
@ 2010-09-03 21:19 ` Nathan Scott
0 siblings, 0 replies; 2+ messages in thread
From: Nathan Scott @ 2010-09-03 21:19 UTC (permalink / raw)
To: Green Guy; +Cc: xfs
----- "Green Guy" <greentech3000@gmail.com> wrote:
> ...
> I know that XFS metadata such as the log, AG info, etc also need to be
> accounted for, but I am not sure the best way to determine how much
> space they will take.
>
> ...
> How can I determine the correct file size and preallocate them in a
> way where they always begin/end on stripe unit/width taking the
> filesystem overhead into account?
> Note: the log needs to stay on the same fs.
>
There's no way to make a guaranteed aligned/sized allocation, but you
can ask for a "best effort" by using the sizing information returned
from the XFS_IOC_FSGEOMETRY syscall (via xfsctl).
cheers.
--
Nathan
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-09-03 21:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-03 20:12 Possible to preallocate files that always begin/end on stripe unit/width? Green Guy
2010-09-03 21:19 ` Nathan Scott
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.