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 1iRmaA-0002lN-Bt for pgsql-performance@arkaria.postgresql.org; Tue, 05 Nov 2019 00:20:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iRmZB-0008Rl-4c for pgsql-performance@arkaria.postgresql.org; Tue, 05 Nov 2019 00:19:25 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iRmZA-0008Ra-Op for pgsql-performance@lists.postgresql.org; Tue, 05 Nov 2019 00:19:24 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iRmZ8-0004op-05 for pgsql-performance@lists.postgresql.org; Tue, 05 Nov 2019 00:19:23 +0000 Received: by mail-wm1-x343.google.com with SMTP id m17so9486595wmi.5 for ; Mon, 04 Nov 2019 16:19:21 -0800 (PST) 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=jLxzz8djQd0B3bKNNI11FNcKYI6NW7nJcIapdO+DQ0g=; b=baQrgd8vJhWxi21APGceYj0FrRPLD0QOeT9xzwLaKq5lB00Y/T8/9dweEiWcJAUXnC 7lyZTo6Bggp6sCQofiFbuCWPa/tAoLseIt/ho94uV5fD+7pz4BMJt+9BTm3c0rgSeDOc Wv/Jt/WxQe+mSmW4f/XsFq643IIGTd00ErtQMNzVP9cPfHp6X8kd2r6wmRmRC2JpP0dY DbxZGlIqvkz7wGHBUtclLW6f/jr/brGJvcO2yBeK/RqpypD9MktWmkkAcd3OIbJnGL4Z Q/ydkmB2t4mcle0qN00m4EMhg8w2e3nA6KC2Ir6qstVSx6dIAMCuoH6rbD8FWZG5cYqD mXdA== 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=jLxzz8djQd0B3bKNNI11FNcKYI6NW7nJcIapdO+DQ0g=; b=GxMH0QfAYi8Bl/QBD8VUnDR/yeL9M0x8V99YBgMvU2/aHKnILaBKYzGHZsoiIwNGiE t92/IhayA1oHRDQpLXaGHKw0E6vTe2DLvpUlYbKU+VozK4TJCB4ML0+/tfZ5FaC8uyz+ Yc9L/MG+uq1lXJYwqrbFP92TIvQ47xHJWbQToxgPc82N3sorLeRlLODIOXDKrbtAS/+Y Q2xpX+fnAwAC3iSiOhzcbTiy7dTHg173ZHu1slZiDmGCutb9h/4dAS9HLZBekbuyiEza Fa4Kf8pKZzelEhV6My3aFe79GTfbH6S2w3gHMUiMeznjjgd3oqktA/OnhWSJKI5UigWV B4Lg== X-Gm-Message-State: APjAAAV1D5EQznOSOlI6THW0lXnKSyEJq3TBtM/TIO6PUv4N8smqAFVY p1EjJPNKa2cca2CmKOJSa7A1XQ== X-Google-Smtp-Source: APXvYqxh8JaD5ZyYS9YlB0OMGkE2+3mni9lZDHGTKnxFOL7263JGlDOP4tVJCSDojHiZ7kvAULzL9Q== X-Received: by 2002:a1c:5f42:: with SMTP id t63mr1402474wmb.163.1572913160569; Mon, 04 Nov 2019 16:19:20 -0800 (PST) Received: from localhost (ip-86-49-253-183.net.upcbroadband.cz. [86.49.253.183]) by smtp.gmail.com with ESMTPSA id r13sm29283218wra.74.2019.11.04.16.19.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Nov 2019 16:19:17 -0800 (PST) Date: Tue, 5 Nov 2019 01:19:15 +0100 From: Tomas Vondra To: Gunther Cc: "pgsql-performance@lists.postgresql.org" Subject: Re: FPGA optimization ... Message-ID: <20191105001915.w7js3knyfvlznu6m@development> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20180716 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, Nov 04, 2019 at 06:33:15PM -0500, Gunther wrote: >The time has come. > >FPGA optimization is in the palm of our hands (literally a 2 TB 40 >GB/s IO PostgreSQL server fits into less than a shoe box), and on >Amazon AWS F1 instances. > >Some demos are beginning to exist: https://github.com/Xilinx/data-analytics. > > >But a lot more could be done. How about linear sort performance at >O(N)? https://hackaday.com/2016/01/20/a-linear-time-sorting-algorithm-for-fpgas/. >And how about ​https://people.csail.mit.edu/wjun/papers/fccm2017.pdf, >the following four sorting accelerators are used: > > * Tuple Sorter : Sorts an N-tuple using a sorting network. > * Page Sorter : Sorts an 8KB (a flash page) chunk of sorted N-tuples > in on-chip memory. > * Super-Page Sorter : Sorts 16 8K-32MB sorted chunks in DRAM. > * Storage-to-Storage Sorter: Sorts 16 512MB or larger sorted chunks in > flash. > >Order of magnitude speed improvements? Better than Hadoop clusters on >a single chip? 40 GB/s I/O throughput massive full table scan, blazing >fast sort-merge joins? Here it is. Anybody working more on that? >Should be an ideal project for a student or a group of students. > For the record, this is not exactly a new thing. Netezza (a PostgreSQL fork started in 1999 IBM) used FPGAs. Now there's swarm64 [1], another PostgreSQL fork, also using FPGAs with newer PostgreSQL releases. Those are proprietary forks, though. The main reason why the community itself is not working on this directly (at least not on pgsql-hackers) is exactly that it requires specialized hardware, which the devs probably don't have, making development impossible, and the regular customers are not asking for it either (one of the reasons being limited availability of such hardware, especially for customers running in the cloud and not being even able to deploy custom appliances). I don't think this will change, unless the access to systems with FPGAs becomes much easier (e.g. if AWS introduces such instance type). >Is there a PostgreSQL foundation I could donate to, 501(c)(3) tax >exempt? I can donate and possibly find some people at Purdue >University who might take this on. Interest? > I don't think there's any such non-profit, managing/funding development. At least I'm not avare of it. There are various non-profits around the world, but those are organizing events and local communities. I'd say the best way to do something like this is to either talk to one of the companies participating in PostgreSQL devopment (pgsql-hackers is probably a good starting point), or - if you absolutely need to go through a non-profit - approach a university (which does not mean people from pgsql-hackers can't be involved, of course). I've been involved in a couple of such research projects in Europe, not sure what exactly is the situation/rules in US. regards [1] https://swarm64.com/netezza-replacement/ -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services