Re: PostgresSQL 9.5.21 very slow to connect and perform basic queries

2022-07-21 Thread bruno da silva
It has been running at least since 2018. I got that from the tail => /sys/kernel/mm/ksm/run <== 0 ==> /sys/kernel/mm/transparent_hugepage/defrag <== [always] madvise never ==> /sys/kernel/mm/transparent_hugepage/enabled <== always madvise [never] ==> /sys/kernel/mm/transparent_hugepage/khugepa

Re: PostgresSQL 9.5.21 very slow to connect and perform basic queries

2022-07-21 Thread bruno da silva
Thanks, I will check it out. On Thu, Jul 21, 2022 at 4:21 PM Justin Pryzby wrote: > On Thu, Jul 21, 2022 at 03:59:30PM -0400, bruno da silva wrote: > > OS/version: CentOS release 6.9 (Final) > > How are these set ? > > tail /sys/kernel/mm/ksm/run > /sys/kernel/mm/transparent_hugepage/{defrag,e

Re: PostgresSQL 9.5.21 very slow to connect and perform basic queries

2022-07-21 Thread Justin Pryzby
On Thu, Jul 21, 2022 at 03:59:30PM -0400, bruno da silva wrote: > OS/version: CentOS release 6.9 (Final) How are these set ? tail /sys/kernel/mm/ksm/run /sys/kernel/mm/transparent_hugepage/{defrag,enabled,khugepaged/defrag} /proc/sys/vm/zone_reclaim_mode I suspect you may be suffering from i

Re: PostgresSQL 9.5.21 very slow to connect and perform basic queries

2022-07-21 Thread Andrew Dunstan
On 2022-07-21 Th 14:37, bruno da silva wrote: > Hello. > > I'm investigating an issue on a PostgresSql 9.5.21 installation that > becomes unusable in an intermittent way. Simple queries like "select > now();" could take 20s. commits take 2s. and all gets fixed after an > engine restart. > > I loo

Re: PostgresSQL 9.5.21 very slow to connect and perform basic queries

2022-07-21 Thread bruno da silva
The issue started a month ago. On Thu, Jul 21, 2022 at 3:59 PM bruno da silva wrote: > Thanks for the quick response. > > OS/version: CentOS release 6.9 (Final) > > Hardware(non dedicated to the db, other services and app run the same > server): > > Xeon(R) CPU E5-2690 v4 @ 2.60GHz - 56

Re: PostgresSQL 9.5.21 very slow to connect and perform basic queries

2022-07-21 Thread bruno da silva
Thanks for the quick response. OS/version: CentOS release 6.9 (Final) Hardware(non dedicated to the db, other services and app run the same server): Xeon(R) CPU E5-2690 v4 @ 2.60GHz - 56 cores - 504 GB RAM logicaldrive 1 (1.5 TB, RAID 1, OK) physicaldrive 1I:3:1 (port 1I:box 3:bay 1, S

Re: PostgresSQL 9.5.21 very slow to connect and perform basic queries

2022-07-21 Thread Justin Pryzby
On Thu, Jul 21, 2022 at 02:37:35PM -0400, bruno da silva wrote: > I'm investigating an issue on a PostgresSql 9.5.21 installation that > becomes unusable in an intermittent way. Simple queries like "select > now();" could take 20s. commits take 2s. and all gets fixed after an engine > restart. > >

PostgresSQL 9.5.21 very slow to connect and perform basic queries

2022-07-21 Thread bruno da silva
Hello. I'm investigating an issue on a PostgresSql 9.5.21 installation that becomes unusable in an intermittent way. Simple queries like "select now();" could take 20s. commits take 2s. and all gets fixed after an engine restart. I look into the pg logs and no signs of errors. and checkpoints are