jtrades
asked on
Determining the Total Network Buffer Space Available for TCP/UDP Sockets
I have a program that has multiple TCP and UDP socket connections. In my program, I set the send and receive buffer size for the TCP sockets and the receive buffer size for the UDP sockets using setsockopt. However, I was wondering the following::
* How can I determine how much total network buffer space is available at program startup, so that I can determine how to divide it up between my various sockets? Right now, I use getsockopt to see what the send or receive buffer size is set for an individual socket, but it would be nice to see the total available before creating any sockets.
* Where is the network buffer space physically located?
I am programming in C/C++ using MS Visual C++ 2010 Express on a windows 7 machine.
* How can I determine how much total network buffer space is available at program startup, so that I can determine how to divide it up between my various sockets? Right now, I use getsockopt to see what the send or receive buffer size is set for an individual socket, but it would be nice to see the total available before creating any sockets.
* Where is the network buffer space physically located?
I am programming in C/C++ using MS Visual C++ 2010 Express on a windows 7 machine.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Well, as that article states, you can find them as
* The per-interface TcpWindowSize registry value.
* The GlobalMaxTcpWindowSize registry value.
So, you basically just have to read these registry values.
* The per-interface TcpWindowSize registry value.
* The GlobalMaxTcpWindowSize registry value.
So, you basically just have to read these registry values.
ASKER
Looks like these values don't exist every time. In some articles, the admin/user may have to add these registry values to tweak their tcp performance. Can you think of any other values that I can obtain within my program that are more consistent?
ASKER
One more related question. What is the max SO_RCVBUF/SO_SNDBUF that I can set? From what I read, it seems to be 256K, but using setsockopt I was able to maintain buffer sizes in the MB range. Is this possible?
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
ASKER