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

Bring back value serialization #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

martin-ueding
Copy link
Contributor

@kostrzewa has PV objects of 40 GB, which become hard to handle to memory. We discussed to bring back the value serialization and convince the garbage collector to make it work.

In this pull request we can discuss the finer details for this work in progress. So far I have just revered the commit which removed the logic and fixed the merge conflicts. The code will not run.

One of the things that annoyed me was that the pv_call would have to know the name of the variable that one stores stuff into. This time I'd favor a new argument filename which when given will be the place where stuff is stored, with output/values/FILENAME/value-%d.Rdata. Perhaps we should call it “dirname”. pv_call will delete the contents of the directory and then serialize the values into there.

I think last time I serialized each named element of each value into a separate file, like value-%d-%s.Rdata. Instead we could also just store each element of the numbered outer list into a single file. This would result in less files if there are multiple named values. In the previous version it would check the size of the each named value in the first list element and deduce the amount of storage needed. I think that this logic should just be removed. Either store each named list as a single file or do nothing at all.

Would that suit your needs?

@kostrzewa
Copy link
Member

I will try to find some time over the next three days to look at / work on this. Thanks!


result <- func(param_row, value_loaded)

rm(value_loaded)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is likely not sufficient to keep memory consumption low...

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

Successfully merging this pull request may close these issues.

2 participants