What is the function of buffer size and what value should it have?
According to the blender documentation found here

Rate
The bitrate control also includes a Minimum and a Maximum.
Buffer
The decoder bitstream buffer size.

the buffer size is related to streaming video. The link in the manual takes you to this article which describes what the buffer is. It sounds like you are editing for web streaming in which case your buffer size should be based on your target internet connection and the quality of the video you are delivering.
If you are referring to a different buffer setting in blender please elaborate.