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 1mzNTD-0004M9-Sf for pgsql-novice@arkaria.postgresql.org; Mon, 20 Dec 2021 18:33:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mzNTC-00033c-1o for pgsql-novice@arkaria.postgresql.org; Mon, 20 Dec 2021 18:33:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mzNTB-0002yz-LY for pgsql-novice@lists.postgresql.org; Mon, 20 Dec 2021 18:33:09 +0000 Received: from mail-io1-xd30.google.com ([2607:f8b0:4864:20::d30]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mzNT9-0005Ai-56 for pgsql-novice@lists.postgresql.org; Mon, 20 Dec 2021 18:33:08 +0000 Received: by mail-io1-xd30.google.com with SMTP id e128so14581684iof.1 for ; Mon, 20 Dec 2021 10:33:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=gitbd5TjsHs+BenZWlkRykSEVfb6kO07Oi735OEOY60=; b=LAEXU44RTWpSNvyJKCJbSAViGBZJHFT/HCBrfPbZ35APy/5scdRb6pT/nNLwkViqlm /THA4ceJWtkXrzHpmExMYGZA8CoTUYN3KkT5IC63clsrFPqkZtfkr5gD6+s1qdu8fvZB ej8eJBZWqbktHwuj7oOYfsKvoH2kY371BR0AmGPf3dU2ue5ICWcqBd9RgcGJ4F1mCS76 FXLPn8MDI0VSxmqqcaS9jVpFF0niKPowPnXAsCouoo4EvpQ+Yi8h9l2Dr2I96cTmA5ZR voBwNARy4gyFsaT1gdBqBQ8Z1sZz658ZoyCnwBaue8bcGhfgaSU6B6HHIpaBZPUF2JOk dA4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=gitbd5TjsHs+BenZWlkRykSEVfb6kO07Oi735OEOY60=; b=Azf21i3xmw71T0/siBP5LAHp548Ym2sq9ujpMxudusKTqeDVzTa6KdgO8hx5qqVE3V VyUW9BcaXIBHn+rxp9dWATHSkWNJfjmN1wFx5S3VYffVX2MAzNa1wvBOOYfDWrEnL7PY NaPPzODm+3sZEspNa2TGwPxw5n50HVqknnY+jQ7axBGigDxnZktJCmY6W31f7Uf7y1JI VGu9dW9kbxSTowr2VVi83JZqO6y7d02qS7vw+dRwIBbq5IXgNMMkWTOlaHRpsNFPBshA /kLPL/soZ/nbDVDBVnBY0Xw67Dj1NcM//4kDXVQGqXBgMzps/vkBoKQ2ebMsh7K/7fYd JUGw== X-Gm-Message-State: AOAM533m5MhaPptjqf29vwUmZ8Ji4z8zSbOLbwqEF4Cf8tzjM5a7TzAq DzJ68GLYhi4TNh5gd3IgM8Pr5YcyU+7D26f9B7ve67K6dwg= X-Google-Smtp-Source: ABdhPJysnj3y2D/tN4PE39BNcfvD7GbABHxXNtwHtMnOxsJBeCvxtokuIPMHiUJi63eJFTSjqUaYo/tSUyGjpWi0Z2c= X-Received: by 2002:a05:6602:1407:: with SMTP id t7mr9217180iov.78.1640025185684; Mon, 20 Dec 2021 10:33:05 -0800 (PST) MIME-Version: 1.0 From: Jean Baro Date: Mon, 20 Dec 2021 15:33:01 -0300 Message-ID: Subject: Would PostgreSQL adapt to a HYPOTHETICAL hardware that grows and shrinks as load increases? To: pgsql-novice@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000009d93e705d3981eeb" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000009d93e705d3981eeb Content-Type: text/plain; charset="UTF-8" Hi there, Let's imagine there is a type of Server(Physical, Unikernel, or Hypervisor, doesn't matter here) that could allocate more RAM, IO bus, Network bandwidth, or CPU power through API calls. The increase or decrease would take a few milliseconds to effectively take place. This hypothetical VM would receive commands from external monitoring tools that detect load and complex queries (through statistics and ML) and would decide to adjust the VM size accordingly, I have a rough idea how complex (or impossible) it would be for ANY modern database to rely on an always-changing "hardware". As there are many CORE datasets in memory and statistics around the hardware, so changing this every now and then seems to require a completely different strategy. I am not an expert but as I see more and more Serverless solutions tackling RDBMS, and PostgreSQL being the leader in the cloud world, I was wondering if one day PostgreSQL could take advantage of these scalable VMs. - It seems to me that scaling up could be less complex, as PG wouldn't have to select what to invalidate from its cache layers and statistics. - Statistics would be affected every time the size of the instance changes - The instance should probably have a minimum size to avoid cold starts. So scaling to zero wouldn't be possible. - If the server where the VM/Unikernel is running has no more available resources to grow, what should be done (maybe this machine should share resources with SPOT only, so it could forcibly deallocate the spot instances before increasing the size of the DB VM?) Any help to educate me on this would be greatly appreciated, Thanks --0000000000009d93e705d3981eeb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi there,

Let's imag= ine there is a type of Server(Physical, Unikernel, or Hypervisor, doesn'= ;t matter here) that could allocate more RAM, IO bus, Network bandwidth, or= CPU power through API calls. The increase or decrease would take a few mil= liseconds to effectively take place.

This hypothet= ical VM would receive commands from external monitoring tools that detect l= oad and complex queries (through statistics and ML) and would decide to adj= ust the VM size accordingly,

I have a rough idea h= ow complex (or impossible) it would be for ANY modern database to rely on a= n always-changing "hardware". As there are many CORE datasets in = memory and statistics around the hardware, so changing this every now and t= hen seems to require a completely=C2=A0different strategy.

I am not an expert but as I see more and more Serverless solutions= tackling RDBMS, and PostgreSQL being the leader in the cloud world, I was = wondering if one day PostgreSQL could take advantage of these scalable VMs.=
  • It seems to me that scaling up could be less complex, as= PG wouldn't have to select what to invalidate from its cache layers an= d statistics.
  • Statistics would be affected every time the size of t= he instance changes
  • The instance should probably have a minimum siz= e to avoid cold starts. So scaling to zero wouldn't be possible.
  • If the server where the VM/Unikernel is running has no more available res= ources to grow, what should be done (maybe this machine should share resour= ces with SPOT only, so it could forcibly deallocate the spot instances befo= re increasing the size of the DB VM?)
Any help to educa= te me on this would be=C2=A0greatly appreciated,

Thanks=C2=A0
--0000000000009d93e705d3981eeb--