Some additional info for anyone who is dumb like me and wants to do this:
To do this, I first had to install pg_repack using the postgresql repo:
https://wiki.postgresql.org/wiki/Apt
Then I had to follow these instructions, including adding the extension to any of the databases I wanted to repack:
https://dbsguru.com/install-and-configure-pg_repack-in-postgresql/
I ended up just running pg_repack -a as the postgres user.
I chose to run it on my peertube and pleroma databases. Peertube was done in just a few minutes.
Note that it's a pretty serious operation. It seemed to take about 40 minutes on my relatively trivial instance, and it pegged an entire core at 100% the whole time, though the sites kept running while the operation occurred. Even with an SSD, I ended up with pretty high IOWait times during the repack because it was moving a lot of data around.
It seems to have brought my peak loads down quite a bit. The Pleroma task still can take up a whole lot of cpu power when there's lots of stuff going on, but the postgresql tasks basically idle now whereas they were significant beforehand.
To do this, I first had to install pg_repack using the postgresql repo:
https://wiki.postgresql.org/wiki/Apt
Then I had to follow these instructions, including adding the extension to any of the databases I wanted to repack:
https://dbsguru.com/install-and-configure-pg_repack-in-postgresql/
I ended up just running pg_repack -a as the postgres user.
I chose to run it on my peertube and pleroma databases. Peertube was done in just a few minutes.
Note that it's a pretty serious operation. It seemed to take about 40 minutes on my relatively trivial instance, and it pegged an entire core at 100% the whole time, though the sites kept running while the operation occurred. Even with an SSD, I ended up with pretty high IOWait times during the repack because it was moving a lot of data around.
It seems to have brought my peak loads down quite a bit. The Pleroma task still can take up a whole lot of cpu power when there's lots of stuff going on, but the postgresql tasks basically idle now whereas they were significant beforehand.
- replies
- 0
- announces
- 1
- likes
- 3