Github user viirya commented on the pull request:
https://github.com/apache/spark/pull/5572#issuecomment-105334419
> The more important thing to cache is probably rdd2. rdd2.iterator is
called once per element in .rdd1.iterator, which is why you end up with soooo
many remote fetches in the current implementation. By caching rdd1 locally, you
only save doing remote fetches for however many threads you have in one
executor. (And I'm not 100% sure that is even true as implemented in the PR
currently, I have a feeling all threads will simultaneously try to fetch and
insert into the local cache.) Most probably elementsPerPartition >>
threadsPerExecutor.
Because `CacheManager` has a lock for fetching partition, I think we should
not see the situation that all threads will simultaneously try to fetch and
insert into the local cache.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]