Increasing TCP IP Efficiency

Okay, Well... This script is not a security script, nore a load balencing script. But it is a very useful script if you get high traffic or are hosting a Game Server. I've Had CounterStrike Server player ping go down as much as 50ms after running this script.

So what you want to do is log into your server's shell, and create a file (nano filename.sh). Once you create the file, you need to put this code in the file;

#!/bin/bash

# Create backup
if [ ! -e ./speed_backup.sh ] ; then
echo -n "Creating backup (`pwd`/speed_backup.sh)... "
echo "#!/bin/bash" > ./speed_backup.sh
echo "" >> ./speed_backup.sh
echo "echo \"`cat /proc/sys/net/ipv4/tcp_sack`\" > /proc/sys/net/ipv4/tcp_sack" >> ./speed_backup.sh
echo "echo \"`cat /proc/sys/net/ipv4/tcp_timestamps`\" > /proc/sys/net/ipv4/tcp_timestamps" >> ./speed_backup.sh
echo "echo \"`cat /proc/sys/net/ipv4/tcp_mem`\" > /proc/sys/net/ipv4/tcp_mem" >> ./speed_backup.sh
echo "echo \"`cat /proc/sys/net/ipv4/tcp_rmem`\" > /proc/sys/net/ipv4/tcp_rmem" >> ./speed_backup.sh
echo "echo \"`cat /proc/sys/net/ipv4/tcp_wmem`\" > /proc/sys/net/ipv4/tcp_wmem" >> ./speed_backup.sh
echo "echo \"`cat /proc/sys/net/core/optmem_max`\" > /proc/sys/net/core/optmem_max" >> ./speed_backup.sh
echo "echo \"`cat /proc/sys/net/core/rmem_default`\" > /proc/sys/net/core/rmem_default" >> ./speed_backup.sh
echo "echo \"`cat /proc/sys/net/core/rmem_max`\" > /proc/sys/net/core/rmem_max" >> ./speed_backup.sh
echo "echo \"`cat /proc/sys/net/core/wmem_default`\" > /proc/sys/net/core/wmem_default" >> ./speed_backup.sh
echo "echo \"`cat /proc/sys/net/core/wmem_max`\" > /proc/sys/net/core/wmem_max" >> ./speed_backup.sh
chmod 744 ./speed_backup.sh
echo -e "\tdone!"
else
echo "Backup found (`pwd`/speed_backup.sh). Skipping creation of one."
fi

# Boost buffer settings
echo -n "Boosting... "
echo "0" > /proc/sys/net/ipv4/tcp_sack
echo "0" > /proc/sys/net/ipv4/tcp_timestamps
echo "3129344 3137536 3145728" > /proc/sys/net/ipv4/tcp_mem
echo "65536 1398080 2796160" > /proc/sys/net/ipv4/tcp_rmem
echo "65536 1398080 2796160" > /proc/sys/net/ipv4/tcp_wmem
echo "163840" > /proc/sys/net/core/optmem_max
echo "1048560" > /proc/sys/net/core/rmem_default
echo "2097136" > /proc/sys/net/core/rmem_max
echo "1048560" > /proc/sys/net/core/wmem_default
echo "2097136" > /proc/sys/net/core/wmem_max
echo -e "\tdone!"

Now you need to chmod the file to 777 permissions, and execute it!

Please do not distribute this without giving credit to me or to eth0.us for hosting it!

What this does is increases your IP Buffer settings, making your connection more receptive. Very handy i think.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Thanks

Thanks for the information! I do not have experience with gamehosting but it sure looks like it could work =-) I have gone ahead and put this into the oganization so it is listed under general sys admin.

thanks :-)

thanks :-)

i get an error

./improve_speed.sh: line 8: syntax error near unexpected token `newline'
./improve_speed.sh: line 8: `echo "echo \"`cat /proc/sys/net/ipv4/tcp_sack`\" > /proc/sys/net/ipv4/tcp_sack" >> '

I get this error.What does it mean ?
improve_speed is teh file I created.

this would be an issue with

this would be an issue with your bash inturpreter, or an issue with your operating system.

This file is a very generic and simple program. You could do all of the changed settings yourself manually if you really wanted to.

Permanent?

Now is this permanent, or would you need to run this every time the system restarts. Have it execute on startup?

perm

It is perm and you don't have to do anything

How to undo the changes made by this script?

Hello,

Nifty! But a couple of suggestions --

1. Could you also include the script as a text file download so we don't copy/paste the wrong stuff by deleting the wrong newline chars and such?

2. How to undo the settings that have been changed by this script?

Thanks.

At the top of the script,

At the top of the script, you will see that it creates a backup file. Simply find that file and run it.

1 - this is a shell script,

1 - this is a shell script, it does everything for you... use a text-editor to put the script in a file, then permission the file, then run the file

2 - the script automaticly makes a backup of your current settings

Lines 33-37 :: Operation not permitted

Could it be that I am under virtuozzo control?
What is the impact of the accepted lines?
Do I need to run the backup script to put everything back?

./improve_speed.sh: line 33: /proc/sys/net/ipv4/tcp_sack: Operation not permitted
./improve_speed.sh: line 34: /proc/sys/net/ipv4/tcp_timestamps: Operation not permitted
./improve_speed.sh: line 35: /proc/sys/net/ipv4/tcp_mem: Operation not permitted
./improve_speed.sh: line 36: /proc/sys/net/ipv4/tcp_rmem: Operation not permitted
./improve_speed.sh: line 37: /proc/sys/net/ipv4/tcp_wmem: Operation not permitted

