|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to boost network utilization with Socket/TcpClient (.NET 1.1)Hi,
I've developed program to sending Serializable message (using Attribute) with BinaryFormatter. But it can use Network utilization only 6% on 100Mbps LAN (check from Networking on TaskManager). The program is service guarantee model that send the message and wait for ack message before sending next message. Another point is that program will receive messages from clients and then queue them to send thread to send those messages to another machine. And my test environment is on XP box with HT machine. So, how can I do to improve the performance that will not affect design goal? Thanks in advance, Thana N. Hello, Thana!
TN> I've developed program to sending Serializable message (using TN> Attribute) with BinaryFormatter. But it can use Network utilization TN> only 6% on 100Mbps LAN (check from Networking on TaskManager). The TN> program is service guarantee model that send the message and wait for TN> ack message before sending next message. Another point is that program TN> will receive messages from clients and then queue them to send thread TN> to send those messages to another machine. And my test environment is TN> on XP box with HT machine. If your serialized messages are relatively small, then you can set SocketOptionName.NoDelay to disable possible Nagling. Also consider the fact that processing not related to Network I/O ( message serialization/deserialization ) can take some time... My program has also enable it, but its result as I've told before. Here,
anyway, is my code for that (if I do it wrong):- clientSock.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.NoDelay, 1) Thanks for your reply, Thana N. Show quote "Vadym Stetsyak" wrote: > Hello, Thana! > > TN> I've developed program to sending Serializable message (using > TN> Attribute) with BinaryFormatter. But it can use Network utilization > TN> only 6% on 100Mbps LAN (check from Networking on TaskManager). The > TN> program is service guarantee model that send the message and wait for > TN> ack message before sending next message. Another point is that program > TN> will receive messages from clients and then queue them to send thread > TN> to send those messages to another machine. And my test environment is > TN> on XP box with HT machine. > > If your serialized messages are relatively small, then you can set > SocketOptionName.NoDelay to disable possible Nagling. > > Also consider the fact that processing not related to Network I/O > ( message serialization/deserialization ) can take some time... > > -- > Regards, Vadym Stetsyak > www: http://vadmyst.blogspot Hello, Thana!
Another option for you is to send mutltiple messages at once and receive one confirmation for them all. I suppose that you have somekind of message id. This ids can be used in confirmation. Vadym,
Oh, I've forgot to tell you that message sequence is important for my case. So I can't send multiple messages at once. Sorry for your inconvenience. Thana N. Show quote "Vadym Stetsyak" wrote: > Hello, Thana! > > Another option for you is to send mutltiple messages at once and receive one confirmation for them all. > I suppose that you have somekind of message id. This ids can be used in confirmation. > > -- > Regards, Vadym Stetsyak > www: http://vadmyst.blogspot Hello, Thana!
You wrote on Thu, 31 Aug 2006 02:04:02 -0700: TN> Oh, I've forgot to tell you that message sequence is important for my TN> case. So I can't send multiple messages at once. Then it seems to me that your processing logic introduces some latency, that is why network is not fully utilized... "Thana N." <Tha***@discussions.microsoft.com> wrote in message
http://www.google.com/search?hl=en&q=%22Stop+and+Wait%22&btnG=Google+Search
news:8029CA44-6524-4B93-AB38-C71391288B44@microsoft.com... > Vadym, > > Oh, I've forgot to tell you that message sequence is important for my > case. > So I can't send multiple messages at once. > |
|||||||||||||||||||||||