Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1keh2Y-0006rw-LU for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Nov 2020 16:07:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1keh2X-00007X-KV for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Nov 2020 16:07:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1keh2X-00007O-9k for pgsql-hackers@lists.postgresql.org; Mon, 16 Nov 2020 16:07:37 +0000 Received: from mail-ej1-x641.google.com ([2a00:1450:4864:20::641]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1keh2T-0008OB-S1 for pgsql-hackers@postgresql.org; Mon, 16 Nov 2020 16:07:36 +0000 Received: by mail-ej1-x641.google.com with SMTP id y17so19515838ejh.11 for ; Mon, 16 Nov 2020 08:07:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=RiAgWUjLuMfJ+C4JXgoT1hLyIxagqa5G4xB83BgI8Ik=; b=UQeXjOtcM7EfpUrFYd5s6mVH/9dwvcI1FNDmKF9+HLdnQKcs22w0EFH0LyHkQETxcv ShA2xIo/DK6BVd3ldFnsjC+qjvEKlhrVhkYucAtD7JjpU/lHIoGi03myzQQPx2boz6I+ +cGWoeP+bRLLFetW72aTar6PO+uqS/Jrtt9VnFMzaiKrFgtJqqYJX/QxWvVLz8R5QD6e wz5380H1XmBwUWuSP7cO8fzSp9XwnQ6v/KuiY+Ea/knN9ZsMCfs6RAuvvyj9/GYCIhTm CoGEEOhFlu0NHBwXzKsXAYpzP53bsqzwtW6t/Vti5eC+MTtXc/wUDTbzE9w2uzkYA6VL R0yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=RiAgWUjLuMfJ+C4JXgoT1hLyIxagqa5G4xB83BgI8Ik=; b=sNxjWpRD2Z+TSUmmO1On6gkEsorwLJirRr6GU67sVJNImV5XlMfGBWx/KgZhltvVb8 q2zBdk5/bVrzhetGtEwUtfJ7DxZHl+BCl25P4ZLPAdiau2hCtJvbGJl3Jv4jJzU7BarE NJy0Vty5s9u342zObg1T4LYJ3H+kw+n8V679/crhiFdAo5pNlGgqgWozUM4D21epOJ4g M1aLl0qlp0TrTIsXpSC7gpA74hab7rVXkAEIGjEwmHuJettdLdyvMEBriFZzUhhFTHvE ZsElRBiI2MVuho6YHtLvhdqyvEgwCfxsYFZeZLwyyct+O8hZZTNiUwcogyP9KoB9ZI1i wdOw== X-Gm-Message-State: AOAM531NyOINc+F2rsc+113zahgIg7i/Q/3x1502K+befOD999qDQrvd y30dxCFC4qrPHKIQJYYrGAbQ/KCMby0Lmb0RTW74kjNaNofL6p6meBoWMtrXv0dryy3+sWut9lq PrScfxLJea9LCYADrBfZlxgiHfCr9ddwT9kuOysp2mMhVoF3PLV/03Rp7RaG09EfZ56u2K6bjMr pnDgXuKiC2am+CtkK6c/CXyhQt5D4Y/wcUFPlC3SysK+XSS9osM2SUHMbE2NkJhTeF+F631AIHU s8sbKxa9qFFCfqozsYEtGXBEMAw+dXv8/CSpGDE X-Google-Smtp-Source: ABdhPJzO081j1uz0Nv/CTbYM8yePN6jNdYnOfuBi4w2vKkyLAcasB8+bTgA/akjiErTrL5X0/WxKCg== X-Received: by 2002:a17:906:2c19:: with SMTP id e25mr11420568ejh.66.1605542851779; Mon, 16 Nov 2020 08:07:31 -0800 (PST) Received: from [10.137.0.4] (ip-86-49-245-76.net.upcbroadband.cz. [86.49.245.76]) by smtp.gmail.com with ESMTPSA id d10sm10637486ejw.44.2020.11.16.08.07.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Nov 2020 08:07:31 -0800 (PST) Subject: Re: Zedstore - compressed in-core columnar storage To: Merlin Moncure Cc: Soumyadeep Chakraborty , Alexandra Wang , Taylor Vesely , Ashutosh Sharma , Heikki Linnakangas , Ashwin Agrawal , DEV_OPS , PostgreSQL mailing lists References: <3554cb64-3c77-ae98-491e-91f3221e37c1@iki.fi> <9e1077bc-c5c1-425b-07ad-424d3522363f@enterprisedb.com> From: Tomas Vondra Message-ID: Date: Mon, 16 Nov 2020 17:07:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 11/16/20 1:59 PM, Merlin Moncure wrote: > On Thu, Nov 12, 2020 at 4:40 PM Tomas Vondra > wrote: >> master zedstore/pglz zedstore/lz4 >> ------------------------------------------------- >> copy 1855 68092 2131 >> dump 751 905 811 >> >> And the size of the lineitem table (as shown by \d+) is: >> >> master: 64GB >> zedstore/pglz: 51GB >> zedstore/lz4: 20GB >> >> It's mostly expected lz4 beats pglz in performance and compression >> ratio, but this seems a bit too extreme I guess. Per past benchmarks >> (e.g. [1] and [2]) the difference in compression/decompression time >> should be maybe 1-2x or something like that, not 35x like here. > > I can't speak to the ratio, but in basic backup/restore scenarios pglz > is absolutely killing me; Performance is just awful; we are cpubound > in backups throughout the department. Installations defaulting to > plgz will make this feature show very poorly. > Maybe. I'm not disputing that pglz is considerably slower than lz4, but judging by previous benchmarks I'd expect the compression to be slower maybe by a factor of ~2x. So the 30x difference is suspicious. Similarly for the compression ratio - lz4 is great, but it seems strange it's 1/2 the size of pglz. Which is why I'm speculating that something else is going on. As for the "plgz will make this feature show very poorly" I think that depends. I think we may end up with pglz doing pretty well (compared to heap), but lz4 will probably outperform that. OTOH for various use cases it may be more efficient to use something else with worse compression ratio, but allowing execution on compressed data, etc. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company