----- Original Message -----
From: "Federico Sevilla III" <[EMAIL PROTECTED]>
To: "Philippine Linux Users' Group Mailing List" <[EMAIL PROTECTED]>
Sent: Saturday, June 03, 2000 11:41 AM
Subject: [plug] Network tuning via /proc
> Hi there everyone,
>
> I just grabbed the powertweak-0.1.15 sources and bumped into the following
> in its documentation area (direct quote):
>
> ---
> Network optimisation.
> ~~~~~~~~~~~~~~~~~~~~~
> You should configure Powertweak to tune your network settings based upon
> what the system is mostly used for. (If both, choose the Internet
> settings).
>
> Disabling timestamping, window scaling and selective acknowledgement will
> result in slightly better ethernet performance.
>
> Internet:
> /proc/sys/net/ipv4/tcp_timestamps=1
> /proc/sys/net/ipv4/tcp_window_scaling=1
> /proc/sys/net/ipv4/tcp_sack=1
>
> Intranet:
> /proc/sys/net/ipv4/tcp_timestamps=0
> /proc/sys/net/ipv4/tcp_window_scaling=0
> /proc/sys/net/ipv4/tcp_sack=0
> ---
>
> I don't doubt this fellow, but would anyone be able to help me understand
> why disabling these three is beneficial in a LAN but not on the Internet?
> Also, I have a predicament, I have two Linux boxes. One is the Internet
> gateway of my LAN so is therefore on both an intranet and the Internet.
> Should I go with the defaults (all three enabled)? Or should I disable
> them?
>
> Thanks in advance! :)
>
hi jijo,
the above mentioned are correct.
let us go first with TCP TIMESTAMP, this is a part of tcp header in the
*options* section..... purpose for this is to let TCP perform more accurate
RTT (return time trip) for data segments. timestamp option lets the *sender*
place a timestamp value in every segment and the *receiver* copy this value
in the acknowledgement (ACK) packet..... purpose for this is to impose
accurate timing for slow start algorithm, congestion avoidance algorithm,
tcp timeout and retransmission timer algorithm, protection against wrapped
sequence numbers, what else do i miss?, and bandwidth-delay product on a
dirty, unstable and unpredictable link over WAN.... but for LAN, since we
can approximately compute the average RTT of a given ethernet bandwidth, no
need to use timestamp option that this will give extra bytes in the tcp
header that will consume extra bandwidth to degrade throughput.
for TCP WINDOW SCALING, this tcp option increases the definition of the
*tcp window* from 16bits to 32bits..... window scaling is apply to
*bandwidth-delay product* formula.... this formula that will determine how
big is your WINDOW size would be..... the formula is:
capacity (bits) = bandwidth (bits/sec) x roud-trip time (sec)
example:
for wan:
2mbps bandwidth with 300 ms rtt
capacity = 2048*1024 x .3 = 629145.6 bits / 8 bits = 78643.2 bytes
size of window
for lan:
10mbps bandwidth with 5 ms rtt
capacity = 10,000,000 x .005 = 50,000 bits / 8 bits = 6250 bytes
size of window
as you can see, for wan, you need a window scaling in order overcome the
16bits window size limit.... for lan, no need to enable window scaling
option since the size of window is less than 16bits maximum value plus it
will consume extra bytes on its header..... this will hold true on its
statement above. ever wonder why m$ window tcp stack default window size
value is only 8192? :->
and the last tcp option is SELECTIVE ACKNOWLEDGMENT, this option can
handle multiple dropped packets within a window. the receiver sends back
selective ack packets to the sender informing the sender of data that has
been received and the sender can then retransmit only the missing data
segments.... this is advantageous for WAN but not for LAN because packet
loss over lan is very minimal.... again, this will hold true on the above
statement.... but take note, this is still under debatable because it will
break some other RFCs. wonder why freebsd and other OS that uses 4.4BSDlite
tcp stack doesnt support SACK? :-> linux and m$ supports sack.
so for those three parameters enabling over wan and disabling over lan,
it will help on your throughput.
jijo, here is a very challenging part.... try to determine between
enabling and disabling DELAY ACKNOWLEDMENT over wan and lan in terms of
*throughput* versus *response time*..... good luck.
fooler.
-
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]