Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more examples how to use synapse_auto_compressor #97

Open
rubo77 opened this issue Jul 12, 2022 · 3 comments
Open

Add more examples how to use synapse_auto_compressor #97

rubo77 opened this issue Jul 12, 2022 · 3 comments

Comments

@rubo77
Copy link

rubo77 commented Jul 12, 2022

the readme only suggests

 synapse_auto_compressor -p postgresql://user:pass@localhost/synapse -c 500 -n 100

This means, that it will only check in 100 rooms and quit as I understand is as a layman.

I got the result after 100 chunks:

 INFO  synapse_auto_compressor::manager] Finished running compressor. Saved 15891 rows. Skipped 4/100 chunks                                                                          

this seems to have worked.

Then I started again running with -n 10000 now to try to compress my 56GB database.

Is this the best option? or could you provide more informatinon in the readme please?

@rubo77
Copy link
Author

rubo77 commented Jul 13, 2022

After some hours it said in the end:

INFO  synapse_auto_compressor::manager] Finished running compressor. Saved 150550506 rows. Skipped 381/3307 chunks

WOW! 150 Million rows in 3307*500=1,700,000 Rooms!

unfortunately the database grew from 56 to 59GB in /var/lib/pistgres, although the gzipped sql export of the table state_groups_state shrinked from 5.6GB to 1.5GB. ( I guess a database VACUUM will be needed in the end?

@rubo77
Copy link
Author

rubo77 commented Jul 13, 2022

After running VACUUM FULL on my database it shrank down to 23GB.

So we should add this too to the Readme: use VACUUM after compressing to really free up the disk-space.

(I thought we could delete the three extra tables in the database: state_compressor_state, state_compressor_progress and state_compressor_total_progress, but they are so small, that it would be not much space to win)

@jahway603
Copy link

+1 for more examples how to use synapse_auto_compressor and its VACUUM feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants