flush by setting flush period