Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hFi7H-0002gM-BY for pgsql-hackers@arkaria.postgresql.org; Sun, 14 Apr 2019 16:36:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hFi7F-0000in-O9 for pgsql-hackers@arkaria.postgresql.org; Sun, 14 Apr 2019 16:36:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hFi7F-0000ig-FW for pgsql-hackers@lists.postgresql.org; Sun, 14 Apr 2019 16:36:25 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hFi7C-0000jK-Jw for pgsql-hackers@postgresql.org; Sun, 14 Apr 2019 16:36:24 +0000 Received: by mail-wm1-x335.google.com with SMTP id v14so17091705wmf.2 for ; Sun, 14 Apr 2019 09:36:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=boW23b8BUcpcfblU6sGDNPVJkFWRuGPWiWfpR++KgqM=; b=m6xTmLnMzWotCkdMORKb9/osxh6xmD14pVNpSRCnC79fpi5Ao45Hp89HpH9idc30s7 rh/1vP8vozB18yBXN+8YplXpHu3H+GgAbL0GoG9fjs4yd3mWkFp4UZ1JO2BKQbmivrEW dVbWf/werwYFc+xN+fVE550C3akeJjg2IcZsf+a2BKmxHSIU5bgef20fG2kIuR51PfYa q+Qev+EiAXJ4wr8Y/Yl7y3bDDUc5HecSmjjJRKm7kYr15C4/W1EkOrg6AvIDYh0hngxI vMOI5kaSqfTQaOUnKQp7eQPG3g9dB/hlHvex846fszSGclZ+iUTS4Nl8OJu61PpHooxa LsqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=boW23b8BUcpcfblU6sGDNPVJkFWRuGPWiWfpR++KgqM=; b=tVFMZgn/dglbpuh8TYJbC1ZCn7mRlmojAyFXCHgFG3C+4oyPCk1vVzAZ4dob/XZfaO wkHZPOWQcmRRPxTPRyvCny96UoM5U+I5Wa1vUEwBV11zNYq5MZdiMe9WoVujpAB3l4/f 6Gcu6A8a7Dtbzzt18CKrLPMMjyn9t725dT6u0u+keBlq7MeHvEf3jdJ6SaN6EC/BNz1R 5ZjY25fNEJzAx+rgsknGxPfCn/QEJFd825QTYcs0yCzioUSjSXrrKNFmlEH7ps2jXx6+ MrFhPptB3OJPfAHt9jrkLzB9BwSeMaHhc52OCcx6srkGx6pG7HKbWUDbm8b+PE6kwvPA 6hFQ== X-Gm-Message-State: APjAAAW50JHmoRDL5uNFKujoqGJBkkz9DuY7+dYZfLVUuvsgzA+FVdVR cMJB/rJTdA7nKR/D/lK04seqhQ== X-Google-Smtp-Source: APXvYqwo6GydBTaGEr8Lwz1D7FWgb///KB7en4N9XJgnVQBb0/1HCkWIv4k4Z/Fy3aMlsK6i/SGQDQ== X-Received: by 2002:a7b:c1cf:: with SMTP id a15mr18017324wmj.44.1555259781106; Sun, 14 Apr 2019 09:36:21 -0700 (PDT) Received: from localhost (ip-86-49-243-43.net.upcbroadband.cz. [86.49.243.43]) by smtp.gmail.com with ESMTPSA id d14sm67986722wro.79.2019.04.14.09.36.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 14 Apr 2019 09:36:20 -0700 (PDT) Date: Sun, 14 Apr 2019 18:36:18 +0200 From: Tomas Vondra To: Konstantin Knizhnik Cc: Andreas Karlsson , Ashwin Agrawal , Mark Kirkwood , PostgreSQL mailing lists Subject: Re: Zedstore - compressed in-core columnar storage Message-ID: <20190414163618.x2bhtfwdulhah7o5@development> References: <6A2B85A8-1ABD-4F85-981E-C94172D662FD@pivotal.io> <44cafbdf-0a04-64ef-3cf8-6d5b14b68643@postgrespro.ru> <93222d26-2141-acf2-61ef-3127f57e80e6@proxel.se> <59ef6173-6667-8a02-ff7c-a52c8ce05a4f@postgrespro.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <59ef6173-6667-8a02-ff7c-a52c8ce05a4f@postgrespro.ru> User-Agent: NeoMutt/20180716-1444-295967 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Apr 11, 2019 at 04:52:33PM +0300, Konstantin Knizhnik wrote: > On 11.04.2019 16:18, Andreas Karlsson wrote: > > On 4/11/19 10:46 AM, Konstantin Knizhnik wrote: > > This my results of compressing pbench data using different > compressors: > > +-------------------------------------------------------------+ > |Configuration |Size (Gb) |Time (sec) | > |---------------------------+----------------+----------------| > |no compression |15.31 |92 | > |---------------------------+----------------+----------------| > |zlib (default level) |2.37 |284 | > |---------------------------+----------------+----------------| > |zlib (best speed) |2.43 |191 | > |---------------------------+----------------+----------------| > |postgres internal lz |3.89 |214 | > |---------------------------+----------------+----------------| > |lz4 |4.12 |95 | > |---------------------------+----------------+----------------| > |snappy |5.18 |99 | > |---------------------------+----------------+----------------| > |lzfse |2.80 |1099 | > |---------------------------+----------------+----------------| > |(apple) 2.80 1099 |1.69 |125 | > +-------------------------------------------------------------+ > > You see that zstd provides almost 2 times better compression ration > and almost at the same speed. > > What is "(apple) 2.80 1099"? Was that intended to be zstd? > > Andreas > > Ugh... > Cut and paste problems. > The whole document can be found here: > http://garret.ru/PageLevelCompression.pdf > > lzfse (apple)       2.80    1099 > zstd (facebook)  1.69    125 > > ztsd is compression algorithm proposed by facebook:  > https://github.com/facebook/zstd > Looks like it provides the best speed/compress ratio result. > I think those comparisons are cute and we did a fair amount of them when considering a drop-in replacement for pglz, but ultimately it might be a bit pointless because: (a) it very much depends on the dataset (one algorithm may work great on one type of data, suck on another) (b) different systems may require different trade-offs (high ingestion rate vs. best compression ratio) (c) decompression speed may be much more important What I'm trying to say is that we shouldn't obsess about picking one particular algorithm too much, because it's entirely pointless. Instead, we should probably design the system to support different compression algorithms, ideally at column level. Also, while these general purpose algorithms are nice, what I think will be important in later stages of colstore development will be compression algorithms allowing execution directly on the compressed data (like RLE, dictionary and similar approaches). regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services