Page 1 of 2

Broadband Internet? Some tweaks for you

Posted: Wed Feb 21, 2007 2:29 am
by marcus0263
If you've got a broadband connection (not satellite !) I think you'll be pleased

Crack open your favorite editor (real geeks use vi ;-) ) and edit

/etc/init.d/rc.local

add this

Code: Select all

echo 256960 > /proc/sys/net/core/rmem_default
echo 256960 > /proc/sys/net/core/rmem_max
echo 256960 > /proc/sys/net/core/wmem_default
echo 256960 > /proc/sys/net/core/wmem_max

echo 0 > /proc/sys/net/ipv4/tcp_timestamps 
echo 1 > /proc/sys/net/ipv4/tcp_sack 
echo 1 > /proc/sys/net/ipv4/tcp_window_scaling
These changes will take on your next system boot. You'll be pleased with the results, nothing drastic but you'll notice a difference. It's just a bit of optimization for broadband ;-)

Posted: Wed Feb 21, 2007 6:22 am
by bernado
Could you please tell us more about the effects before I start to manipulate the file ?javascript:emoticon('8)')
Cool

Bernado

Posted: Wed Feb 21, 2007 9:59 am
by marcus0263
bernado wrote:Could you please tell us more about the effects before I start to manipulate the file ?javascript:emoticon('8)')
Cool

Bernado
It's basically setting the TCP Window to 256960, disabling timestamps (to avoid 12 byte header overhead), enabling tcp window scaling, and selective ACK's.

Try it out before you mod the script

Code: Select all

echo 256960 > /proc/sys/net/core/rmem_default && echo 256960 > /proc/sys/net/core/rmem_max && echo 256960 > /proc/sys/net/core/wmem_default && echo 256960 > /proc/sys/net/core/wmem_max && echo 0 > /proc/sys/net/ipv4/tcp_timestamps && echo 1 > /proc/sys/net/ipv4/tcp_sack && echo 1 > /proc/sys/net/ipv4/tcp_window_scaling

Posted: Sun Apr 08, 2007 8:34 pm
by Rainmaker
I got the message that I didn't have sufficient permission to modify the file (root only permission). Mint (being Ubuntu based) is different to the RPM based distros I'm used to (like CentOS, PCLinuxOS etc) and won't allow me to "open as root" the directory or file, to make changes.

I even opened Terminal and tried

cd /etc/init.d

and then

sudo chmod +w rc.local

and so on, to allow me to write to the directory and change the file, but to no avail. What am I doing wrong? :oops:

Posted: Sun Apr 08, 2007 8:41 pm
by marcus0263
Rainmaker wrote:I got the message that I didn't have sufficient permission to modify the file (root only permission). Mint (being Ubuntu based) is different to the RPM based distros I'm used to (like CentOS, PCLinuxOS etc) and won't allow me to "open as root" the directory or file, to make changes.

I even opened Terminal and tried

cd /etc/init.d

and then

sudo chmod +w rc.local

and so on, to allow me to write to the directory and change the file, but to no avail. What am I doing wrong? :oops:
AAAAAAAAAAAAAAAAAAAAAAAA DO NOT and I mean DO NOT mess with the write permissions.

just

sudo su

This will put you in root

then either use vi or nano to make the changes, and of course back up the original

Posted: Sun Apr 08, 2007 8:49 pm
by Rainmaker
marcus0263 wrote:
Rainmaker wrote:I got the message that I didn't have sufficient permission to modify the file (root only permission). Mint (being Ubuntu based) is different to the RPM based distros I'm used to (like CentOS, PCLinuxOS etc) and won't allow me to "open as root" the directory or file, to make changes.

I even opened Terminal and tried

cd /etc/init.d

and then

sudo chmod +w rc.local

and so on, to allow me to write to the directory and change the file, but to no avail. What am I doing wrong? :oops:
AAAAAAAAAAAAAAAAAAAAAAAA DO NOT and I mean DO NOT mess with the write permissions.

just

sudo su

This will put you in root

then either use vi or nano to make the changes, and of course back up the original
Ahh! Sudo su - so THAT'S how to get root in mint! :D Got that far in terminal - now how do I open the file in vi or nano as root? Some kind of terminal command I take it?

Sorry, I've only been in linux a short time. I'm not afraid of the command line, but only learning a little each day :) Thanks for all your help.

Posted: Sun Apr 08, 2007 8:54 pm
by marcus0263
Rainmaker wrote:
marcus0263 wrote:
Rainmaker wrote:I got the message that I didn't have sufficient permission to modify the file (root only permission). Mint (being Ubuntu based) is different to the RPM based distros I'm used to (like CentOS, PCLinuxOS etc) and won't allow me to "open as root" the directory or file, to make changes.

I even opened Terminal and tried

cd /etc/init.d

and then

sudo chmod +w rc.local

and so on, to allow me to write to the directory and change the file, but to no avail. What am I doing wrong? :oops:
AAAAAAAAAAAAAAAAAAAAAAAA DO NOT and I mean DO NOT mess with the write permissions.

just

sudo su

This will put you in root

then either use vi or nano to make the changes, and of course back up the original
Ahh! Sudo su - so THAT'S how to get root in mint! :D Got that far in terminal - now how do I open the file in vi or nano as root? Some kind of terminal command I take it?

Sorry, I've only been in linux a short time. I'm not afraid of the command line, but only learning a little each day :) Thanks for all your help.

