Im trying to figure out what is the most "optimized" socket buffer size on iOS, when I query KIPC_MAXSOCKBUF with sysctl it returns a 4Mb buffer size which seems to me pretty high... From my experience socket recv performance seems better when using the "default_continuous_buffer_size" of the system (Unix guy speaking here!) however I cannot run a sysctl -a on iOS to get that info... and its also not available through the C interface for sysctl (or does it have a different name?).
Does anyone else have tested what is the most performant recv socket buffer size on iOS?
I think its 1024 KB (1 MB), but I am not pretty sure.Using MAC OS's getsockopt(2), SO_SNDBUF and SO_RCVBUF are options to adjust the normal buffer sizes respectively. The buffer size may be increased for high-volume connections, or may be decreased to limit the possible backlog of incoming data. The system places an absolute limit on these values.
More information can be found on Mac OS X Manual Page For getsockopt(2)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With