refine buffsize