From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D1F2C433E2 for ; Thu, 3 Sep 2020 19:45:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 13F9920722 for ; Thu, 3 Sep 2020 19:45:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728312AbgICTo7 convert rfc822-to-8bit (ORCPT ); Thu, 3 Sep 2020 15:44:59 -0400 Received: from james.kirk.hungrycats.org ([174.142.39.145]:44594 "EHLO james.kirk.hungrycats.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727065AbgICTo6 (ORCPT ); Thu, 3 Sep 2020 15:44:58 -0400 Received: by james.kirk.hungrycats.org (Postfix, from userid 1002) id D094C7E64BC; Thu, 3 Sep 2020 15:44:54 -0400 (EDT) Date: Thu, 3 Sep 2020 15:44:49 -0400 From: Zygo Blaxell To: Hamish Moffatt Cc: linux-btrfs@vger.kernel.org Subject: Re: new database files not compressed Message-ID: <20200903194437.GA21815@hungrycats.org> References: <41107373-cc61-ea3f-7ae9-c9eef0ee47f9@suse.com> <2d060b13-7a1a-7cc5-927f-2c6a067f9c03@moffatt.email> <0bf29a8c-23b2-26f4-2efd-2e82f38c437d@suse.com> <4c3d4141-4452-bb79-b18e-f32c8e35cb13@moffatt.email> <03ec55ee-5cf3-54fa-1a81-abc93006ca7b@suse.com> <20200902161621.GA5890@hungrycats.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Thu, Sep 03, 2020 at 10:53:23PM +1000, Hamish Moffatt wrote: > On 3/9/20 2:16 am, Zygo Blaxell wrote: > > > > fallocate doesn't make a lot of sense on btrfs, except in the special > > case of nodatacow files without snapshots. fallocate breaks compression, > > and snapshots/reflinks break fallocate. > > > I recompiled Firebird with fallocate disabled (it has a fallback for > non-linux OSs), and now I have compressed database files. > > It may be that de-duplication suits my application better anyway. Will > compsize tell me how much space is being saved by de-duplication, or is > there another way to find out? Compsize reports "Uncompressed" and "Referenced" columns. "Uncompressed" is the physical size of the uncompressed data (i.e. how many bytes you would need to hold all of the extents on disk without compression but with dedupe). "Referenced" is the logical size of the data, after counting each reference (i.e. how many bytes you would need to hold all of the data without compression or dedupe). The "none" and "zstd" rows will tell you how much dedupe you're getting on uncompressed and compressed extents separately. > > Hamish >