cloudwego/shmipc-go

Question on 4096

Opened this issue · 1 comments

i have read the https://github.com/cloudwego/shmipc-spec but there are too many things to consider
so question is,

  1. for the idl section,
var BufferPool = sync.Pool{New: func() interface{} {
	return make([]byte, 4096)
}}

if the message i sent is 256bytes, the message received back is 1 byte, what is the ideal make byte number i should put?
4096 is "too much"? should i do 256 bytes + message passing overhead?

  1. what is the min overhead of this []byte for message passing? i would like to make each transfer use one bytebufferpool efficiently.

@zhquzzuli @goodbye-babyer any help on this one? :)