update buf max size