public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] FreeBSD Stack/ Throughput over TCP/IP
@ 2004-09-02 13:15 Richard Rauch
  2004-09-02 13:19 ` Tim michals
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Rauch @ 2004-09-02 13:15 UTC (permalink / raw)
  To: ecos-discuss

Hi all,

we are using the FreeBSD stack.
We established a TCP/IP connection and have to receive data from a PC as
fast as possible.
The throughput is insufficient, because after a packet received, the stack
waits up to 30ms to respond with Ack.

If we have a bidirectional communication, the throughput is much better,
because there a no acknowledge delays.

How we can change this behaviour to become maximal throughput
unidirectional?

Thanks
Richard



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] FreeBSD Stack/ Throughput over TCP/IP
  2004-09-02 13:15 [ECOS] FreeBSD Stack/ Throughput over TCP/IP Richard Rauch
@ 2004-09-02 13:19 ` Tim michals
  2004-09-02 13:42   ` sebastien Couret
  2004-09-02 14:02   ` Richard Rauch
  0 siblings, 2 replies; 5+ messages in thread
From: Tim michals @ 2004-09-02 13:19 UTC (permalink / raw)
  To: Richard Rauch, ecos-discuss

If your sending small size packets? If so you must
turn nagle off, it might be limiting your throughput.


--- Richard Rauch <Richard.Rauch@vipa.de> wrote:

> Hi all,
> 
> we are using the FreeBSD stack.
> We established a TCP/IP connection and have to
> receive data from a PC as
> fast as possible.
> The throughput is insufficient, because after a
> packet received, the stack
> waits up to 30ms to respond with Ack.
> 
> If we have a bidirectional communication, the
> throughput is much better,
> because there a no acknowledge delays.
> 
> How we can change this behaviour to become maximal
> throughput
> unidirectional?
> 
> Thanks
> Richard
> 
> 
> 
> -- 
> Before posting, please read the FAQ:
> http://ecos.sourceware.org/fom/ecos
> and search the list archive:
> http://ecos.sourceware.org/ml/ecos-discuss
> 
> 



		
_______________________________
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] FreeBSD Stack/ Throughput over TCP/IP
  2004-09-02 13:19 ` Tim michals
@ 2004-09-02 13:42   ` sebastien Couret
  2004-09-02 14:02   ` Richard Rauch
  1 sibling, 0 replies; 5+ messages in thread
From: sebastien Couret @ 2004-09-02 13:42 UTC (permalink / raw)
  To: Tim michals; +Cc: ecos-discuss

I have obtained better FreeBSD TCP and UDP benchmarks (throughput multiplied 
by 6) by disabling debugging options in the eCOS library via configtool 
(disabling things such asserts,tracing,GDB stubs and so on ... )

You should also try to find out the optimum packet size to send to obtain the 
best throughtput (tcpblast is a nice free tool for doing such thing ...)

Hope this help, 
Have a nice day.



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [ECOS] FreeBSD Stack/ Throughput over TCP/IP
  2004-09-02 13:19 ` Tim michals
  2004-09-02 13:42   ` sebastien Couret
@ 2004-09-02 14:02   ` Richard Rauch
  2004-09-05  8:37     ` Andrew Lunn
  1 sibling, 1 reply; 5+ messages in thread
From: Richard Rauch @ 2004-09-02 14:02 UTC (permalink / raw)
  To: 'Tim michals', ecos-discuss

thanks for your info, but we already turning off nagle with following code

int CRFC1006SvrLine::Nagle(SOCKET Socket, bool bMode)
{
   _ASSERTE(Socket != INVALID_SOCKET);
   int iPar = bMode ? -1 : 0;
   int iError = setsockopt(Socket,      // socket
                           IPPROTO_TCP,   // level
                           TCP_NODELAY,   // optname
                           (char*)&iPar, // optval
                           sizeof(iPar)  // size
                           );
}

-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org
[mailto:ecos-discuss-owner@ecos.sourceware.org]On Behalf Of Tim michals
Sent: Donnerstag, 2. September 2004 15:19
To: Richard Rauch; ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] FreeBSD Stack/ Throughput over TCP/IP


If your sending small size packets? If so you must
turn nagle off, it might be limiting your throughput.


--- Richard Rauch <Richard.Rauch@vipa.de> wrote:

> Hi all,
> 
> we are using the FreeBSD stack.
> We established a TCP/IP connection and have to
> receive data from a PC as
> fast as possible.
> The throughput is insufficient, because after a
> packet received, the stack
> waits up to 30ms to respond with Ack.
> 
> If we have a bidirectional communication, the
> throughput is much better,
> because there a no acknowledge delays.
> 
> How we can change this behaviour to become maximal
> throughput
> unidirectional?
> 
> Thanks
> Richard
> 
> 
> 
> -- 
> Before posting, please read the FAQ:
> http://ecos.sourceware.org/fom/ecos
> and search the list archive:
> http://ecos.sourceware.org/ml/ecos-discuss
> 
> 



		
_______________________________
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss




-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] FreeBSD Stack/ Throughput over TCP/IP
  2004-09-02 14:02   ` Richard Rauch
@ 2004-09-05  8:37     ` Andrew Lunn
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2004-09-05  8:37 UTC (permalink / raw)
  To: Richard Rauch; +Cc: 'Tim michals', ecos-discuss

On Thu, Sep 02, 2004 at 04:01:50PM +0200, Richard Rauch wrote:
> thanks for your info, but we already turning off nagle with following code
> 
> int CRFC1006SvrLine::Nagle(SOCKET Socket, bool bMode)
> {
>    _ASSERTE(Socket != INVALID_SOCKET);
>    int iPar = bMode ? -1 : 0;

I don#t have access to the manuals at the momemnt..... but i normally
use 0 and 1 for these options, not -1. 

There are two mechanisms at play here. One is on the sender. It will
hold small writes in a buffer for a while hoping it combine a number
together to form one bigger packet to send. The other mecanism is
delayed ACK. An ACK ACKs a range of packets not one, so by delaying
the ack it might be able to ack a number of incomming packets so
saving bandwidth. During startup this might have some performance
impact when the window is small and it will not send many packets
before needing the ACK. Once the connection is well established and
the window is large there should not be any performance impact.  There
should be a way to disable delayed acks, but i cannot remember from
the top of my head.

One thing to note. IP is none real time, ie best effort. You can
optimize its performance, but you can never realy on it providing the
bandwidth you require. You must design you system with this in mind.

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-09-05  8:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-02 13:15 [ECOS] FreeBSD Stack/ Throughput over TCP/IP Richard Rauch
2004-09-02 13:19 ` Tim michals
2004-09-02 13:42   ` sebastien Couret
2004-09-02 14:02   ` Richard Rauch
2004-09-05  8:37     ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).