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

cleanup_read_marks killing database CPU for hours? #132

Open
Nealsoni00 opened this issue Jul 25, 2023 · 1 comment
Open

cleanup_read_marks killing database CPU for hours? #132

Nealsoni00 opened this issue Jul 25, 2023 · 1 comment

Comments

@Nealsoni00
Copy link

Hey all!

I'm getting a weird issue when I run cleanup_read_marks on all readable tables, it takes ~10 hours to run to completion and takes up 90% of the DB CPU time.

Would love any information on how the cleanup works and how to make it faster!

Thanks in advance!

@ledermann
Copy link
Owner

Things that I can think of as causes:

  • Missing database indices
  • First cleanup after years without cleanup
  • Your database is so large that this gem is not the right solution

Look here for the internals of the cleanup:
https://github.com/ledermann/unread/blob/master/lib/unread/garbage_collector.rb

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