Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sEpSl-003vAl-4W for pgsql-general@arkaria.postgresql.org; Wed, 05 Jun 2024 12:09:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sEpSk-0083sR-OC for pgsql-general@arkaria.postgresql.org; Wed, 05 Jun 2024 12:09:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sEpSk-0083sJ-85 for pgsql-general@lists.postgresql.org; Wed, 05 Jun 2024 12:09:54 +0000 Received: from mail-qv1-xf2e.google.com ([2607:f8b0:4864:20::f2e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sEpSe-000796-9K for pgsql-general@lists.postgresql.org; Wed, 05 Jun 2024 12:09:53 +0000 Received: by mail-qv1-xf2e.google.com with SMTP id 6a1803df08f44-6ae47339ba2so28085756d6.0 for ; Wed, 05 Jun 2024 05:09:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=musicsmith-net.20230601.gappssmtp.com; s=20230601; t=1717589385; x=1718194185; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=HpZD08kiet65i3Ua/4gKogFS8joA5WH6HnN9V4oQ/hc=; b=sofQ0komoYIBHgKIo4UEF+BjIzVIIggFg6lK1FTiiZl+YKx5TqF46BMl+p8Sbmt/4/ gOuB0NzJA/O3CMIdV1pmNUS5JfYc3ypADaKlmdbtoF0kf6UK1o8xZ1QusBOZJ/TYKI+b pjvbXEJ90MYiOyPoHzyy1ppFjBdKwK4PzIsQuZQXI/CirDaFz7OTb/PqnjKC+Fp/qdel zagYj/Iq53/8TO3UW5PJs6d+agzMnzBkeHT3BIAXGpE4ZjwZyaA9zG/Ec6H5S7F5Xb4g SNS18LaFpawgubbxO4e9zTxyvUACFKi01jUUe/zKGYI6R5KkcGexrm2V1i8vJdGSxES7 FnFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717589385; x=1718194185; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HpZD08kiet65i3Ua/4gKogFS8joA5WH6HnN9V4oQ/hc=; b=bKY/CIaRkUN5rxuMWf1dB1AADmZBCO/QDnXg3ocgJD/FLw7bvovAufTSXMq5Kq86k5 uzfFIuP64ZC8KgC46aedRhKHa2xu1hJtU1GRch37yrasPVP//QEyMV2V6LXjboaa/5mS xjfnngVgP1w0ixWDNe9TN2Rti7PPCsEBo62/H9k7IMzvb+7EMzXAtfmJNUEUvumGMMw1 CAIf+N5f/kz10MkVquh7Iun/z2Hvyv9JWR3xsyl2TKdwTgCTzXtn0l2ueVIb9xkmHLYA vC2Y8cn6ndsrFtyeFWCssuSEJh/Mm+luBKCK17bxX/4ySPz/K/3dTWo5WV/KaFYZx3zQ S/Cw== X-Gm-Message-State: AOJu0Yzj7wif58TvFji5h/Z671Fmcg3BMNI3mSzio5LUyXIpVTxZCXhz p3KF2vTo1vmN4dlPERciDSXrmTnnLS/Q/HaiMJtpmFYJ3++bRenl4LH+BPVZUihyL66ugwBxyJP GZZ6P5tHpOp+OoBWgnzdacTBZLTFcuPOjESgL X-Google-Smtp-Source: AGHT+IHFy3p5JCydT3V1R32Dm+xwFERJF4ojMI2Lz4+k01ICTTFAnpy71f9RrK0uwosH6/PXZh8jmI18Aiirzs/eeP0= X-Received: by 2002:a05:6214:19c3:b0:6b0:4542:e42e with SMTP id 6a1803df08f44-6b04542e7e3mr10166346d6.28.1717589385623; Wed, 05 Jun 2024 05:09:45 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jeremy Smith Date: Wed, 5 Jun 2024 08:09:34 -0400 Message-ID: Subject: Re: Poor performance after restoring database from snapshot on AWS RDS To: Sam Kidman Cc: pgsql-general@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Jun 5, 2024 at 4:23=E2=80=AFAM Sam Kidman wrote: > We get very poor performance in the staging environment after this > restore takes place - after some usage it seems to get better perhaps > because of caching. > This is due to the way that RDS restores snapshots. From the docs (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_= RestoreFromSnapshot.html): You can use the restored DB instance as soon as its status is available. The DB instance continues to load data in the background. This is known as lazy loading. If you access data that hasn't been loaded yet, the DB instance immediately downloads the requested data from Amazon S3, and then continues loading the rest of the data in the background. -Jeremy