Skip to content

Persist more in MGPropertyGraph#2805

Merged
rapids-bot[bot] merged 3 commits intorapidsai:branch-22.12from
eriknw:pg_persist
Oct 24, 2022
Merged

Persist more in MGPropertyGraph#2805
rapids-bot[bot] merged 3 commits intorapidsai:branch-22.12from
eriknw:pg_persist

Conversation

@eriknw
Copy link
Contributor

@eriknw eriknw commented Oct 13, 2022

This should fix the quadratic scaling we're seeing when adding new data.

CC @VibhuJawa. I'm still trying to improve the merges for MG to be like #2796, but I'm encountering issues.

This should fix the quadratic scaling we're seeing when adding new data
@eriknw eriknw requested a review from a team as a code owner October 13, 2022 16:53
@BradReesWork BradReesWork added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Oct 13, 2022
@BradReesWork BradReesWork added this to the 22.12 milestone Oct 13, 2022
@codecov-commenter
Copy link

codecov-commenter commented Oct 13, 2022

Codecov Report

❗ No coverage uploaded for pull request base (branch-22.12@856e3ba). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@               Coverage Diff               @@
##             branch-22.12    #2805   +/-   ##
===============================================
  Coverage                ?   60.48%           
===============================================
  Files                   ?      111           
  Lines                   ?     6511           
  Branches                ?        0           
===============================================
  Hits                    ?     3938           
  Misses                  ?     2573           
  Partials                ?        0           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@VibhuJawa VibhuJawa left a comment

Choose a reason for hiding this comment

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

I think it looks good . We should just add a small test to ensure they are actually persisted. Looks good other-wise.

@alexbarghi-nv
Copy link
Member

This looks fine to me, I just want to verify that this actually increases performance. Have you run some sort of benchmark before/after persistence?

@eriknw
Copy link
Contributor Author

eriknw commented Oct 17, 2022

Yeah, I found this PR to be much faster when experimenting with the MAG240 dataset.

To satisfy @VibhuJawa and @alexbarghi-nv comments, I will add a benchmark as a test and will share performance results here.

@eriknw
Copy link
Contributor Author

eriknw commented Oct 18, 2022

Benchmark "test" added.

Results before this PR:

------------------------------------------------------------- benchmark: 3 tests ------------------------------------------------------------
Name (time in s, mem in bytes)        Mean                GPU mem            GPU Leaked mem            Rounds            GPU Rounds
---------------------------------------------------------------------------------------------------------------------------------------------
bench_add_edges_cyber[1]            1.7739 (1.0)      273,342,160 (1.0)                 232 (1.0)           1           1
bench_add_edges_cyber[3]            5.3522 (3.02)     273,342,568 (1.00)                632 (2.72)          1           1
bench_add_edges_cyber[10]          30.4148 (17.15)    273,343,760 (1.00)              1,840 (7.93)          1           1
bench_add_edges_cyber[30]   DNF
---------------------------------------------------------------------------------------------------------------------------------------------

Results with this PR:

------------------------------------------------------------- benchmark: 4 tests ------------------------------------------------------------
Name (time in s, mem in bytes)        Mean                GPU mem            GPU Leaked mem            Rounds            GPU Rounds
---------------------------------------------------------------------------------------------------------------------------------------------
bench_add_edges_cyber[1]            1.5217 (1.0)      273,342,296 (1.0)                 360 (1.0)           1           1
bench_add_edges_cyber[3]            2.7838 (1.83)     273,342,432 (1.00)                496 (1.38)          1           1
bench_add_edges_cyber[10]           7.6317 (5.02)     273,343,480 (1.00)              1,544 (4.29)          1           1
bench_add_edges_cyber[30]          18.6916 (12.28)    273,344,064 (1.00)              2,144 (5.96)          1           1
---------------------------------------------------------------------------------------------------------------------------------------------

Results for SG PropertyGraph:

------------------------------------------------------------------ benchmark: 14 tests ------------------------------------------------------------------
Name (time in ns, mem in bytes)                   Mean                GPU mem            GPU Leaked mem            Rounds            GPU Rounds
---------------------------------------------------------------------------------------------------------------------------------------------------------
bench_add_edges_cyber[1]              136,008,216.0681 (>1000.0)  494,686,464 (inf)                   0 (1.0)           1           1
bench_add_edges_cyber[3]              235,328,749.7535 (>1000.0)  468,917,688 (inf)                   0 (1.0)           1           1
bench_add_edges_cyber[10]             576,618,617.4005 (>1000.0)  454,553,424 (inf)                   0 (1.0)           1           1
bench_add_edges_cyber[30]           1,493,484,066.7993 (>1000.0)  450,488,352 (inf)                   0 (1.0)           1           1

Merging in the style of #2796 should increase performance of both SG and MG significantly, but MG is waiting on a fix for cudf.

Copy link
Member

@VibhuJawa VibhuJawa left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@rlratzel rlratzel left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for adding the benchmarks too.

Re: benchmarks - are the GPU mem leak numbers actual leaks, or just something related to how we're testing?

@alexbarghi-nv
Copy link
Member

This is good to go with the benchmarks, thanks @eriknw

Copy link
Member

@alexbarghi-nv alexbarghi-nv left a comment

Choose a reason for hiding this comment

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

👍

@rlratzel
Copy link
Contributor

@gpucibot merge

@rapids-bot rapids-bot bot merged commit d86c933 into rapidsai:branch-22.12 Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvement / enhancement to an existing function non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants