Dynamical stability and instability of Ricci-flat metrics