[prev in list] [next in list] [prev in thread] [next in thread]
List: postgresql-admin
Subject: Re: Enable huge_pages in PostgreSQL server version 11.2
From: Purav Chovatia <puravc () gmail ! com>
Date: 2019-08-13 5:55:52
Message-ID: CADrzpjHuf9EdMOtUcaPndRMwkOfmgRsr=m2dM-kP6NyGqcJBuA () mail ! gmail ! com
[Download RAW message or body]
You havent mentioned what is the amount of huge pages that you have
configured. Make sure that is slightly higher than the shared_buffer value.
We usually set shared_buffer to 8GB and set the huge pages to 5120 (i.e.
5120 pages of 2mb so a total of 10gb). Setting it exactly to 4096 does not
work.
On Mon, 12 Aug 2019 at 19:18, Suresh Seema <suresh.seema@opsveda.com> wrote:
> Hi Everyone,
>
> We have installed PostgresSQL 11.2 version on Centos 7 and we want
> perform PG benck mark with huge_pages with size of 2MB and 1GB.
> We have modified required kernel parameters ,grub configuration and set
> the huge page count in OS Level .But Postgresql instance is not starting
> with *huge_pages = on* parameters but working with huge_pages = try.
> When we run test with huge_pages = try db parameter huge pages not getting
> utilized.
>
> *Please find PG instance configuration below : *
> *-------------------------*
> max_connections = 200
> shared_buffers = 60GB
> effective_cache_size = 70GB
> maintenance_work_mem = 1024MB
> default_statistics_target = 500
> random_page_cost = 1.2
> effective_io_concurrency = 1000
> work_mem = 256MB
> max_worker_processes = 32
> max_parallel_workers_per_gather = 16
> max_parallel_workers = 32
> enable_parallel_append = on
> enable_parallel_hash = on
> force_parallel_mode = off
> min_parallel_index_scan_size = 64
> min_parallel_table_scan_size = 512
> parallel_leader_participation = off
> parallel_setup_cost = 100
> parallel_tuple_cost = 0.1
> cpu_tuple_cost = 0.01
> temp_buffers = 512MB
> huge_pages = on # on, off, or try
>
> Error:
> # systemctl status postgresql
> ● postgresql.service - PostgreSQL 11 database server
> Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled;
> vendor preset: disabled)
> Active: failed (Result: exit-code) since Mon 2019-08-12 11:52:19 UTC;
> 10min ago
> Docs: https://www.postgresql.org/docs/11/static/
> Process: 6882 ExecStart=/usr/pgsql-11/bin/postmaster -D ${PGDATA}
> (code=exited, status=1/FAILURE)
> Process: 6868 ExecStartPre=/usr/pgsql-11/bin/postgresql-11-check-db-dir
> ${PGDATA} (code=exited, status=0/SUCCESS)
> Main PID: 6882 (code=exited, status=1/FAILURE)
>
> Aug 12 11:52:19 ip-10-1-4-103.ec2.internal postmaster[6882]: 2019-08-12
> 11:52:19.433 UTC [6882] LOG: listening on IPv6 addres... 5432
> Aug 12 11:52:19 ip-10-1-4-103.ec2.internal postmaster[6882]: 2019-08-12
> 11:52:19.434 UTC [6882] LOG: listening on Unix socket...5432"
> Aug 12 11:52:19 ip-10-1-4-103.ec2.internal postmaster[6882]: 2019-08-12
> 11:52:19.438 UTC [6882] LOG: listening on Unix socket...5432"
> Aug 12 11:52:19 ip-10-1-4-103.ec2.internal postmaster[6882]: 2019-08-12
> 11:52:19.441 UTC [6882] FATAL: could not map anonymou...emory
> Aug 12 11:52:19 ip-10-1-4-103.ec2.internal postmaster[6882]: 2019-08-12
> 11:52:19.441 UTC [6882] HINT: This error usually means tha...
> Aug 12 11:52:19 ip-10-1-4-103.ec2.internal postmaster[6882]: 2019-08-12
> 11:52:19.442 UTC [6882] LOG: database system is shut down
> Aug 12 11:52:19 ip-10-1-4-103.ec2.internal systemd[1]: postgresql.service:
> main process exited, code=exited, status=1/FAILURE
> Aug 12 11:52:19 ip-10-1-4-103.ec2.internal systemd[1]: Failed to start
> PostgreSQL 11 database server.
> Aug 12 11:52:19 ip-10-1-4-103.ec2.internal systemd[1]: Unit
> postgresql.service entered failed state.
> Aug 12 11:52:19 ip-10-1-4-103.ec2.internal systemd[1]: postgresql.service
> failed.
> Hint: Some lines were ellipsized, use -l to show in full.
>
> *Please suggest me on this . *
>
>
> --
> Regards,
> Suresh Seema
>
[Attachment #3 (text/html)]
<div dir="ltr">You havent mentioned what is the amount of huge pages that you have \
configured. Make sure that is slightly higher than the shared_buffer value. We \
usually set shared_buffer to 8GB and set the huge pages to 5120 (i.e. 5120 pages of \
2mb so a total of 10gb). Setting it exactly to 4096 does not \
work.<div><br></div></div><br><div class="gmail_quote"><div dir="ltr" \
class="gmail_attr">On Mon, 12 Aug 2019 at 19:18, Suresh Seema <<a \
href="mailto:suresh.seema@opsveda.com">suresh.seema@opsveda.com</a>> \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi \
Everyone,<div><br></div><div>We have installed PostgresSQL 11.2 version on Centos 7 \
and we want perform PG benck mark with huge_pages with size of 2MB and \
1GB.</div><div>We have modified required kernel parameters ,grub configuration and \
set the huge page count in OS Level .But Postgresql instance is not starting with \
<b>huge_pages = on</b> parameters but working with huge_pages = try. When we run \
test with huge_pages = try db parameter huge pages not getting utilized. \
</div><div><b><br></b></div><div><b>Please find PG instance configuration below : \
</b></div><div><b>-------------------------</b></div><div>max_connections = \
200<br>shared_buffers = 60GB<br>effective_cache_size = 70GB<br>maintenance_work_mem = \
1024MB<br>default_statistics_target = 500<br>random_page_cost = \
1.2<br>effective_io_concurrency = 1000<br>work_mem = 256MB<br>max_worker_processes = \
32<br>max_parallel_workers_per_gather = 16<br>max_parallel_workers = \
32<br>enable_parallel_append = on<br>enable_parallel_hash = on<br>force_parallel_mode \
= off<br>min_parallel_index_scan_size = 64<br>min_parallel_table_scan_size = \
512<br>parallel_leader_participation = off<br>parallel_setup_cost = \
100<br>parallel_tuple_cost = 0.1<br>cpu_tuple_cost = 0.01<br>temp_buffers = \
512MB<br>huge_pages = on # on, off, or \
try<br></div><div><br></div><div>Error: </div><div># systemctl status \
postgresql<br>● postgresql.service - PostgreSQL 11 database server<br> Loaded: \
loaded (/usr/lib/systemd/system/postgresql.service; enabled; vendor preset: \
disabled)<br> Active: failed (Result: exit-code) since Mon 2019-08-12 11:52:19 \
UTC; 10min ago<br> Docs: <a href="https://www.postgresql.org/docs/11/static/" \
target="_blank">https://www.postgresql.org/docs/11/static/</a><br> Process: 6882 \
ExecStart=/usr/pgsql-11/bin/postmaster -D ${PGDATA} (code=exited, \
status=1/FAILURE)<br> Process: 6868 \
ExecStartPre=/usr/pgsql-11/bin/postgresql-11-check-db-dir ${PGDATA} (code=exited, \
status=0/SUCCESS)<br> Main PID: 6882 (code=exited, status=1/FAILURE)<br><br>Aug 12 \
11:52:19 ip-10-1-4-103.ec2.internal postmaster[6882]: 2019-08-12 11:52:19.433 UTC \
[6882] LOG: listening on IPv6 addres... 5432<br>Aug 12 11:52:19 \
ip-10-1-4-103.ec2.internal postmaster[6882]: 2019-08-12 11:52:19.434 UTC [6882] LOG: \
listening on Unix socket...5432"<br>Aug 12 11:52:19 ip-10-1-4-103.ec2.internal \
postmaster[6882]: 2019-08-12 11:52:19.438 UTC [6882] LOG: listening on Unix \
socket...5432"<br>Aug 12 11:52:19 ip-10-1-4-103.ec2.internal postmaster[6882]: \
2019-08-12 11:52:19.441 UTC [6882] FATAL: could not map anonymou...emory<br>Aug 12 \
11:52:19 ip-10-1-4-103.ec2.internal postmaster[6882]: 2019-08-12 11:52:19.441 UTC \
[6882] HINT: This error usually means tha...<br>Aug 12 11:52:19 \
ip-10-1-4-103.ec2.internal postmaster[6882]: 2019-08-12 11:52:19.442 UTC [6882] LOG: \
database system is shut down<br>Aug 12 11:52:19 ip-10-1-4-103.ec2.internal \
systemd[1]: postgresql.service: main process exited, code=exited, \
status=1/FAILURE<br>Aug 12 11:52:19 ip-10-1-4-103.ec2.internal systemd[1]: Failed to \
start PostgreSQL 11 database server.<br>Aug 12 11:52:19 ip-10-1-4-103.ec2.internal \
systemd[1]: Unit postgresql.service entered failed state.<br>Aug 12 11:52:19 \
ip-10-1-4-103.ec2.internal systemd[1]: postgresql.service failed.<br>Hint: Some lines \
were ellipsized, use -l to show in full.<br></div><div><br></div><div><b>Please \
suggest me on this . </b></div><div> </div><div><div><div><br></div>-- <br><div \
dir="ltr" class="gmail-m_5434424470765159745gmail_signature"><div dir="ltr"><div><div \
dir="ltr">Regards,<div>Suresh Seema</div></div></div></div></div></div></div></div> \
</blockquote></div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic