pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedmaintenance_work_mem is it per instance or per database??
4+ messages / 3 participants
[nested] [flat]
* maintenance_work_mem is it per instance or per database??
@ 2018-11-02 04:27 pavan95 <pavan.postgresdba@gmail.com>
0 siblings, 2 replies; 4+ messages in thread
From: pavan95 @ 2018-11-02 04:27 UTC (permalink / raw)
To: pgsql-admin
Hello all,
Is the parameter maintenance_work_mem is per database or per instance??
And while exploring the configuration parameters I'm assuming that the sum
of values(default values) for the parameters maintenance_work_mem(64MB),
work_mem(4MB),temp_buffers(8MB), wal_buffers(4MB) will be equal to the value
of shared buffers(128MB).
But the total corresponds to 80MB where is the remaining part of shared
buffers(48MB) used?? I have read like clog buffers don't have any explicit
parameter to be set, it is tuned automatically by database engine
So will that remaining will be used by the client requests??
Please clarify me. Thanks in advance!!
Regards,
Pavan
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: maintenance_work_mem is it per instance or per database??
@ 2018-11-02 04:43 Keith <keith@keithf4.com>
parent: pavan95 <pavan.postgresdba@gmail.com>
1 sibling, 1 reply; 4+ messages in thread
From: Keith @ 2018-11-02 04:43 UTC (permalink / raw)
To: pavan95 <pavan.postgresdba@gmail.com>; +Cc: pgsql-admin
On Fri, Nov 2, 2018 at 12:28 AM pavan95 <pavan.postgresdba@gmail.com> wrote:
> Hello all,
>
> Is the parameter maintenance_work_mem is per database or per instance??
>
> And while exploring the configuration parameters I'm assuming that the sum
> of values(default values) for the parameters maintenance_work_mem(64MB),
> work_mem(4MB),temp_buffers(8MB), wal_buffers(4MB) will be equal to the
> value
> of shared buffers(128MB).
>
> But the total corresponds to 80MB where is the remaining part of shared
> buffers(48MB) used?? I have read like clog buffers don't have any explicit
> parameter to be set, it is tuned automatically by database engine
>
> So will that remaining will be used by the client requests??
>
> Please clarify me. Thanks in advance!!
>
> Regards,
> Pavan
>
>
>
> --
> Sent from:
> http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html
I highly recommend reading over the Tuning section of the PG wiki for a
pretty good, concise description of how the memory settings work and are
related.
https://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server
As a quick answer, shared_buffers is completely independent from all the
other memory settings you mentioned. shared_buffers is allocated to PG when
the database starts and that memory is always reserved for PG while it is
running. The rest of the ones you mentioned (work_mem,
maintenance_work_mem, etc) are all memory allocations that can be used in
addition to shared_buffers and are allocated on an as-needed basis, some
multiple times each.
I've also written some other blog posts on investigating more detail in how
PG is actually using shared_buffers if you're interested
https://www.keithf4.com/a-large-database-does-not-mean-large-shared_buffers/
https://www.keithf4.com/a-small-database-does-not-mean-small-shared_buffers/
Keith
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: maintenance_work_mem is it per instance or per database??
@ 2018-11-02 05:00 pavan95 <pavan.postgresdba@gmail.com>
parent: Keith <keith@keithf4.com>
0 siblings, 0 replies; 4+ messages in thread
From: pavan95 @ 2018-11-02 05:00 UTC (permalink / raw)
To: pgsql-admin
Thank you Keith for your timely response
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: maintenance_work_mem is it per instance or per database??
@ 2018-11-02 07:05 Shreeyansh Dba <shreeyansh2014@gmail.com>
parent: pavan95 <pavan.postgresdba@gmail.com>
1 sibling, 0 replies; 4+ messages in thread
From: Shreeyansh Dba @ 2018-11-02 07:05 UTC (permalink / raw)
To: pavan95 <pavan.postgresdba@gmail.com>; +Cc: pgsql-admin
Hi Pavan,
Go through this link. hope this will help you.
https://www.postgresql.org/docs/current/static/runtime-config-resource.html#RUNTIME-CONFIG-RESOURCE-...
OR
Architecture and Tuning of Memory in PostgreSQL Databases.
https://severalnines.com/blog/architecture-and-tuning-memory-postgresql-databases
On Fri, Nov 2, 2018 at 9:58 AM pavan95 <pavan.postgresdba@gmail.com> wrote:
> Hello all,
>
> Is the parameter maintenance_work_mem is per database or per instance??
>
> And while exploring the configuration parameters I'm assuming that the sum
> of values(default values) for the parameters maintenance_work_mem(64MB),
> work_mem(4MB),temp_buffers(8MB), wal_buffers(4MB) will be equal to the
> value
> of shared buffers(128MB).
>
> But the total corresponds to 80MB where is the remaining part of shared
> buffers(48MB) used?? I have read like clog buffers don't have any explicit
> parameter to be set, it is tuned automatically by database engine
>
> So will that remaining will be used by the client requests??
>
> Please clarify me. Thanks in advance!!
>
> Regards,
> Pavan
>
>
>
> --
> Sent from:
> http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html
>
>
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2018-11-02 07:05 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-11-02 04:27 maintenance_work_mem is it per instance or per database?? pavan95 <pavan.postgresdba@gmail.com>
2018-11-02 04:43 ` Re: maintenance_work_mem is it per instance or per database?? Keith <keith@keithf4.com>
2018-11-02 05:00 ` Re: maintenance_work_mem is it per instance or per database?? pavan95 <pavan.postgresdba@gmail.com>
2018-11-02 07:05 ` Re: maintenance_work_mem is it per instance or per database?? Shreeyansh Dba <shreeyansh2014@gmail.com>
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