add max buffer suze support