TCP eficiency

No it cannot be run within a VZ, nothing changed and you are fine.

pardone

ftp(schimiccitrasporti.it, febridance.it, maslyanovs.ru)(300good)(qwerti)A man formerly held in the U.S. facility in Guantanamo Bay, Cuba, was killed Wednesday in a shootout with security agents in a restive North Caucasus republic, Russias top security agency said. ADVERTISEMENT succhiate di cazzo, video gratis cicciolina. Ruslan Odizhev was killed amid gunfire that erupted when agents tried to arrest him and another man in Kabardino-Balkariya, aa region near Chechnya that is plagued by violence linked both to crime and to religious tensions, the Federal Security Service said in a statement. ventaclub sicilia, versioni di aulo gellio. The service, known by its Russian acronym FSB, said Odizhev had been held at Guantanamo Bay and was believed to have been a supporter of the Taliban. Odizhev was one of seven Russians released from the detention facility in 2004; his whereabouts recently had been unknown. ringhiera in acciaio, Homemade Video. The FSB did not specify why agents were trying to detain him, but said he was a suspect in the 1999 bombings of apartment buildings in Moscow and Volgodonsk and that he took part in a 2005 insurgent attack on police and government facilities in Nalchik, the capital of Kabardino-Balkariya. video gratis di donna mature, compleanno immagini. That attack left 139 people dead, including 94 militants. Chechen warlord Shamil Basayev, who was killed in 2006, claimed credit for planning the attack. ringhiera in acciaio, Cappotto. The FSB said Odizhev was the spiritual leader of Yarmuk, an Islamic extremist organization connected to an array of violence in the region. zara abbigliamento, meteoitalia it. The office of the republics top prosecutor, Oleg Zharikov, said Odizhev was killed in Nalchik and that three homemade explosive devices were found on his body. It said he and a rebel named Anzor Tengizov were cornered by agents in the courtyard of an apartment building across the street from a mosque in the city. cristina ricci nuda, patente guida quiz. Odizhev and six other Russians who had been detained in Afghanistan were released from Guantanamo in 2004 after investigators said they found no evidence of their involvement with the Taliban. Several were briefly jailed after returning to Russia. Pisello Duro, Alfabeto Elfico. In March, Human Rights Watch charged that the seven had been tortured or harassed and abused by Russian law enforcement agents since their return. viaccess key, Mamme Incinte. One of them, Rasul Kudayev, is in custody in Nalchik on charges of participating in the 2005 attack. His mother told The Associated Press this spring that he had been repeatedly beaten. fotos gangbang, compleanno immagini. Two others, Ravil Gumarov and Timur Ishmuratov, were sentenced last year to prison terms of 13 and 11 years for blowing up a natural gas pipeline, even though they had been acquitted of the charges in an earlier trial

pardone

eb5eb8c44a696e93a283271dbb72797cA man formerly held in the U.S. facility in Guantanamo Bay, Cuba, was killed Wednesday in a shootout with security agents in a restive North Caucasus republic, Russias top security agency said. ADVERTISEMENT loredana bontempi video, foto topless gratis. Ruslan Odizhev was killed amid gunfire that erupted when agents tried to arrest him and another man in Kabardino-Balkariya, aa region near Chechnya that is plagued by violence linked both to crime and to religious tensions, the Federal Security Service said in a statement. Tema svolto razzismo, Arma Tiro It. The service, known by its Russian acronym FSB, said Odizhev had been held at Guantanamo Bay and was believed to have been a supporter of the Taliban. Odizhev was one of seven Russians released from the detention facility in 2004; his whereabouts recently had been unknown. foto chiavate gratis, foto chiavate. The FSB did not specify why agents were trying to detain him, but said he was a suspect in the 1999 bombings of apartment buildings in Moscow and Volgodonsk and that he took part in a 2005 insurgent attack on police and government facilities in Nalchik, the capital of Kabardino-Balkariya. sesso porno filmato gratis figa, inviti compleanno stampare. That attack left 139 people dead, including 94 militants. Chechen warlord Shamil Basayev, who was killed in 2006, claimed credit for planning the attack. pokemon verde foglia soluzione, porno foto mature. The FSB said Odizhev was the spiritual leader of Yarmuk, an Islamic extremist organization connected to an array of violence in the region. codice sblocco lg u8330, bocchino ingoio video gratis. The office of the republics top prosecutor, Oleg Zharikov, said Odizhev was killed in Nalchik and that three homemade explosive devices were found on his body. It said he and a rebel named Anzor Tengizov were cornered by agents in the courtyard of an apartment building across the street from a mosque in the city. video bacio saffico, melina perez nuda. Odizhev and six other Russians who had been detained in Afghanistan were released from Guantanamo in 2004 after investigators said they found no evidence of their involvement with the Taliban. Several were briefly jailed after returning to Russia. segno zodiacale scorpione, diva wwe nuda. In March, Human Rights Watch charged that the seven had been tortured or harassed and abused by Russian law enforcement agents since their return. fumetto di selen, Negrette. One of them, Rasul Kudayev, is in custody in Nalchik on charges of participating in the 2005 attack. His mother told The Associated Press this spring that he had been repeatedly beaten. video porno italiano gratis, mondopompino. Two others, Ravil Gumarov and Timur Ishmuratov, were sentenced last year to prison terms of 13 and 11 years for blowing up a natural gas pipeline, even though they had been acquitted of the charges in an earlier trial

Powered by Drupal - Theme created by Danger4k