Broadband Internet? Some tweaks for you

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
User avatar
marcus0263
Level 4
Level 4
Posts: 365
Joined: Mon Dec 25, 2006 9:40 am
Location: Seattle
Contact:

Broadband Internet? Some tweaks for you

Post 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 ;-)
bernado

Post by bernado »

Could you please tell us more about the effects before I start to manipulate the file ?javascript:emoticon('8)')
Cool

Bernado
User avatar
marcus0263
Level 4
Level 4
Posts: 365
Joined: Mon Dec 25, 2006 9:40 am
Location: Seattle
Contact:

Post 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
Rainmaker
Level 1
Level 1
Posts: 15
Joined: Sun Apr 08, 2007 8:22 pm

Post 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:
User avatar
marcus0263
Level 4
Level 4
Posts: 365
Joined: Mon Dec 25, 2006 9:40 am
Location: Seattle
Contact:

Post 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
Rainmaker
Level 1
Level 1
Posts: 15
Joined: Sun Apr 08, 2007 8:22 pm

Post 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.
User avatar
marcus0263
Level 4
Level 4
Posts: 365
Joined: Mon Dec 25, 2006 9:40 am
Location: Seattle
Contact:

Post 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 
Rainmaker
Level 1
Level 1
Posts: 15
Joined: Sun Apr 08, 2007 8:22 pm

Post 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
User avatar
mcrofutt
Level 1
Level 1
Posts: 15
Joined: Sat Dec 02, 2006 5:20 pm

Post 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
scorp123
Level 8
Level 8
Posts: 2272
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Post 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!!
scorp123
Level 8
Level 8
Posts: 2272
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Post 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:
User avatar
marcus0263
Level 4
Level 4
Posts: 365
Joined: Mon Dec 25, 2006 9:40 am
Location: Seattle
Contact:

Post 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 ;-)
User avatar
marcus0263
Level 4
Level 4
Posts: 365
Joined: Mon Dec 25, 2006 9:40 am
Location: Seattle
Contact:

Post 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:
Shuttle SX58
Intel i7 Gulftown Hex Core
G.Skill 16Gig 1333
OCS Vertex 2 SSD
Segate SATA II
Palit GeForce GTS 450
LMKDE 14 64Bit

Where Thought Crime is Committed
Reject the Herd
User avatar
marcus0263
Level 4
Level 4
Posts: 365
Joined: Mon Dec 25, 2006 9:40 am
Location: Seattle
Contact:

Post 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.
Shuttle SX58
Intel i7 Gulftown Hex Core
G.Skill 16Gig 1333
OCS Vertex 2 SSD
Segate SATA II
Palit GeForce GTS 450
LMKDE 14 64Bit

Where Thought Crime is Committed
Reject the Herd
User avatar
marcus0263
Level 4
Level 4
Posts: 365
Joined: Mon Dec 25, 2006 9:40 am
Location: Seattle
Contact:

Post 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:
Shuttle SX58
Intel i7 Gulftown Hex Core
G.Skill 16Gig 1333
OCS Vertex 2 SSD
Segate SATA II
Palit GeForce GTS 450
LMKDE 14 64Bit

Where Thought Crime is Committed
Reject the Herd
scorp123
Level 8
Level 8
Posts: 2272
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Post by scorp123 »

marcus0263 wrote:Lighten up Dude! I guess some just don't have a sense of humor :roll:
Ha ha ha ... I too already got into trouble like that because some people tend to totally misunderstand my sarcasm from time to time :D
User avatar
marcus0263
Level 4
Level 4
Posts: 365
Joined: Mon Dec 25, 2006 9:40 am
Location: Seattle
Contact:

Post by marcus0263 »

scorp123 wrote:
marcus0263 wrote:Lighten up Dude! I guess some just don't have a sense of humor :roll:
Ha ha ha ... I too already got into trouble like that because some people tend to totally misunderstand my sarcasm from time to time :D
Guess people don't understand Unix Geek Humor :shock:

