Network performance Improvements - tested

Using applications, configuring, problems
Post Reply
Message
Author
Mic67

Network performance Improvements - tested

#1 Post by Mic67 »

http://linuxgazette.iatp.by/issue54/issue54.html

Google tag
linuxgazette.iatp.by/issue54/issue54.html - 358k - Cached - Similar pages
Now this is a rather large HTML page at 358k and usually if I tried to open
any such web page it would usually stall the browser and the complete OS.

The purpose of visting this Linux page was not necessarly the content but
the size of the HTML page, for testing the memory modification made in
/proc.

Actually this is a dated web page on Linux but after making the adjustment
to the memory window in /proc I did notice a significant difference in web performance,
page loading, etc. So I thought I would try a (large) page which in every previous
instance stalled the browser and or complete system.

The following is the info. and values used in adjusting the system
to achieve the above.

http://gentoo-wiki.com/HOWTO_TCP_Tuning ... be_tweaked
"
Why TCP Needs to be tweaked

The last feature of TCP listed above, congestion control, can limit the performance of a TCP connection due to innappropriately configured protocol parameters. The main issue is the TCP "congestion window," a number representing the maximum amount of data that can be in-transit over the network at any one time. If this number is too low, the kernel will not transmit data, even when the link is uncongested."

"Variables to Change, and suggested Values
net.core.rmem_max="16777216"
This setting changes the maximum network receive buffer size to 16777216 bytes.
net.core.wmem_max="16777216"
The same thing for the send buffer
net.ipv4.tcp_rmem="4096 87380 16777216"
This sets the kernel's minimum, default, and maximum TCP receive buffer sizes. You might be surprised, seeing the maximum of 16M, that many Unix-like operating systems still have a maximum of 256K!
net.ipv4.tcp_wmem="4096 65536 16777216"
A similar setting for the TCP send buffer. Note that the default value is a little lower. Don't worry about this, the send buffer size is less important than the receive buffer.
net.ipv4.tcp_no_metrics_save=1
This removes an odd behavior in the 2.6 kernels, whereby the kernel stores the slow start threshold for a client between TCP sessions. This can cause undesired results, as a single period of congestion can affect many subsequent connections. I recommend that you disable it.
Warning: DO NOT USE THE SETTING ABOVE WITH 2.4 KERNELS. Instead, use
net.ipv4.route.flush = 1.
net.ipv4.ip_default_ttl = <<something random betweek 60 and 100 >>
I recommend putting a random number between 60 and 100 here because many attackers use the TTL (time to live) as a parameter for profiling your operating system. It is a simple way to very slightly increase your networking security."


"Receiver Buffer

If the receiver's receive buffer is too small, the sender will stop sending information even when the link has unused bandwith. The biggest improvement that can be made is to increase the default and maximum size of your receive window. This can greatly increase your TCP performance, often enough that you can visibly notice the difference. However, you need to be careful not to make the receive buffer too large, or the receiver can become flooded with packets if the sender can transmit faster than the receiver can receive.
[edit]
Transmit Buffer

There is little harm in increasing the size of your transmission buffer, as long as you have sufficient RAM. This may also increase performance slightly, as it reduces overhead of transferring data from the Application Layer to the Transport Layer of the network protocol stack.
[edit]
Minimum, Default, and Maximum values

The current linux kernels support dynamic sizing of these buffers. This means that the buffers change in size to attempt to fit the current TCP connection. This also means that each of these buffers has a minimum, default, and maximum value. As can be expected, the kernel will never decrease the buffer size below the minum, or above the maximum, and the buffer starts at the default size.
"

From
http://www.murga-linux.com/puppy/viewtopic.php?t=15657
The values suggested here are different by the concept is still the same.
Here is another link:
http://www.acc.umu.se/~maswan/linux-netperf.txt
TCP performance tuning - how to tune linux
Somewhat ADVANCED Good suggestions???? I dunno??? in this instance

___________________________________________________

Now, again what works for one system or user many not for others.

And the above adjustments may not be recommended for low memory (ram) systems.

Now from my understanding that any changes made in the /proc
which is a virtual file system will not be saved upon reboot.
In /
go to /proc and left click on the folder for "disk usage" and you ought
to find that it doesnt use any, because it is a virtual file system.

Using Puppy as a Live (closed) CD if a great way of testing any OS changes or TWEAKS
as every reboot is a fresh OS>

__________________________________________________________-

Mic67

#2 Post by Mic67 »

Some interesting articles:

http://www.linuxjournal.com/article/8308
Optimizing Desktop Performance, Part I

http://www.linuxjournal.com/article/8317
Optimizing Desktop Performance, Part II

http://www.linuxjournal.com/article/8322
Optimizing Desktop Performance, Part III

http://www.linuxjournal.com/article/2770
Tips for Optimizing Linux Memory Usage

http://www.linuxjournal.com/article/1091
Optimizing Linux's User Interface

http://www.linuxjournal.com/article/2751
Hints & Tips for Optimizing Linux Disk Usage

http://techrepublic.com.com/5208-6230-0 ... ID=2163729
Finally a balanced view from someone who uses both.

Other links and tips:
http://suseroot.com/suse-linux-tweaks/torsmo.php
Using Torsmo to Monitor Hardware

http://www.tunexp.com/news/windows-story-989.html
_________________________________
"Let's say that, like me, you have a local area network and then you have a connection to the internet. We're going to also say that the LAN is eth0 while the internet connection is called ppp0. Now suppose we wanted to allow telnet to run as a service to computers on the LAN but not on the insecure internet. Well there is an easy way to do this. We can use -i for the input interface and -o for the output interface. You could always block it on the OUTPUT chain, but we'd rather block it on the INPUT so that the telnet daemon never even sees the request. Therefore we'll use -i. This should set up just the rule:

iptables -A INPUT -p tcp --destination-port telnet -i ppp0 -j DROP

You might know that port 23 is for telnet, but you can just use the word telnet if you like."
NOTE sometimes you must use the port number rather than the alphabetic name.

-------------------------------------------

Post Reply