pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedPerformance hit if I create multiple DBs on same instance
10+ messages / 6 participants
[nested] [flat]
* Performance hit if I create multiple DBs on same instance
@ 2020-11-24 14:36 David Gauthier <davegauthierpg@gmail.com>
2020-11-24 15:13 ` Re: Performance hit if I create multiple DBs on same instance David G. Johnston <david.g.johnston@gmail.com>
2020-11-24 15:15 ` Re: Performance hit if I create multiple DBs on same instance Adrian Klaver <adrian.klaver@aklaver.com>
2020-11-24 17:34 ` Re: Performance hit if I create multiple DBs on same instance Ron <ronljohnsonjr@gmail.com>
0 siblings, 3 replies; 10+ messages in thread
From: David Gauthier @ 2020-11-24 14:36 UTC (permalink / raw)
To: pgsql-general
Hi:
11.3 on linux
I've come up with a plan to archive data from my main DB which involves
creating other DBs on the same server. But even though there will be zero
activity on the archive DBs in terms of insert/update/delete, and almost no
activity in terms of select, I'm still worried that the mere existence of
these other DBs will steal resources away from the instance and degrade
performance in my main DB. So my question is whether or not that worry is
valid or not.
Thanks in Advance for any help !
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Performance hit if I create multiple DBs on same instance
2020-11-24 14:36 Performance hit if I create multiple DBs on same instance David Gauthier <davegauthierpg@gmail.com>
@ 2020-11-24 15:13 ` David G. Johnston <david.g.johnston@gmail.com>
2 siblings, 0 replies; 10+ messages in thread
From: David G. Johnston @ 2020-11-24 15:13 UTC (permalink / raw)
To: David Gauthier <davegauthierpg@gmail.com>; +Cc: pgsql-general
On Tue, Nov 24, 2020 at 7:36 AM David Gauthier <davegauthierpg@gmail.com>
wrote:
> Hi:
>
> 11.3 on linux
>
> I've come up with a plan to archive data from my main DB which involves
> creating other DBs on the same server. But even though there will be zero
> activity on the archive DBs in terms of insert/update/delete, and almost no
> activity in terms of select, I'm still worried that the mere existence of
> these other DBs will steal resources away from the instance and degrade
> performance in my main DB. So my question is whether or not that worry is
> valid or not.
>
> Thanks in Advance for any help !
>
As long as you use the same cluster there shouldn't be any material
difference between having multiple tables in the same database and those
tables existing in another database in the same cluster. The cluster-level
resources are the same in either case and have the same number of objects
to worry about.
David J.
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Performance hit if I create multiple DBs on same instance
2020-11-24 14:36 Performance hit if I create multiple DBs on same instance David Gauthier <davegauthierpg@gmail.com>
@ 2020-11-24 15:15 ` Adrian Klaver <adrian.klaver@aklaver.com>
2020-11-24 15:33 ` Re: Performance hit if I create multiple DBs on same instance David Gauthier <davegauthierpg@gmail.com>
2 siblings, 1 reply; 10+ messages in thread
From: Adrian Klaver @ 2020-11-24 15:15 UTC (permalink / raw)
To: David Gauthier <davegauthierpg@gmail.com>; pgsql-general
On 11/24/20 6:36 AM, David Gauthier wrote:
> Hi:
>
> 11.3 on linux
>
> I've come up with a plan to archive data from my main DB which involves
> creating other DBs on the same server. But even though there will be
> zero activity on the archive DBs in terms of insert/update/delete, and
> almost no activity in terms of select, I'm still worried that the mere
> existence of these other DBs will steal resources away from the instance
> and degrade performance in my main DB. So my question is whether or not
> that worry is valid or not.
The primary resource I see they taking is storage. If you have adequate
space so that the primary and archive databases can grow into it then I
don't see a problem on that score. There will also be some additional
overhead for the automatic VACUUM and ANALYZE operations. Since the
archive databases are quiescent that will be on the order of monitoring
not really processing.
>
> Thanks in Advance for any help !
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Performance hit if I create multiple DBs on same instance
2020-11-24 14:36 Performance hit if I create multiple DBs on same instance David Gauthier <davegauthierpg@gmail.com>
2020-11-24 15:15 ` Re: Performance hit if I create multiple DBs on same instance Adrian Klaver <adrian.klaver@aklaver.com>
@ 2020-11-24 15:33 ` David Gauthier <davegauthierpg@gmail.com>
2020-11-24 15:47 ` Re: Performance hit if I create multiple DBs on same instance Bruce Momjian <bruce@momjian.us>
2020-11-24 15:47 ` Re: Performance hit if I create multiple DBs on same instance Adrian Klaver <adrian.klaver@aklaver.com>
0 siblings, 2 replies; 10+ messages in thread
From: David Gauthier @ 2020-11-24 15:33 UTC (permalink / raw)
To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: pgsql-general
Ok, thanks.
I was also planning on manually running vacuum, reindex and analyze on the
main DB after removing the data from the main DB after archiving. Does
that sound necessary and reasonable ?
On Tue, Nov 24, 2020 at 10:15 AM Adrian Klaver <adrian.klaver@aklaver.com>
wrote:
> On 11/24/20 6:36 AM, David Gauthier wrote:
> > Hi:
> >
> > 11.3 on linux
> >
> > I've come up with a plan to archive data from my main DB which involves
> > creating other DBs on the same server. But even though there will be
> > zero activity on the archive DBs in terms of insert/update/delete, and
> > almost no activity in terms of select, I'm still worried that the mere
> > existence of these other DBs will steal resources away from the instance
> > and degrade performance in my main DB. So my question is whether or not
> > that worry is valid or not.
>
> The primary resource I see they taking is storage. If you have adequate
> space so that the primary and archive databases can grow into it then I
> don't see a problem on that score. There will also be some additional
> overhead for the automatic VACUUM and ANALYZE operations. Since the
> archive databases are quiescent that will be on the order of monitoring
> not really processing.
>
> >
> > Thanks in Advance for any help !
>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com
>
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Performance hit if I create multiple DBs on same instance
2020-11-24 14:36 Performance hit if I create multiple DBs on same instance David Gauthier <davegauthierpg@gmail.com>
2020-11-24 15:15 ` Re: Performance hit if I create multiple DBs on same instance Adrian Klaver <adrian.klaver@aklaver.com>
2020-11-24 15:33 ` Re: Performance hit if I create multiple DBs on same instance David Gauthier <davegauthierpg@gmail.com>
@ 2020-11-24 15:47 ` Bruce Momjian <bruce@momjian.us>
1 sibling, 0 replies; 10+ messages in thread
From: Bruce Momjian @ 2020-11-24 15:47 UTC (permalink / raw)
To: David Gauthier <davegauthierpg@gmail.com>; +Cc: Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-general
On Tue, Nov 24, 2020 at 10:33:46AM -0500, David Gauthier wrote:
> Ok, thanks.
>
> I was also planning on manually running vacuum, reindex and analyze on the main
> DB after removing the data from the main DB after archiving. Does that sound
> necessary and reasonable ?
This blog entry summarizes the various levels of isolation and their
benefits:
https://momjian.us/main/blogs/pgblog/2012.html#April_23_2012
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EnterpriseDB https://enterprisedb.com
The usefulness of a cup is in its emptiness, Bruce Lee
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Performance hit if I create multiple DBs on same instance
2020-11-24 14:36 Performance hit if I create multiple DBs on same instance David Gauthier <davegauthierpg@gmail.com>
2020-11-24 15:15 ` Re: Performance hit if I create multiple DBs on same instance Adrian Klaver <adrian.klaver@aklaver.com>
2020-11-24 15:33 ` Re: Performance hit if I create multiple DBs on same instance David Gauthier <davegauthierpg@gmail.com>
@ 2020-11-24 15:47 ` Adrian Klaver <adrian.klaver@aklaver.com>
1 sibling, 0 replies; 10+ messages in thread
From: Adrian Klaver @ 2020-11-24 15:47 UTC (permalink / raw)
To: David Gauthier <davegauthierpg@gmail.com>; +Cc: pgsql-general
On 11/24/20 7:33 AM, David Gauthier wrote:
> Ok, thanks.
>
> I was also planning on manually running vacuum, reindex and analyze on
> the main DB after removing the data from the main DB after archiving.
> Does that sound necessary and reasonable ?
Sounds reasonable.
>
> On Tue, Nov 24, 2020 at 10:15 AM Adrian Klaver
> <adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>> wrote:
>
> On 11/24/20 6:36 AM, David Gauthier wrote:
> > Hi:
> >
> > 11.3 on linux
> >
> > I've come up with a plan to archive data from my main DB which
> involves
> > creating other DBs on the same server. But even though there
> will be
> > zero activity on the archive DBs in terms of
> insert/update/delete, and
> > almost no activity in terms of select, I'm still worried that the
> mere
> > existence of these other DBs will steal resources away from the
> instance
> > and degrade performance in my main DB. So my question is whether
> or not
> > that worry is valid or not.
>
> The primary resource I see they taking is storage. If you have adequate
> space so that the primary and archive databases can grow into it then I
> don't see a problem on that score. There will also be some additional
> overhead for the automatic VACUUM and ANALYZE operations. Since the
> archive databases are quiescent that will be on the order of monitoring
> not really processing.
>
> >
> > Thanks in Advance for any help !
>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Performance hit if I create multiple DBs on same instance
2020-11-24 14:36 Performance hit if I create multiple DBs on same instance David Gauthier <davegauthierpg@gmail.com>
@ 2020-11-24 17:34 ` Ron <ronljohnsonjr@gmail.com>
2020-11-25 14:59 ` Re: Performance hit if I create multiple DBs on same instance Laurenz Albe <laurenz.albe@cybertec.at>
2 siblings, 1 reply; 10+ messages in thread
From: Ron @ 2020-11-24 17:34 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
On 11/24/20 8:36 AM, David Gauthier wrote:
> Hi:
>
> 11.3 on linux
>
> I've come up with a plan to archive data from my main DB which involves
> creating other DBs on the same server. But even though there will be zero
> activity on the archive DBs in terms of insert/update/delete, and almost
> no activity in terms of select, I'm still worried that the mere existence
> of these other DBs will steal resources away from the instance and degrade
> performance in my main DB.
*Why?* If the data is just sitting there like a dead lump, it's not using
any RAM or CPU cycles... And if you're afraid of autovacuum and autoanalyze
stealing resources, then disable them (at the table level).
--
Angular momentum makes the world go 'round.
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Performance hit if I create multiple DBs on same instance
2020-11-24 14:36 Performance hit if I create multiple DBs on same instance David Gauthier <davegauthierpg@gmail.com>
2020-11-24 17:34 ` Re: Performance hit if I create multiple DBs on same instance Ron <ronljohnsonjr@gmail.com>
@ 2020-11-25 14:59 ` Laurenz Albe <laurenz.albe@cybertec.at>
2020-11-25 15:54 ` Re: Performance hit if I create multiple DBs on same instance Ron <ronljohnsonjr@gmail.com>
2020-11-25 17:09 ` Re: Performance hit if I create multiple DBs on same instance Bruce Momjian <bruce@momjian.us>
0 siblings, 2 replies; 10+ messages in thread
From: Laurenz Albe @ 2020-11-25 14:59 UTC (permalink / raw)
To: Ron <ronljohnsonjr@gmail.com>; pgsql-general@lists.postgresql.org
On Tue, 2020-11-24 at 11:34 -0600, Ron wrote:
> And if you're afraid of autovacuum and autoanalyze stealing resources, then disable them (at the table level).
Ugh, bad advice.
Better would be to VACUUM (FREEZE) these static table once, then autovacuum
won't ever perform resource consuming activities on them again.
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Performance hit if I create multiple DBs on same instance
2020-11-24 14:36 Performance hit if I create multiple DBs on same instance David Gauthier <davegauthierpg@gmail.com>
2020-11-24 17:34 ` Re: Performance hit if I create multiple DBs on same instance Ron <ronljohnsonjr@gmail.com>
2020-11-25 14:59 ` Re: Performance hit if I create multiple DBs on same instance Laurenz Albe <laurenz.albe@cybertec.at>
@ 2020-11-25 15:54 ` Ron <ronljohnsonjr@gmail.com>
1 sibling, 0 replies; 10+ messages in thread
From: Ron @ 2020-11-25 15:54 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
On 11/25/20 8:59 AM, Laurenz Albe wrote:
> On Tue, 2020-11-24 at 11:34 -0600, Ron wrote:
>> And if you're afraid of autovacuum and autoanalyze stealing resources, then disable them (at the table level).
> Ugh, bad advice.
>
> Better would be to VACUUM (FREEZE) these static table once, then autovacuum
> won't ever perform resource consuming activities on them again.
Good to know.
--
Angular momentum makes the world go 'round.
^ permalink raw reply [nested|flat] 10+ messages in thread
* Re: Performance hit if I create multiple DBs on same instance
2020-11-24 14:36 Performance hit if I create multiple DBs on same instance David Gauthier <davegauthierpg@gmail.com>
2020-11-24 17:34 ` Re: Performance hit if I create multiple DBs on same instance Ron <ronljohnsonjr@gmail.com>
2020-11-25 14:59 ` Re: Performance hit if I create multiple DBs on same instance Laurenz Albe <laurenz.albe@cybertec.at>
@ 2020-11-25 17:09 ` Bruce Momjian <bruce@momjian.us>
1 sibling, 0 replies; 10+ messages in thread
From: Bruce Momjian @ 2020-11-25 17:09 UTC (permalink / raw)
To: Laurenz Albe <laurenz.albe@cybertec.at>; +Cc: Ron <ronljohnsonjr@gmail.com>; pgsql-general@lists.postgresql.org
On Wed, Nov 25, 2020 at 03:59:06PM +0100, Laurenz Albe wrote:
> On Tue, 2020-11-24 at 11:34 -0600, Ron wrote:
> > And if you're afraid of autovacuum and autoanalyze stealing resources, then disable them (at the table level).
>
> Ugh, bad advice.
>
> Better would be to VACUUM (FREEZE) these static table once, then autovacuum
> won't ever perform resource consuming activities on them again.
Yes, also, even if you never do that, autovacuum will eventually freeze
those tables and never access them again.
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EnterpriseDB https://enterprisedb.com
The usefulness of a cup is in its emptiness, Bruce Lee
^ permalink raw reply [nested|flat] 10+ messages in thread
end of thread, other threads:[~2020-11-25 17:09 UTC | newest]
Thread overview: 10+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-11-24 14:36 Performance hit if I create multiple DBs on same instance David Gauthier <davegauthierpg@gmail.com>
2020-11-24 15:13 ` David G. Johnston <david.g.johnston@gmail.com>
2020-11-24 15:15 ` Adrian Klaver <adrian.klaver@aklaver.com>
2020-11-24 15:33 ` David Gauthier <davegauthierpg@gmail.com>
2020-11-24 15:47 ` Bruce Momjian <bruce@momjian.us>
2020-11-24 15:47 ` Adrian Klaver <adrian.klaver@aklaver.com>
2020-11-24 17:34 ` Ron <ronljohnsonjr@gmail.com>
2020-11-25 14:59 ` Laurenz Albe <laurenz.albe@cybertec.at>
2020-11-25 15:54 ` Ron <ronljohnsonjr@gmail.com>
2020-11-25 17:09 ` Bruce Momjian <bruce@momjian.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox