Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old February 2nd, 2007, 11:35 AM
sherkhan
Guest
 
Posts: n/a
Default How relevant is "Automatic TCP Window Tuning" in Networking Applications ?

Hello Everyone.

I have come across this article (http://dast.nlanr.net/Projects/
Autobuf_v1.0/autotcp.html) called "Automatic TCP window tuning". After
my first newbie file transfer I wrote and found that it was just
extremely slow over net, compared to http or ftp. I have been thinking
of reasons. After reading the article I modified the server and
clients.. in the following way..

server...
/*setting socket Opttions to windows size to 780K.. 780 * 1024
*/
int window_size = 2000 * 1024;
mySocket = socket(AF_INET, SOCK_STREAM, 0);
setsockopt(mySocket, SOL_SOCKET, SO_SNDBUF,
(char *) &window_size, sizeof(window_size));
setsockopt(mySocket, SOL_SOCKET, SO_RCVBUF,
(char *) &window_size, sizeof(window_size));

on client...

/*set Socket Option.. 1000 * 1024*/
int window_size = 780 * 1024;
s = socket(AF_INET, SOCK_STREAM, 0);
setsockopt(s, SOL_SOCKET, SO_SNDBUF,
(char *) &window_size, sizeof(window_size));
setsockopt(s, SOL_SOCKET, SO_RCVBUF,
(char *) &window_size, sizeof(window_size));
/*End Of set Socket Option*/

with this I got a better transfer rate.. I mean 10 times faster. :)
its even better in LAN. I got 1 GB transfered in 200 secs. faster than
it took to create the file.

Now I have a question, do Apache (HTTP server) and FTP servers employ
such a TCP window tunning. Is it hard coded ( I mean is there a
optimum value known ?) for all types of networks ?
since even when I download a file through HTTP its nearly the same
speed, as I achieved by increasing the TCP window.

cheers.

 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles