|
Home > Archive > Unix Programming > September 2006 > optimize socket networking code
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
optimize socket networking code
|
|
| wong_powah@yahoo.ca 2006-09-27, 1:21 pm |
| If my packet size is small, how do I write my socket networking code to
optimize the speed (e.g. any particular socket option to use)?
Any tool for networking optimization?
| |
| Rick Jones 2006-09-27, 1:21 pm |
| wong_powah@yahoo.ca wrote:
> If my packet size is small, how do I write my socket networking code to
> optimize the speed (e.g. any particular socket option to use)?
> Any tool for networking optimization?
Are you sending more than one small packet at a time before waiting
for a reply?
Are you correctly sending logically associated data in one "send"
call?
If you can elaborate on what your application is doing, then we can
elaborate on what you might change to make it better.
rick jones
--
denial, anger, bargaining, depression, acceptance, rebirth...
where do you want to be today?
these opinions are mine, all mine; HP might not want them anyway... 
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
| |
| Maxim Yegorushkin 2006-09-28, 7:33 am |
| wong_powah@yahoo.ca wrote:
> If my packet size is small
How small is it compared with MTU?
> how do I write my socket networking code to
> optimize the speed (e.g. any particular socket option to use)?
What kind of socket? tcp, udp, ip, ...?
> Any tool for networking optimization?
http://www.wireshark.org/ (i guess it fits well in 'any' category).
| |
| David Schwartz 2006-09-29, 7:28 am |
|
wong_powah@yahoo.ca wrote:
> If my packet size is small, how do I write my socket networking code to
> optimize the speed (e.g. any particular socket option to use)?
> Any tool for networking optimization?
We need to know a lot more before we have any change of being helpful.
For one thing, what protocol are you using? For another thing, why is
your packet size small?
Is your application primarily one way? Or does one side send a small
chunk of data and then wait for a reply before sending another?
When it sends one small chunk, does it know when it will need to send
the next one?
Give us something to go on.
DS
|
|
|
|
|