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

Large file in memory #98

Open
bdemeulder opened this issue Dec 17, 2021 · 2 comments
Open

Large file in memory #98

bdemeulder opened this issue Dec 17, 2021 · 2 comments
Assignees

Comments

@bdemeulder
Copy link
Collaborator

bdemeulder commented Dec 17, 2021

As per Martijn Schuemie's comment on shiny deploy: OHDSI/ShinyDeploy#148 (comment)

'Keeping 11GB in memory is not ok. Either use the file system or a database to hold the data, and only load what you're displaying, when you're displaying it.'

My understanding is that we are using the file system to hold the data (by uploading the preMerge to the S3 server), am I wrong?

What else could we do to reduce the memory usage?

@schuemie
Copy link
Contributor

The premerge file is a single file with all data in it. When you load it, you load it all (into memory).

The solution implemented in the CohortDiagnostics Shiny app is to use a database backend instead of the premerge file when data become too large. Here's the code one can use to upload the data. There's an OHDSI Postgres server that the Shiny app can access.

If your Shiny app is custom developed, then another, more lightweight options might be to split up the data in some way (e.g. by cohort ID) into separate data files, and load the data on the fly as needed. An example of this pattern can be found here.

@leeevans
Copy link

@bdemeulder In one week, the OHDSI shiny server infrastructure will be reduced in size back to the former configuration (to reduce costs). That means the PioneerWatchfulWaiting app will no longer run successfully with the current usage of 11 Gb of RAM.

Please rewrite the PioneerWatchfulWaiting app to follow the recommendation from @schuemie so it can continue to be hosted successfully on data.ohdsi.org.

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

6 participants