Skip to content

Question on 4096 #53

@kolinfluence

Description

@kolinfluence

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions