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

Pusher's memory usage is bad when started with lots of old data that needs uploading #83

Open
pboothe opened this issue Jan 23, 2020 · 0 comments

Comments

@pboothe
Copy link
Contributor

pboothe commented Jan 23, 2020

Pusher's memory use pattern turns out to be bad for systems with lots of old data. It creates one tarfile for every day/datatype combination with un-uploaded data. This means that using it on a directory with lots and lots of unuploaded days causes a memory spike as all those days are loaded into independent tarfiles and uploaded independently.

I think the right thing is probably for main to be:

for each datatype {
  in a goroutine {
    upload all existing data serially  // <-- THIS IS THE NEW PART
    start listening for new data
  }
}

That way, starting pusher with lots of old data won't lead to a memory spike - that data will just get uploaded serially.

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

No branches or pull requests

2 participants