Uh oh!
There was an error while loading. Please reload this page.
TEZ-4275: Use Google Guava Intern Facility - #95
Conversation
| // Hint to the JVM to clean up anything no longer needed; be ready for the next DAG | ||
| System.gc(); | ||
| System.runFinalization(); | ||
There was a problem hiding this comment.
I'm not sure if it is helpful to role this change into this ticket or not. However, the clearCache stuff is pretty useless. All it does is make the map entries available for garbage collection,... which they already are by design.
However, this here will hint to the JDK to actually clean up that stuff. Hinting to the JDK at this points seems like a reasonable thing to do between DAGs, but I'm not sure if it's worthwhile.
belugabehr
commented
Feb 10, 2021
OK @jteagles@abstractdog this PR is failing on some pre-existing find bugs error. Kind of funny actually: The method has Please consider these changes as they should lower memory requirements, provide faster concurrent access, and simplify the code a bit. In particular, please consider my thoughts here: |
abstractdog
commented
Feb 10, 2021
yeah, absolutely, we've also found similar isNull* madness in https://issues.apache.org/jira/browse/TEZ-4215, I believe we should merge that @jteagles, and @belugabehr you can handle this in a similar way...if findbugs warning simply doesn't makes sense, let's try to ignore it |
belugabehr
commented
Mar 2, 2021
@abstractdog@jteagles Any thoughts on this? |
jteagles
commented
Mar 2, 2021
@belugabehr can you compare speed and memory consumption with current implementation? I have a test that can be used to measure. Then compare
|
belugabehr
commented
Mar 3, 2021
|
Results match my expectations. If nothing else, Guava uses a |
belugabehr
commented
Mar 3, 2021
Also, I suspect Guava version is better in multi-threaded environment since it locks on "regions" of the map instead of locking on the entire map ( master: 3.7s - 4.2s |
belugabehr
commented
Mar 3, 2021
16 Threads yielded a similar 10% improvement in throughput |
belugabehr
commented
Mar 11, 2021
Hello, what do you think about this PR as it currently stands? |
jteagles
commented
Mar 11, 2021
If the GC isn't strictly needed can it be taken out? |
belugabehr
commented
Mar 11, 2021
@jteagles Yes. It can be. There may be some value though to hinting that now (between DAGs) is a good time to cleanup, and I was mimicking the previous code that was attempting to cleanup these caches. Just let me know, I don't have a feeling (or data) on it one way or another. |
belugabehr
commented
Mar 20, 2021
@jteagles What would your preference be here? |
belugabehr
commented
May 6, 2021
@jteagles@abstractdog OK. I took out the GC hint and it builds without the warning. Thanks! |
hadoop-yetus
commented
May 6, 2021
🎊 +1 overall
This message was automatically generated. |
belugabehr
commented
Jun 10, 2021
@abstractdog Just a gentle reminder about this PR. @pgaref Do you know anyone that can assist here? |
abstractdog
commented
Jun 10, 2021
hi @belugabehr! I just ran through the history, memory/speed improvement is promising, also you removed every questioned part, so this looks good to me |
belugabehr
commented
Jun 30, 2021
@abstractdog Can you please assist with a merge? Thanks! |
jteagles
commented
Jun 30, 2021
+1. Got distracted away from this PR. I'll do the merge shortly. |
belugabehr
commented
Jun 30, 2021
No worries! Thanks @jteagles |
* TEZ-4275: Use Google Guava Intern Facility * Also add hint for running finalization * Use Guava String Intern implementation * Fix checkstyle, white-space issues * Remove GC hint Co-authored-by: David Mollitor <david.mollitor@cloudera.com> (cherry picked from commit 984d09c)
No description provided.