Re: Download speed and TCPIP window sizing

2007-06-04 Thread Brian Somers
On Thu, 31 May 2007 22:06:39 +0800 Pang <[EMAIL PROTECTED]> wrote:
>   Could anyone tell me whether my understanding on Window sizing 
> correct? Also, is there any way to alter the window sizing in freebsd or 
> apache?

AFAIK you can't increase the window size unless you use
the tcp wscale option (it's a 2-byte value).  This wasn't
possible 'till recently in -current:

andre   2007-02-01 17:39:19 UTC

  FreeBSD src repository

  Modified files:
sys/netinet  tcp_syncache.c tcp_usrreq.c 
  Log:
  Change the way the advertized TCP window scaling is computed.  Instead of
  upper-bounding it to the size of the initial socket buffer lower-bound it
  to the smallest MSS we accept.  Ideally we'd use the actual MSS information
  here but it is not available yet.
  
  For socket buffer auto sizing to be effective we need room to grow the
  receive window.  The window scale shift is determined at connection setup
  and can't be changed afterwards.  The previous, original, method effectively
  just did a power of two roundup of the socket buffer size at connection
  setup severely limiting the headroom for larger socket buffers. 

  Tested by:  many (as part of the socket buffer auto sizing patch)
  MFC after:  1 month
  
  Revision  ChangesPath
  1.104 +8 -2  src/sys/netinet/tcp_syncache.c
  1.143 +7 -2  src/sys/netinet/tcp_usrreq.c

This may not be MFC'd (I think I'd object if it was)
as there are several old OpenBSD/pf setups that have
issues with wscale > 4.  Hopefully these setups will
be fixed by the time 7.0 is released, as windows/vista
and linux/debian now set wscale > 4 too.

The patch is pretty small though, so you may want to
try applying it to your box to see if it helps.

HTH.

-- 
Brian Somers  <[EMAIL PROTECTED]>
Don't _EVER_ lose your sense of humour !   <[EMAIL PROTECTED]>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Squid, FreeBSD, Multilink PPP

2004-06-30 Thread Brian Somers
On Wed, 30 Jun 2004 12:43:14 +0300, Gregory Edigarov <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> I have Squid-2.5 running on FreeBSD 5-Current. We have 2 ppp links,
> and use them in multilink mode, through userlevel ppp.
> If one or both links fail and then come up, say, if I just turn the
> modem power off and on all the  web browsing becomes very slow
> squid.
> It takes forever for squid to show a page which, in a normal
> conditions, would take only a few seconds. Pings to those sites I am
> trying to open are just fine.
> Taking squid down and then up have no effect. The only thing help is
> rebooting
> the whole system.
> 
> Is there anything I can do?

How does ppp deal with the link loss - does it notice immediately ?  I
would expect very little latency if it does as it should be able to just
trash the existing queued data and continue using the other link.

I guess other connections suffer the same problems -- it's not just squid ?

It might be interesting doing a ``show mp'' or ``show bundle'' to determine
what sort of packet queuing and reassembly is happening after the link is
lost.

If the queues are large, you might get slightly better performance by
reducing the links mtu (set mtu max), but really, things should recover
ok even with a ~1500 MTU.

-- 
Brian <[EMAIL PROTECTED]><[EMAIL PROTECTED]>
     <[EMAIL PROTECTED]>
Don't _EVER_ lose your sense of humour !
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: [PATCH2] PPP in -direct mode does not execute any chat scripts

2003-03-25 Thread Brian Somers
Hi,

Yes, this looks fine, although I think this shows that the -direct
description is wrong.  Perhaps this is more appropriate:

-direct
   This is used for communicating over an already established connection,
   usually when receiving incoming connections accepted by getty(8).  ppp
   ignores the ``set device'' line and uses descriptor 0 as the link.  ppp
   will ignore any configured chat scripts unless the ``force-scripts''
   option has been enabled.

   If callback

Do you agree with this description ?  If so, I'll go ahead and commit the
changes.  Just to be picky, I'll re-sort the OPT_ variables too :*P

And thanks for the patches.

On Mon, 03 Feb 2003 14:45:37 -0800, Maksim Yevmenkin wrote:
> Dear Brian and Hackers,
> 
> Please find updated proposed version of the patch. As suggested by
> Warner option has been renamed to 'force-sripts' and now works for
> both 'direct' and 'dedicated' modes. Also as suggested by Terry the
> man page has been updated to document side effect of 'direct'.
> 
> -direct
>This is used for receiving incoming connections.  ppp ignores the
>``set device'' line and uses descriptor 0 as the link.  ppp will
>never use any configured chat scripts unless ``force-scripts''
>option has been enabled.
> 
>If callback is configured, ppp will use the ``set device'' infor-
>mation when dialing back.
> 
> -dedicated
>This option is designed for machines connected with a dedicated
>wire.  ppp will always keep the device open and will never use
>any configured chat scripts unless ``force-scripts'' option has
>been enabled.
> 
> force-scripts
>Default: Disabled. Forces execution of the configured chat
>scripts in direct and dedicated modes.
> 
> >>Please find attached patch that adds new option to the PPP.
> >>
> >>run-scripts-in-direct-mode
> >>Default: Disabled. This allows to run chat scripts in
> >>direct mode.
> >>
> >>did i miss anything? objections? comments? reviews?
> > 
> > 
> > First comment: run it past Brian Somers <[EMAIL PROTECTED]>; it's
> > his baby, and he's the active maintainer.
> 
> I have sent him e-mail.
> 
> > Rest of comments:
> > 
> > Actually, why doesn't "-direct" allow a chat script by default?
> > The man page doesn't document that as a side-effect of "-direct",
> > only of "-dedicated", but it's been there since the import.
> > 
> > Should this really be a "negotiate" section command, rather than
> > just a command or a "set" command?
> > 
> > Also, there are only two other commands even have a "-" in them,
> > and both of them only have one (just seems a little long, compared
> > to, say, "rsid" or "direct-with-script", or even "force-script").
> > 
> > Personal preference: don't make it conditional on "-direct", let
> > it also work with "-dedicated", and call it "force-script" or
> > something, instead.
> 
> done
> 
> > The man page should be updated -- including the undocumented
> > side-effect of "-direct" disabling scripts).
> 
> done
> 
> thanks
> max
> 


-- 
Brian <[EMAIL PROTECTED]>   <[EMAIL PROTECTED]>
  <http://www.Awfulhak.org><[EMAIL PROTECTED]>
Don't _EVER_ lose your sense of humour !   <[EMAIL PROTECTED]>
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"