From: rihad <rihad@mail.ru>
To: Luca Ferrari <fluca1978@gmail.com>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-general General <pgsql-general@postgresql.org>
Subject: Re: Changing work_mem
Date: Tue, 13 Aug 2019 20:44:31 +0400
Message-ID: <50c20aea-6f63-2cf7-1760-bb28679ff3e7@mail.ru> (raw)
In-Reply-To: <CAKoxK+6ptxsmNegLmwBEDfBNvEAExDzrd8fthp6T5GwgMoggfw@mail.gmail.com>
References: <2cbec921-a0c2-016f-1831-82dd45106af3@mail.ru>
<ea6b62a3-4aff-cba4-df02-d323073dcbce@2ndquadrant.com>
<6d170b3b-17b7-8e02-bbf6-2a6885b317eb@mail.ru>
<CAKoxK+6ptxsmNegLmwBEDfBNvEAExDzrd8fthp6T5GwgMoggfw@mail.gmail.com>
On 08/13/2019 08:22 PM, Luca Ferrari wrote:
> On Tue, Aug 13, 2019 at 5:59 PM rihad <rihad@mail.ru> wrote:
>> [dbname] LOG: temporary file: path
>> "base/pgsql_tmp/pgsql_tmp93683.257381", size 594
>>
> The setting 'work_mem' is within context 'user', that means it will
> affect running sessione unless the session itself has already issued a
> SET work_mem to xxx.
> So this could be a reason why you don't seem to see any change.
>
> Also keep in mind that work_mem work on a connection basis, so you are
> going to possibly see 521MB x num_connections if all your clients are
> doig the same kind of sort concurrently, which probably causes
> PostgreSQL to go to disk due to memory unavailable.
>
> Hope this helps.
> Luca
> .
>
Thanks. The box has 15GB mem free (as in FreeBSD )))
And it hasn't moved a notch after the increase.
No code does SET work_mem=... AFAIK.
My apologies to Mr. Peter but I still think that older processes, some
of them started a couple of weeks ago, use the older setting.
ps -auxww output:
postgres 2705 43.6 27.5 34668984 27486640 - Rs 14:00
3:15.31 postgres: dbname dbname 192.168.0.4(60614) (postgres)
postgres 7135 25.6 29.5 34437560 29499336 - Ss Mon07
19:12.55 postgres: dbname dbname 192.168.0.4(23540) (postgres)
postgres 99760 14.8 25.9 34425200 25901744 - Ss 13:10
57:31.86 postgres: dbname dbname 192.168.0.4(29650) (postgres)
postgres 28308 9.2 32.0 34445752 32050372 - Ss 5Aug19
83:59.83 postgres: dbname dbname 192.168.0.3(59717) (postgres)
postgres 21835 6.8 32.7 34451896 32750048 - Ss Tue18
266:10.50 postgres: dbname dbname 192.168.0.3(60080) (postgres)
postgres 31957 5.2 31.7 34443704 31703072 - Ss Mon14
29:21.74 postgres: dbname dbname 192.168.0.3(40905) (postgres)
postgres 2640 4.0 28.7 34435512 28667216 - Ss 13:59
4:10.96 postgres: dbname dbname 192.168.0.4(60537) (postgres)
postgres 16727 4.0 32.9 34439608 32948936 - Ss 2Aug19
316:14.67 postgres: dbname dbname 192.168.0.3(20897) (postgres)
postgres 99672 3.6 28.3 34439608 28347760 - Ss 13:08
7:05.25 postgres: dbname dbname 192.168.0.3(35980) (postgres)
postgres 48532 3.2 33.1 34451896 33078900 - Ss 23Jul19
374:10.75 postgres: dbname dbname 192.168.0.3(59891) (postgres)
postgres 7141 2.8 31.6 34441656 31622616 - Ss Mon07
38:19.36 postgres: dbname dbname 192.168.0.4(23618) (postgres)
postgres 14065 2.8 30.6 34431404 30568776 - Ss Mon10
95:06.20 postgres: dbname dbname 192.168.0.4(65211) (postgres)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: rihad@mail.ru, fluca1978@gmail.com, peter.eisentraut@2ndquadrant.com
Subject: Re: Changing work_mem
In-Reply-To: <50c20aea-6f63-2cf7-1760-bb28679ff3e7@mail.ru>
References: <2cbec921-a0c2-016f-1831-82dd45106af3@mail.ru> <ea6b62a3-4aff-cba4-df02-d323073dcbce@2ndquadrant.com> <6d170b3b-17b7-8e02-bbf6-2a6885b317eb@mail.ru> <CAKoxK+6ptxsmNegLmwBEDfBNvEAExDzrd8fthp6T5GwgMoggfw@mail.gmail.com> <50c20aea-6f63-2cf7-1760-bb28679ff3e7@mail.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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