public inbox for [email protected]  
help / color / mirror / Atom feed
Poor performance after restoring database from snapshot on AWS RDS
2+ messages / 2 participants
[nested] [flat]

* Poor performance after restoring database from snapshot on AWS RDS
@ 2024-06-03 08:06  Sam Kidman <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Sam Kidman @ 2024-06-03 08:06 UTC (permalink / raw)
  To: [email protected]

We keep the staging environment of our application up to date with
respect to production data by creating a new RDS instance for the
staging environment and restoring the most recent production snapshot
into it.

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.

The staging RDS instance is a smaller size than production (it has
32GB ram and 8 vCPU vs production's 128GB ram and 32 vCPU) but the
performance seems to much worse than this decrease in resources would
account for.

I have seen some advice that vacuum analyze should be run after the
snapshot restore but I thought this was supposed to happen
automatically. If we did run it manually how would that help?

Are there any other tools in postgres we can use to figure out why it
might be so much slower?

Best

--

Sam Kidman

Web Developer

Melbourne






^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Poor performance after restoring database from snapshot on AWS RDS
@ 2024-06-05 08:31  Shammat <[email protected]>
  parent: Sam Kidman <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Shammat @ 2024-06-05 08:31 UTC (permalink / raw)
  To: [email protected]


Sam Kidman schrieb am 03.06.2024 um 10:06:
> 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.
>
> The staging RDS instance is a smaller size than production (it has
> 32GB ram and 8 vCPU vs production's 128GB ram and 32 vCPU) but the
> performance seems to much worse than this decrease in resources would
> account for.
>
> I have seen some advice that vacuum analyze should be run after the
> snapshot restore but I thought this was supposed to happen
> automatically. If we did run it manually how would that help?

autovacuum will kick in eventually - but only after some time (which
is what you are seeing).

In general after a bulk load (e.g. restore of a backup or importing
data in any other way) running vacuum to udpate statistics is highly
recommended






^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2024-06-05 08:31 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-06-03 08:06 Poor performance after restoring database from snapshot on AWS RDS Sam Kidman <[email protected]>
2024-06-05 08:31 ` Shammat <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox