[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [libvirt] [PATCH] Use posix_fallocate() to allocate disk space
- From: Amit Shah <amit shah redhat com>
- To: "Daniel P. Berrange" <berrange redhat com>
- Cc: libvir-list redhat com
- Subject: Re: [libvirt] [PATCH] Use posix_fallocate() to allocate disk space
- Date: Wed, 4 Mar 2009 19:28:03 +0530
On (Wed) Mar 04 2009 [12:55:22], Daniel P. Berrange wrote:
> On Mon, Mar 02, 2009 at 03:02:11PM +0530, Amit Shah wrote:
> >
> > Inspite of this if some feedback is needed for a non-extents-based file
> > system, a run-time probe for the underlying file system can be made and
> > we could default to a chunk-based allocation in that case.
>
> These results are quite impressive. It is better by orders of magnitude
> for modern filesystems, and even on ext3 it has a slight edge. So I'm
> inclined to say we should use posix_fallocate() by default at all
> times.
>
> When we introduce the API for incremental feedback, we could do something
> like call fallocate() in 1GB chunks so we can get some reasonable amount
> of feedback while still keeping it very fast & well allocated on disk.
Oh btw fallocate() seems to be an O(1) operation (at least on new file
systems). Allocating a 5G file also gave me 0s:few microseconds delay.
> And of course, just fallocate() the whole thing upfront if the user does
> not provide a callback for requesting feedback.
Amit
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]