Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f3HTN-0000lX-92 for pgsql-general@arkaria.postgresql.org; Tue, 03 Apr 2018 08:39:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f3HTL-0003Q1-QN for pgsql-general@arkaria.postgresql.org; Tue, 03 Apr 2018 08:39:19 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f3HTL-0003Pr-Hw for pgsql-general@lists.postgresql.org; Tue, 03 Apr 2018 08:39:19 +0000 Received: from ppp-2-84-221-32.home.otenet.gr ([2.84.221.32] helo=smadev.internal.net) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f3HTI-0000ln-Km for pgsql-general@lists.postgresql.org; Tue, 03 Apr 2018 08:39:18 +0000 Received: from smadev.internal.net (smadev [10.9.200.131]) by smadev.internal.net (8.15.2/8.15.2) with ESMTP id w338dCoM012168 for ; Tue, 3 Apr 2018 11:39:14 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) Subject: Re: Autovacuum Problem To: pgsql-general@lists.postgresql.org References: <70a9e2ce-15cc-0ec2-8190-1de1860de51d@matrix.gatewaynet.com> From: Achilleas Mantzios Message-ID: <01f04a0e-5013-605d-418c-acba834c3609@matrix.gatewaynet.com> Date: Tue, 3 Apr 2018 11:39:12 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------7538A0748DE8CF4735AA3415" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------7538A0748DE8CF4735AA3415 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 03/04/2018 10:54, Kein Name wrote: > > Why would you want that? Do you have any control over the application? Any "special" patterns used in the app? > > Drive is running full :/ > Sadly I have no control and knowledge whatsoever over/about the application. > > I tuned the autovacuum parameters now for the critical tables, to have it run more often and using greater ressources while doing so.... but I am unsure if this helps with the bloating. You could try to setting log_statement=all for a (short) period with a typical "heavy-ish" write activity to know what the app is doing. IMHO you must prepare for a larger storage. After that you should monitor disk usage periodically to see if usage is stabilized or at least if the increase rate drops. > > 2018-04-03 9:39 GMT+02:00 Achilleas Mantzios >: > > On 03/04/2018 10:00, Kein Name wrote: >> > VACUUM <> VACUUM FULL >> > Normally running VACUUM via autovacuum should help reuse free space but not actually return it to the filesystem / OS (unless it happens to be the last blocks in the data file(s)). >> > Ppl in normal/average type of installations/workloads no longer (since 8.2) run VACUUM (or VACUUM FULL) by hand, except in extra ordinary cases where e.g. need for free space is urgent. >> >> Hmmmm then when is the space released to the system when the manual VACUUM FULL run is not done? Any way to "force" this? > Why would you want that? Do you have any control over the application? Any "special" patterns used in the app? >> >> 2018-04-03 8:49 GMT+02:00 Achilleas Mantzios >: >> >> On 03/04/2018 09:36, Kein Name wrote: >> >> However no space seems to be freed to the system. >> >> Is there any way a bloody newbie can debug this behaviour? >> >> >> VACUUM <> VACUUM FULL >> Normally running VACUUM via autovacuum should help reuse free space but not actually return it to the filesystem / OS (unless it happens to be the last blocks in the data file(s)). >> Ppl in normal/average type of installations/workloads no longer (since 8.2) run VACUUM (or VACUUM FULL) by hand, except in extra ordinary cases where e.g. need for free space is urgent. >> >> >> Any help is appreciated! >> >> Thanks >> Stefan >> >> >> -- >> Achilleas Mantzios >> IT DEV Lead >> IT DEPT >> Dynacom Tankers Mgmt >> >> >> > > -- > Achilleas Mantzios > IT DEV Lead > IT DEPT > Dynacom Tankers Mgmt > > -- Achilleas Mantzios IT DEV Lead IT DEPT Dynacom Tankers Mgmt --------------7538A0748DE8CF4735AA3415 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit
On 03/04/2018 10:54, Kein Name wrote:
> Why would you want that? Do you have any control over the application? Any "special" patterns used in the app?

Drive is running full :/
Sadly I have no control and knowledge whatsoever over/about the application.

I tuned the autovacuum parameters now for the critical tables, to have it run more often and using greater ressources while doing so.... but I am unsure if this helps with the bloating.

You could try to setting log_statement=all for a (short) period with a typical "heavy-ish" write activity to know what the app is doing.
IMHO you must prepare for a larger storage. After that you should monitor disk usage periodically to see if usage is stabilized or at least if the increase rate drops.


2018-04-03 9:39 GMT+02:00 Achilleas Mantzios <achill@matrix.gatewaynet.com>:
On 03/04/2018 10:00, Kein Name wrote:
> VACUUM <> VACUUM FULL
> Normally running VACUUM via autovacuum should help reuse free space but not actually return it to the filesystem / OS (unless it happens to be the last blocks in the data file(s)).
> Ppl in normal/average type of installations/workloads no longer (since 8.2) run VACUUM (or VACUUM FULL) by hand, except in extra ordinary cases where e.g. need for free space is urgent.

Hmmmm then when is the space released to the system when the manual VACUUM FULL run is not done? Any way to "force" this?
Why would you want that? Do you have any control over the application? Any "special" patterns used in the app?

2018-04-03 8:49 GMT+02:00 Achilleas Mantzios <achill@matrix.gatewaynet.com>:
On 03/04/2018 09:36, Kein Name wrote:
However no space seems to be freed to the system.

Is there any way a bloody newbie can debug this behaviour?

VACUUM <> VACUUM FULL
Normally running VACUUM via autovacuum should help reuse free space but not actually return it to the filesystem / OS (unless it happens to be the last blocks in the data file(s)).
Ppl in normal/average type of installations/workloads no longer (since 8.2) run VACUUM (or VACUUM FULL) by hand, except in extra ordinary cases where e.g. need for free space is urgent.


Any help is appreciated!

Thanks
Stefan


--
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt




-- 
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt


-- 
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt
--------------7538A0748DE8CF4735AA3415--