Code: Select all

nano -w /etc/init.d/rc.local 

Posted: Sun Apr 08, 2007 9:07 pm
by Rainmaker
All done, thanks very much for the help marcus! Like I said, with a little help from the linux community I learn somethin' new every day :D

Cheers.

Lee

Posted: Mon Apr 16, 2007 9:43 am
by mcrofutt
For us VERY non-techies use "sudo gedit" minus the quotes, of course. I've yet to get all the tricks of nano,,,,lol. I guess I need to RTFM?! LOL 8)
Mark

Posted: Wed Apr 18, 2007 11:50 am
by Reuel
I was doing something entirely different, and found that if I changed root's password, and logged in as root, I could do whatever I wanted without those access denied thingies.

Posted: Wed Apr 18, 2007 11:51 am
by scorp123
Reuel wrote:I was doing something entirely different, and found that if I changed root's password, and logged in as root, I could do whatever I wanted without those access denied thingies.
That's precisely why you are not supposed to login as root unless you have some sysadmin stuff to do!!

Posted: Wed Apr 18, 2007 11:59 am
by Reuel
Good point! I'm still learning, though. I suppose if I log on as root and screw something up, it's my own fault if I have to reformat my hard drive.

Posted: Wed Apr 18, 2007 12:55 pm
by scorp123
Reuel wrote:I suppose if I log on as root and screw something up ...
That can happen quicker than you might want to believe :twisted: ... accidental drag & drop operations (moving files where they don't belong ... but you are root and the system will do it without hesitation!), accidentally modifying stuff which wasn't supposed to be modified (but you are root and won't notice until it's too late ...), running programs and processes with permissions and priorities they were never intended to have (e.g. people running GNOME / KDE / Firefox as root and then wondering how come that this JavaScript-infested script-kiddie web page they just visited was able to wreak havoc on their system ...) ...

The list goes on and on and on. The rules are simple:

1. You are not supposed to login into a GUI as root

2. You are not supposed to login as root unless you really really have to and really really have sysadmin stuff to do

3. There are very good reasons why "su -" and "sudo" exist :twisted:

Posted: Thu May 17, 2007 3:06 pm
by marcus0263
mcrofutt wrote:For us VERY non-techies use "sudo gedit" minus the quotes, of course. I've yet to get all the tricks of nano,,,,lol. I guess I need to RTFM?! LOL 8)
Mark
vi

nano is for wussies and n00b's and gedit is for the M$ minions ;-)

Posted: Sat May 19, 2007 7:40 am
by finux
marcus0263 wrote:
mcrofutt wrote:For us VERY non-techies use "sudo gedit" minus the quotes, of course. I've yet to get all the tricks of nano,,,,lol. I guess I need to RTFM?! LOL 8)
Mark
vi

nano is for wussies and n00b's and gedit is for the M$ minions ;-)
Well that's a nice approach for a howto section, btw do you find calling people n00b's, minions, and wussies a good way of helping people learn more about Linux. I bet your real approachable, and of course you where born with all your superior linux knowledge.

Sorry guys, just find comments like this one to be a real shame, and all it does is scare new users off, and who could blame them with guys like this.

Oh yeah, and well done on Cassandra - another good distro

Laters

Finux

Posted: Sat May 19, 2007 7:44 am
by marcus0263
finux wrote:
marcus0263 wrote:
mcrofutt wrote:For us VERY non-techies use "sudo gedit" minus the quotes, of course. I've yet to get all the tricks of nano,,,,lol. I guess I need to RTFM?! LOL 8)
Mark
vi

nano is for wussies and n00b's and gedit is for the M$ minions ;-)
Well that's a nice approach for a howto section, btw do you find calling people n00b's, minions, and wussies a good way of helping people learn more about Linux. I bet your real approachable, and of course you where born with all your superior linux knowledge.

Sorry guys, just find comments like this one to be a real shame, and all it does is scare new users off, and who could blame them with guys like this.

Oh yeah, and well done on Cassandra - another good distro

Laters

Finux
Lighten up Dude! I guess some just don't have a sense of humor :roll:

Posted: Sat May 19, 2007 7:47 am
by finux
Sorry dude, if it was joke - then we have totally different senses of humour.

But in my defence saying things like that is it any wonder there taken out of context

Posted: Sat May 19, 2007 7:58 am
by marcus0263
finux wrote:Sorry dude, if it was joke - then we have totally different senses of humour.

But in my defence saying things like that is it any wonder there taken out of context
Well I guess I missed the "Sensitivity" training.

To give you a hint, joking around about and trading "barbs" with vi has been around for decades.

Posted: Sat May 19, 2007 8:08 am
by finux
Well in that case i think RMS summed it up the best "vi vi vi is the editor of the beast."

but thanks for the hint dude, and if your looking for sensitive training just drop me a PM i should be able to give u some pointers, and you can give me some about having a sense of humour.

Speak to you later

Finux

Posted: Sat May 19, 2007 8:34 am
by marcus0263
finux wrote:Well in that case i think RMS summed it up the best "vi vi vi is the editor of the beast."

but thanks for the hint dude, and if your looking for sensitive training just drop me a PM i should be able to give u some pointers, and you can give me some about having a sense of humour.

Speak to you later

Finux
Yep, vi is the editor of the Beast!

As for "Sensitivity" training, sorry don't have the time, too busy reading manuals on computing. :wink: