Hi!
We have similar problem and it looks like psql vacuuming isn't working
properly.
I expect that this problem will be gone when we will upgrade ovirt to
latest version.
Until then we are performing weekly vacuuming of top N (usualy 4) tables
by "external size" in ovirt_engine_history database.
A little bit more about vacuuming:
https://www.postgresql.org/docs/9.1/sql-vacuum.html
External size:
https://wiki-bsse.ethz.ch/display/ITDOC/Check+size+of+tables+and+objects+...
,
https://matjaz.it/tutorial-sizes-of-tables-and-databases-in-postgresql/
Example which queries we are running in our case:
To get top 4 tables ordered by "external size":
SELECT relname, pg_size_pretty(pg_total_relation_size(relid)),
pg_size_pretty(pg_total_relation_size(relid) - pg_relation_size(relid))
FROM pg_catalog.pg_statio_user_tables ORDER BY
pg_total_relation_size(relid) DESC limit 4;
We use names from previous query and perform vacuum table by table:
VACUUM (VERBOSE, FULL) ${TABLE};
To get new size of table after vaccuming:
SELECT pg_size_pretty(pg_total_relation_size(relid) -
pg_relation_size(relid)) FROM pg_catalog.pg_statio_user_tables WHERE
relname::text like '${TABLE}';
Note that ${TABLE} is variable with value for example:
"vm_interface_samples_history"
I suggest to run few queries and check "external size" of your tables.
In our case vacuuming has huge effect on releasing disk space and it
takes jus few seconds for database.
Oh yes, I almost forgot. As Strahi said, there is some ovirt tool
(script) for cleaning up psql database but in our case it didn't have
such huge effect as it didn't perform full vacuum.
Regards,
Pavel
On 11/10/2019 15:50, Strahil Nikolov wrote:
On October 11, 2019 3:43:55 PM GMT+03:00, Chris Adams
<cma(a)cmadams.net> wrote:
> On my oVirt 4.1.9 cluster, the hosted engine filled up its disk last
> night (it was deployed from the engine appliance image and had a 20G
> root and 5G swap). I gained a little space by trimming down swap, but
> I
> need to clean it up.
>
> It looks like the problem is the Postgres database -
> /var/lib/pgsql/data
> is using 16G. Is there some cleanup I can do (and then some way to
> keep
> it from happening again)?
>
> Also, is there a way to extend the hosted engine disk? It's on iSCSI
> storage, and the LUN has free space.
I have noticed during engine upgrade that the tool proposes database cleanup, but I have
never used it.
Best Regards,
Strahil Nikolov
_______________________________________________
Users mailing list -- users(a)ovirt.org
To unsubscribe send an email to users-leave(a)ovirt.org
Privacy Statement:
https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct:
https://www.ovirt.org/community/about/community-guidelines/
List Archives:
https://lists.ovirt.org/archives/list/users@ovirt.org/message/YU6Y3M5EL6L...
--
--
Pavel Sipos, Arnes <pavel.sipos(a)arnes.si>
ARNES, p.p. 7, SI-1001 Ljubljana, Slovenia
T: +386 1 479 88 00
W:
www.arnes.si, aai.arnes.si