- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2021 02:08 PM
Hello everyone,
I am facing performance issue while calculating cosine similarity in pyspark on a dataframe with around 100 million records.
I am trying to do a cross self join on the dataframe to calculate it.
The executors are all having same number of tasks when seen on the spark ui.
The input size to all executors is also almost the same.
Executors : 20
Cores: 4 cores
Any inputs would be highly appreciated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2021 02:35 AM
Thank you Kaniz !. I shall wait for an answer 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2021 02:41 PM
The issue is probably related to the self join between 100 million rows, I'm not positive without seeing the code and understanding the problem better but you may want to think about using windowing functions instead
https://blog.knoldus.com/using-windows-in-spark-to-avoid-joins/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2021 10:00 AM
Is there a way to hash the record attributes so that the cartesian join can be avoided? I work on record similarity and fuzzy matching and we do a learning based blocking alorithm which hashes the records into smaller buckets and then the hashes are joined. You can check https://github.com/zinggAI/zingg for the approach.