From owner-freebsd-fs@FreeBSD.ORG Tue Mar 4 20:33:58 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A900FA77 for ; Tue, 4 Mar 2014 20:33:58 +0000 (UTC) Received: from mail-wg0-f51.google.com (mail-wg0-f51.google.com [74.125.82.51]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 405DA776 for ; Tue, 4 Mar 2014 20:33:58 +0000 (UTC) Received: by mail-wg0-f51.google.com with SMTP id a1so73812wgh.10 for ; Tue, 04 Mar 2014 12:33:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=ZTibA7ZNMFxxmEer4Ia1TRT9qPWSwUWIYABar2wy66U=; b=F21HGOIHb32MvBcO4YK8szKenZuO60jviZx2mat4BxjEIY5jGVAwTOVBaQmxjrVB1F uEKMJAQhAL70aHnTCjqXvjj3CWTx98r2/bqxH5SC1P36yqRtilak7QvjRHKfuKbUn+sB Ghre/F0iVZ44iL+6ndNeqnfH74FCSYn9PKqUyLYjdWEIdrSsx6tvA4BVFUPqM93BRfqw dn4FC7whnQpZ9vYLcCi5oaW41p2YxjE8uEWB8eJF/om7nQ34RNdlHw7vVVAD/drfmyc6 5pNrN8fWLBtU7YTQ+Ifyx83qZfT96WVaJTKnHfcBJLT+W4NwN8GMdMVgBBIMs17ZcdU/ 1MYQ== X-Gm-Message-State: ALoCoQlT6Sh8Ehj9RJsoTy6zTS0UR2M/XutQYQexRv6dpWwf+o/zbvKWZYXdQhYt/61M7QVlw33M MIME-Version: 1.0 X-Received: by 10.194.75.225 with SMTP id f1mr2138825wjw.87.1393965236528; Tue, 04 Mar 2014 12:33:56 -0800 (PST) Received: by 10.227.92.198 with HTTP; Tue, 4 Mar 2014 12:33:56 -0800 (PST) In-Reply-To: <5315D446.3040701@freebsd.org> References: <53157CC2.8080107@FreeBSD.org> <5315D446.3040701@freebsd.org> Date: Tue, 4 Mar 2014 21:33:56 +0100 Message-ID: Subject: Re: Is LZ4 compression of the ZFS L2ARC available in any RELEASE/STABLE? From: Olav Gjerde To: Matthew Seaman , freebsd-fs@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.17 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2014 20:33:58 -0000 I managed to mess up who I replied to and Matthew replied back with a good answer which I think didn't reach the mailing list. I actually have a problem with query performance in one of my databases related to running PostgreSQL on ZFS. Which is why I'm so interested in compression for the L2ARC Cache. The problem is random IO read were creating a report were I aggregate 75000 rows takes 30 minutes!!! The table that I query has 400 million rows though. The dataset easily fit in memory, so if I run the same query again it takes less than a second. I'm going to test UFS with my dataset, it may be a lot faster as you said. Currently I've only tested ZFS with gzip, lz4 and no compression. Gzip and no compression has about the same performance and LZ4 is about 20% faster(for both read and write). LZ4 has a compressratio about 2.5 and gzip9 has a compressratio that is about 4.5 Steven Hartland, thank you for your suggestion. I will try the 10-STABLE then instead of a RELEASE. On Tue, Mar 4, 2014 at 2:25 PM, Matthew Seaman wrote: > On 03/04/14 12:17, Olav Gjerde wrote: > > This is really great, I wonder how well it plays together with PostgreS= QL > > and a SSD. > > You probably *don't* want to turn on any sort of compression for a > Postgresql cluster's data area (ie. /usr/local/pgsql) -- and there are a > bunch of other tuning things to make ZFS and Pg play well together, like > adjusting the ZFS block size. The sort of small random IOs that RDBMSes > do are hard work for any filesystem, but particularly difficult for ZFS > due to the copy-on-write semantics it uses. It's a lot easier to get > good performance on a UFS partition. > > On the other hand, ZFS has recently grown TRIM support, which makes it a > much happier prospect on SSDs. > > Cheers, > > Matthew > > > > --=20 Olav Gr=F8n=E5s Gjerde