You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by "Laird, Benjamin" <Be...@capitalone.com> on 2014/04/22 22:07:30 UTC

Running large join in ALS example through PySpark

Hello all -

I'm running the ALS/Collaborative Filtering code through pySpark on spark0.9.0. (http://spark.apache.org/docs/0.9.0/mllib-guide.html#using-mllib-in-python)

My data file has about 27M tuples (User, Item, Rating). ALS.train(ratings,1,30) runs on my 3 node cluster (24 cores, 60GB RAM) in about 5 minutes.

However, the following seems to hang:
testdata = ratings.map(lambda p: (int(p[0]), int(p[1])))
predictions = model.predictAll(testdata).map(lambda r: ((r[0], r[1]), r[2]))
ratesAndPreds = ratings.map(lambda r: ((r[0], r[1]), r[2])).join(predictions)
When the join in ratesAndPreds is calculated, 38 tasks are created. 32 are completed with locality level PROCESS_LOCAL in about ~5 minutes. However, 6 tasks are in locality NODE_LOCAL and run for over 45 minutes without completing.

I was receiving a no heartbeat message from the Scheduler, so I changed my java args in spark-env.sh. I don't receive that now, but I have a suspicion that there are still some GC issues.

Does anyone have any suggestions? I read that I can get GC problems or other memory issues if I have too few partitions. Should I investigate that?

Thanks!
Ben


Ben Laird
Data Scientist
(202) 695-6205
Benjamin.Laird@CapitalOne.com<ma...@CapitalOne.com>
[cid:image001.png@01CF5E44.F673E050]<http://www.capitalonelabs.com/>
http://www.capitalonelabs.com<http://www.capitalonelabs.com/>

________________________________________________________

The information contained in this e-mail is confidential and/or proprietary to Capital One and/or its affiliates. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed.  If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.