[ 
https://issues.apache.org/jira/browse/SPARK-11968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15983048#comment-15983048
 ] 

Nick Pentreath commented on SPARK-11968:
----------------------------------------

[[email protected]] would you mind posting your comments here about the 
solution from SPARK-20446 as well as the experiment timings? You can rename 
your PR to include this JIRA (SPARK-11968) in the title instead, in order to 
link it.

Also please include the timings here of the {{ml DataFrame}} version for 
comparison. Your approach should also be much faster than the current {{ml}} 
SparkSQL approach, I think.

I just did some quick tests using MovieLens {{latest}} data (~24 million 
ratings, ~260,000 users, ~39,000 items) and found the following (note these are 
very rough timings):

Using default block sizes:

Current {{ml}} master - 262 sec
My approach: 58 sec
Your PR: 35 sec

You're correct that there is still +/- 20-25% GC time overhead using the BLAS 3 
+ sorting approach. Potentially it could be slightly improved through some form 
of pre-allocation, but even then it does look like any benefit of BLAS 3 is 
smaller than the GC cost.

> ALS recommend all methods spend most of time in GC
> --------------------------------------------------
>
>                 Key: SPARK-11968
>                 URL: https://issues.apache.org/jira/browse/SPARK-11968
>             Project: Spark
>          Issue Type: Improvement
>          Components: ML, MLlib
>    Affects Versions: 1.5.2, 1.6.0
>            Reporter: Joseph K. Bradley
>            Assignee: Nick Pentreath
>
> After adding recommendUsersForProducts and recommendProductsForUsers to ALS 
> in spark-perf, I noticed that it takes much longer than ALS itself.  Looking 
> at the monitoring page, I can see it is spending about 8min doing GC for each 
> 10min task.  That sounds fixable.  Looking at the implementation, there is 
> clearly an opportunity to avoid extra allocations: 
> [https://github.com/apache/spark/blob/e6dd237463d2de8c506f0735dfdb3f43e8122513/mllib/src/main/scala/org/apache/spark/mllib/recommendation/MatrixFactorizationModel.scala#L283]
> CC: [~mengxr]



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to