Microsoft interview question

How will you optimize spark cluster, a case was given