Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone Max Socket Buffer Size

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?

like image 957
Bob McLaury Avatar asked Dec 17 '10 00:12

Bob McLaury


1 Answers

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)

like image 193
iHS Avatar answered Sep 21 '22 06:09

iHS