Skip to content

Bring back value serialization#19

Open
martin-ueding wants to merge 1 commit into
masterfrom
chunk-serialization
Open

Bring back value serialization#19
martin-ueding wants to merge 1 commit into
masterfrom
chunk-serialization

Conversation

@martin-ueding

Copy link
Copy Markdown
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
Copy Markdown
Member

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

Comment thread R/call.R

result <- func(param_row, value_loaded)

rm(value_loaded)

Copy link
Copy Markdown
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