xfs
[Top] [All Lists]

Re: file preallocation without unwritten flag being set

To: Eric Sandeen <sandeen@xxxxxxxxxxx>
Subject: Re: file preallocation without unwritten flag being set
From: p v <pvlogin@xxxxxxxxx>
Date: Tue, 12 May 2009 21:34:57 -0700 (PDT)
Cc: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1242189298; bh=pJR40PdEzcgRI2/7ukKtkn7abiUhkGLO4/SeLCxEAO0=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=hntdSouE8HJbpi3Z+kk1pp1FQYSyq7d9U2Rd1SxMuEdFac7ByTcc7x6l1WsklbucAd2Of/8jDImeGAp4/OjF0G4TpIB3mgFiqLssgVA10IqNTh+wdu7iCcXvzdhcDt6POxfk5ZFhoM295HrU+z56raq+21zsHTwaxH8dDN740l8=
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=CFkQwi5ySkX3jZRYAKCrZ5622c5hCUDhZWWu94DMQRlRGAkK9yETCu9hIVK3maRCbwQO5r6dEJBF8fKgDnTds3TD2YUxGdnpadkNOWH2PeKfUS47RGudmm4mnO3anpo0JxSBwMOHe2HXw93SZJ1ad/epsennddTuIQA0wrIbRPo=;
In-reply-to: <4A0A0E76.6000701@xxxxxxxxxxx>
References: <283244.29270.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <4A0A0E76.6000701@xxxxxxxxxxx>


I want to avoid any metadata modifications while doing O_DIRECT reads (the fs 
is mounted with noatime). Right now I am doing it mostly for testing - I am 
seeing a performance degradation going from raw to xfs on a 10TB filesystem - 
probably due to my application but I am trying to narrow it down so I am 
starting with running randomio benchmark on raw - then 10TB file, then 10 1TB 
files, then 100 100GB files, ...

But in general certain applications can definitely take care of the 
preallocated space (db, FB haystack, ...). What they require is minimal 
fragmentation so they would prefer to preallocate the space (fill the whole fs 
with contigous files) and then maintain in-files app specific metadata (such as 
valid offsets of initialized data, ...). What I would really like is to have 
vxfs equivalent of setext options -

setext -r <reservation> -f chggsize

And on top of that I would really love to have is vxfs equivalent of "nomtime" 
mount option. Then with O_DIRECT I have raw-like performance.

With the unwritten mkfs option I could get the setext semantics. So what's the 
trick (before I dive into the xfs layout)? I am guessing that there is no 
equivalent for nomtime option?

Thanks

Peter Vajgel





----- Original Message ----
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
To: p v <pvlogin@xxxxxxxxx>
Cc: xfs@xxxxxxxxxxx
Sent: Tuesday, May 12, 2009 5:04:06 PM
Subject: Re: file preallocation without unwritten flag being set

p v wrote:
> 
> Hello,
> 
> I need to create large files fast without initializing them - in the
> past I used these steps -
> 
> mkfs -t xfs -f -d unwritten=0 /dev/sda1 mount -t xfs -o noatime
> /dev/sda1 /hay touch /hay/foo xfs_io /hay/foo xfs_io> resvsp 0 1024g 
> xfs_io> quit ls -i /hay/foo 131 /hay/foo umount /hay xfs_db -x
> /dev/sda1 xfs_db> inode 131 xfs_db> write core.size 1099511627776 
> core.size = 1099511627776 xfs_db> q

Is there a reason that you don't want the unwritten flag set?  (You know
that not using the unwritten extents feature exposes garbage from the
disk in this case?)

There may well be a legit reason but I just want to make sure you're
doing what you think you're doing :)

Thanks,
-Eric

> But unwritten=0 is failing as unrecognized option now (was it
> deprecated????) so I tried to clear the unwritten extent flag
> directly -
> 
> xfs_db> a u.bmbt.ptrs[1] xfs_db> write recs[1].extentflag 0 
> recs[1].extentflag = 1 xfs_db>
> 
> It just won't change to 0 - any way to do this? Or is there any
> straightforward way to preallocate a large file and set it's file
> size without the unwritten flags being turned on?
> 
> Thanks
> 
> Peter Vajgel
> 
> 
> 
> 
> 
> _______________________________________________ xfs mailing list 
> xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs
> 


      

<Prev in Thread] Current Thread [Next in Thread>