Skip to content

Reduce populateKinship.r peak memor - #1198

Open
ankurjuneja wants to merge 2 commits into
release26.7-SNAPSHOTfrom
26.7_fb_kinshipOptmization
Open

Reduce populateKinship.r peak memor#1198
ankurjuneja wants to merge 2 commits into
release26.7-SNAPSHOTfrom
26.7_fb_kinshipOptmization

Conversation

@ankurjuneja

Copy link
Copy Markdown
Contributor

Rationale

The nightly kinship calculation runs as a child of the web server, so its peak is charged against the JVM's memory budget and spikes cloud servers every night.
Processing one family at a time and streaming rows to disk bounds the peak by the largest family rather than the whole colony.

Related Pull Requests

Changes

@bbimber

bbimber commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

@ankurjuneja and @labkey-martyp: have you confirmed this produces identical results using the real data from production NPRCs?

@ankurjuneja

Copy link
Copy Markdown
Contributor Author

@ankurjuneja and @labkey-martyp: have you confirmed this produces identical results using the real data from production NPRCs?

Yes, tested with data from three centers and output is identical.

@bbimber

bbimber commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

@ankurjuneja and @labkey-martyp: have you confirmed this produces identical results using the real data from production NPRCs?

Yes, tested with data from three centers and output is identical.

OK, thanks for confirming. All of this is quite old code and it would not surprise me if there was big room for efficiency both here, and at import time.

@labkey-martyp

Copy link
Copy Markdown
Contributor

@ankurjuneja and @labkey-martyp: have you confirmed this produces identical results using the real data from production NPRCs?

Yes, tested with data from three centers and output is identical.

@bbimber if you want to send us study.Pedigree export and your kinship.txt, we can test yours as well.

@bbimber

bbimber commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

@ankurjuneja and @labkey-martyp: have you confirmed this produces identical results using the real data from production NPRCs?

Yes, tested with data from three centers and output is identical.

@bbimber if you want to send us study.Pedigree export and your kinship.txt, we can test yours as well.

@ankurjuneja wrote that this was tested on three centers - was ONPRC not one of them?

@bbimber

bbimber commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

If you're touching this code, the first message I got from R was that kinship2 is deprecated in favor of this, which seems like it might be a drop-in replacement: https://louislenezet.github.io/Pedixplorer/

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.

3 participants