| To: | Dave Chinner <david@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: Request for information on bloated writes using Swift |
| From: | Dilip Simha <nmdilipsimha@xxxxxxxxx> |
| Date: | Wed, 3 Feb 2016 08:10:46 -0800 |
| Cc: | Eric Sandeen <sandeen@xxxxxxxxxxx>, xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=GxJE+eXRHkHwIxMHQ9HTfIKWXU+ikPYRwBXgfXSVYO4=; b=rOaMgRJZqiH5PLsX8C51FCJ662MoIM4bd0QZreezFn0hyKQsOsHss1FoeA0fFDhj0h c7DbNErxs/HkZ6ZhYYR33+KRAzqtirGMKi+enSgCRKKdeR2WxMhUNFy6gAS7LUt8VEU+ 35w1l2DUT5wH8c1GmIT4jMHGx37zj6fVKZ6ijQLttCdsz2u+42k8HsUlaGjEMK1qOZk5 3LNuoAKd8oc9rwA7ODNSLp5TlLvkxcn5XMtT1hsqdCRGP/ku+T9UKoLzQWiOQ7ECv8BB 2E7jGeqVCTooOQbT0Nc0hLxNQx8fX5pEHWWcF8K8xP8+5r8+pH+CCt0ZRNdxkp6Z5uxd b3WA== |
| In-reply-to: | <20160203083016.GD459@dastard> |
| References: | <CAFHL4X1JU02LFYntkqhYg1N++ZU46ML3v5higo1nRsPyoZxL5A@xxxxxxxxxxxxxx> <56B16A3C.1030207@xxxxxxxxxxx> <CAFHL4X0QBtFpz3=HMVMrp6NoaW5BRkDSoTE1yJQvQ=0JrW5+YQ@xxxxxxxxxxxxxx> <20160203063705.GB459@dastard> <CAFHL4X0m8Ov+zJxteUJJxzEHVXpJsfe=9mtapRmWkhT6VRkDxg@xxxxxxxxxxxxxx> <20160203083016.GD459@dastard> |
|
On Wed, Feb 3, 2016 at 12:30 AM, Dave Chinner <david@xxxxxxxxxxxxx> wrote: On Tue, Feb 02, 2016 at 11:09:15PM -0800, Dilip Simha wrote: I completely understand the reasoning behind this reclamation logic and I also agree to it. But my question is with the allocation logic. I don't understand why XFS allocates more than necessary blocks when this flag is set and when it knows that its not going to clean up the additional space. A simple example would be: 1: Open File in Write mode. 2: Fallocate 256K 3: Write 256K 4: Close File Stat shows that XFS allocated 512 blocks as expected. 5: Open file in append mode. 6: Write 256 bytes. 7: Close file. Expectation is that the number of blocks allocated is either 512+1 or 512+8 depending on the block size. However, XFS uses speculative preallocation to allocate 512K (as per your explanation) to write 256 bytes and hence the overall disk usage goes up to 1536 blocks. Now, who is responsible for clearing up the additional allocated blocks? Clearly the application has no idea about the over-allocation. I agree that if an application uses fallocate and delayed allocation on the same file in the same IO, then its a badly structured application. But in this case we have two different IOs on the same file. The first IO did not expect an append and hence issued an fallocate. So that looks good to me. Your thoughts on this? Regards, Dilip
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH 1/3] direct-io: always call ->end_io if non-NULL, Christoph Hellwig |
|---|---|
| Next by Date: | Re: Request for information on bloated writes using Swift, Dilip Simha |
| Previous by Thread: | Re: Request for information on bloated writes using Swift, Dilip Simha |
| Next by Thread: | Re: Request for information on bloated writes using Swift, Dilip Simha |
| Indexes: | [Date] [Thread] [Top] [All Lists] |