Set spark mem based on minimum of slave,master RAM