Oh Well :roll:
Shuttle SX58
Intel i7 Gulftown Hex Core
G.Skill 16Gig 1333
OCS Vertex 2 SSD
Segate SATA II
Palit GeForce GTS 450
LMKDE 14 64Bit

Where Thought Crime is Committed
Reject the Herd
scorp123
Level 8
Level 8
Posts: 2272
Joined: Sat Dec 02, 2006 4:19 pm
Location: Switzerland

Post by scorp123 »

marcus0263 wrote:Guess people don't understand Unix Geek Humor :shock: ..... Oh Well :roll:
I guess our tolerance levels of what we consider "harsh" and "totally unfriendly" are a good bit higher? I mean forums like this one here aren't just "black & white" (friendly or unfriendly), there are very fine nuances of grey between "making a joke not meant in earnest", "making a somewhat mean sarcastic remark", "being downright awful", "being a forum troll and deserving a kick + ban", "being a real-life total ar**hole and deserving to be struck by lightning in the balls where it really hurts" ... I guess some people don't know these nuances (yet)? Oh well ... give them time. More time in forums like this one and they will get used to it I guess? Yet another learning curve for them to master ... :D

I guess stories like this one here are the reason we get so sarcastic about Windows users, Windows converts (= "noobs + woossies" :wink: ) ....
http://www.groklaw.net/comment.php?mode ... 98#c572555

Quote from there (the topic poster is talking about someone he knows ...):
Groklaw wrote:" ... A few weeks ago, deciding that his old computer was now too slow, he bought a new one, with some sort of Ultimate version of Windows Vista. I helped him set it up, but things did not go at all smoothly. He was not impressed with Vista. He ended up paying me about $120 for my time and effort (hidden costs of Vista?). Within a few weeks of using Vista, he gave up with it and returned to XP, on his old, crawling machine.

Today, he came up with an interesting theory as to why Windows gets slower and slower with time: it's so that people will end up buying new computers with new versions of Windows. ...."
Yeah, right. :D :roll: :lol:
LinuxMint.ca
Level 1
Level 1
Posts: 1
Joined: Sat Feb 03, 2007 5:52 am

Broadband Internet

Post by LinuxMint.ca »

Hallo:
I preformed the modification described herein, and I think it speeds things up somewhat; maybe giving a more solid connection.

However, I note that it slows the boot-up time, to reach a working desktop, in particular from the time you log in till your desktop shows up.
There is in between these two points a long time of black screen, with only the mouse pointer showing.

Is this normal in this case, or can this situation be overcome in someway.Anyone who is in the know please advise.

Linux Mint sure is a smooth working distro. :D :D :D

TIA,
LinuxMint.ca
User avatar
marcus0263
Level 4
Level 4
Posts: 365
Joined: Mon Dec 25, 2006 9:40 am
Location: Seattle
Contact:

Re: Broadband Internet

Post by marcus0263 »

LinuxMint.ca wrote:Hallo:
I preformed the modification described herein, and I think it speeds things up somewhat; maybe giving a more solid connection.

However, I note that it slows the boot-up time, to reach a working desktop, in particular from the time you log in till your desktop shows up.
There is in between these two points a long time of black screen, with only the mouse pointer showing.

Is this normal in this case, or can this situation be overcome in someway.Anyone who is in the know please advise.

Linux Mint sure is a smooth working distro. :D :D :D

TIA,
LinuxMint.ca
Doesn't have any effect on boot times. To find out where your boot time is taking the time easiest way is to watch the boot process.

Before the time out that boots into your default kernel hit the <esc> Then when you get to your kernel selection press <e> to edit. Scroll down the the boot line and press <e> again to edit that line. Just back space to take out the "splash", then <enter> then hit <b> to boot. This will allow you to follow your boot cycle and find out where it's taking time.

I'd also take a look at "dmesg" and /var/log/messages
Shuttle SX58
Intel i7 Gulftown Hex Core
G.Skill 16Gig 1333
OCS Vertex 2 SSD
Segate SATA II
Palit GeForce GTS 450
LMKDE 14 64Bit

Where Thought Crime is Committed
Reject the Herd
Post Reply

Return to “Tutorials”