optimize shuffle write