Nieuws:

Welkom, Gast. Alsjeblieft inloggen of registreren.
Heb je de activerings-mail niet ontvangen?

Auteur Topic: Linux versnellen  (gelezen 5825 keer)

Vess

  • Gast
Linux versnellen
« Gepost op: 2008/12/17, 09:35:28 »
Laatst was ik lekker aan het surfen op het net toen vond ik een link voor 10 manieren om Linux te versnellen.
Hier zijn ze:

1. Disable IPv6
At least I dont need IPv6 yet so this is what I do to disable it.
sudo kate /etc/modprobe.d/aliases
And change the line:
alias net-pf-10 ipv6
to:
alias net-pf-10 off #ipv6
This will disable IPv6 on all network interfaces. You need to reboot.

2. Run boot processes in parallel
This will make upstart to run the boot processes in parallel and speed up the boot process.
sudo kate /etc/init.d/rc
Find and change the line:
CONCURRENCY=none
to:
CONCURRENCY=shell

3. Aliasing hostname to localhost
Right or wrong, you decide. But I picked this up in the Ubuntu forums the other day and it does improve the startup of some apps.
sudo kate /etc/hosts
and add you hostname to the first line after localhost like this:
127.0.0.1 localhost yourhost
127.0.1.1 yourhost

4. Disable pango
I know that this is already taken care of in firefox but it still makes a good performance boost to thunderbird and some other apps.
sudo kate /etc/environment
and add:
MOZ_DISABLE_PANGO=”1?

5. Preload
It does what you think. It preloads most common used libs and files = faster startup times on your applications.
sudo apt-get install preload

What about prelink?
Prelink is no longer necessary in feisty. Feisty uses a new linking mechanism called DT_GNU_HASH which speeds up the linking process without the need for continuously running prelink.

6. Swappiness
The default value for vm.swappiness is 60 in Ubuntu Feisty whic is a good default value but if you want to tweak the performance a little bit more you can change this value to a lower value to reduce the load of the swap. If you run the follwing command:
sysctl -q vm.swappiness
You will se that the value is set to 60. And by running:
sudo sysctl vm.swappiness=10
You will change the value from 60 to 10 which will make your system write to swap a lot less and I would recommend this to everyone that has 512 mb of memory or more. If you find that you have very little use of swap set the value to 0. This will not disable the swap but it will make your system write to the swap as little as possible and keep as much as possible in memory. This makes a huge improvment when switching between applications since they are now likley to be in physical ram instead of on the swap partition.

To set your value permanent you need to change the sysctl.conf file:
sudo kate /etc/sysctl.conf
Add the line
vm.swappiness=10
To the end of the file. This way it will be set upon boot.

I’ve found that the value of 5 works very good for my use and I have 1 GB of memory.

7. Profile grub
There is a option to grub called profile which will profile your startup. What it does is that it kind of indexing all the files read during boot/startup and later on it will find and read those files quicker.

Hit the escape button when booting to get to the grub menu.
Select your default boot kernel and hit the e button.
Go down to the second line and hit the e button again.
Add profile to the end of the line and press enter.
Hit the b button to boot with your new option.

The first time it will take a little bit longer to boot because it has to build the index (or whatever they want to call it) but every boot after this will be a lot smoother.
You need to do this every time you update your kernel or have made other huge changes to your system that might affect the files needed during boot.


The following could cause your system to be unstable or even unable to boot so please use them care…

8. sysv-rc-conf
Install sysv-rc-conf and disable the services you don’t need at startup.
As an example. On my computer I don’t have bluetooth so I don’t need to start it at boot time.
So simply disable what ever you don’t have or use.

sudo apt-get install sysv-rc-conf
and then run:
sudo sysv-rc-conf

9. Kernel hacking
Even thought the new kernel in feisty is very good and already tuned a bit there still are some things you can do to the kernel the will make your system snappier and boot up even faster.

Use this thread from the ubuntu forums as a guide on how to compile your own kernel.
master kernel thread

What I do is that I make sure to add my file systems I use to the kernel instead of loading them as modules. Take out whatever I don’t have or use and then compile my new and hopefully improved kernel ;)

10. Filesystem setup
The choice and use of the file system is a big issue when dealing with performance. Depending on your usage of your system you might need to configure your filesystem different.

For my usage I like to use the following setup (which I think is a good desktop setup)
Mountpoint filesystem Size

Using the following options in fstab for all my xfs partitions:
noatime,nodiratime,logbufs=8

Using LVM can really speed up the disk performance. And you get a lot of other good stuff with it as well. Read more about LVM here.
I choose to have /root and /home on one VolumeGroup and /data on another simply because I can then split them up on diffrent physical disks and have them spanning over multiple physical disks witch really speeds up the reads and writes.

Nu is de vraag:
1. Bij punt 3. staat right or wrong you decide. Iemand enige idee wat fout zou kunnen zijn hieraan?
2. Bij punt 7. Moet je eenmalig "profile" erachter zetten of moet je het ook in het menu.lst zetten?(omdat ik dacht dat als je dat doet hij de instelling niet bewaard)

Tot nu toe heb ik punt 1, 2 en 6 toegepast en het is wel degelijk te merken dat mijn systeem wat sneller is geworden.

Groetjes Jurgen

Offline icehawk

  • Lid
Re: Linux versnellen
« Reactie #1 Gepost op: 2008/12/17, 10:38:47 »
Ik ben maar een beginneling, maar toch moet ik er hier iets over zeggen....

Wel leuk die scripts om het allemaal wat sneller te maken (is blijkbaar tendens de laatste tijd), maar als die die commando's erin klopt, mis je wellicht op andere vlakken qua stabiliteit en snelheid?

Want mijn beredenering is dat als het allemaal echt sneller kan, zonder dat het verdere gevolgen heeft voor het systeem en software, waarom heeft cannonical het niet standaard in hun distro's zitten?

« Laatst bewerkt op: 2008/12/17, 12:23:00 door icehawk »
Ubuntu verbrijzelde de kop van Windows. Windows beet slechts de hiel van Ubuntu.

Offline Johan van Dijk

  • Administrator
    • johanvandijk
Re: Linux versnellen
« Reactie #2 Gepost op: 2008/12/17, 10:48:29 »
Die tips staan op verschillende blogs, en als je een linkje had gegeven, dan had iedereen de commentaren kunnen lezen.
Daarin staan duidelijke waarschuwingen dat niet iedere tip zonder risico is.

Re: Linux versnellen
« Reactie #3 Gepost op: 2008/12/17, 11:36:18 »
Bovendien zijn ze voor Feisty en we zitten inmiddels bij Intrepid. Punt 8 kun je ook zonder het installeren van sysv-rc-conf instellen. En wat betreft punt 10, LVM is leuk, Fedora gebruikt het standaard bijv. maar persoonlijk vind ik het een crime.

Re: Linux versnellen
« Reactie #4 Gepost op: 2008/12/17, 11:45:35 »
Deze tips en ik al meerdere malen tegengekomen en heb sommige ervan al gebruikt.

Ik zou trouwens punt 1 niet toepassen. De meeste ip-adressen van tegenwoordig zijn IPv6.

Offline icehawk

  • Lid
Re: Linux versnellen
« Reactie #5 Gepost op: 2008/12/17, 12:17:00 »
Deze tips en ik al meerdere malen tegengekomen en heb sommige ervan al gebruikt.

Ik zou trouwens punt 1 niet toepassen. De meeste ip-adressen van tegenwoordig zijn IPv6.

Niet helemaal ;) IPv6 is op de toekomst gericht. IPv4 adressen raken op, en dan zal de hele wereld moeten overschakelen naar het nieuwe IPv6 protocol. IPv6 kan je al gebruiken op diverse nieuwsgroepen, met als voordeel dat je met meerdere treads je spullen kan binnenhengelen ;)

Persoonlijk vind ik wel jammer dat het nieuwe IPv6 maar heel moeizaam op gang komt. Bedenk wel, zodra we allen overgaan naar nieuwe protocol, dat je per aansluiting (internet) voor jezelf nog eens ong. 64000 ipadressen kan aanmaken ;) Zo kan je in de toekomst nog je eigen koelkast een eigen ip-adres geven ;)

Zie het eens voor je in de toekomst....
Vrijwel iedereen een glasvezellijntje in huis (Fiber to the home), je eigen hostingbedrijfje beginnen, en duizenden eigen ip adressen tot je beschikking ;) Kan je zo meerdere servers houden. Uiteraard hebben we dan servers die superzuinig omgaan met energie  =D

« Laatst bewerkt op: 2008/12/17, 12:21:14 door icehawk »
Ubuntu verbrijzelde de kop van Windows. Windows beet slechts de hiel van Ubuntu.

Vess

  • Gast
Re: Linux versnellen
« Reactie #6 Gepost op: 2008/12/17, 12:55:11 »
Zo kan je in de toekomst nog je eigen koelkast een eigen ip-adres geven ;)
Of zoals Aerosmith ooit zong:Dream on :P
Tot nu toe ziet het eruit dat niemand het antwoord weet.

Dat we nu bij inteprid zijn zeg niet dat je het niet kan veranderen. Want dat heb ik toch zeker gedaan. En de pc is er sneller op geworden.

Groetjes Jurgen

Deadangel

  • Gast
Re: Linux versnellen
« Reactie #7 Gepost op: 2008/12/17, 12:58:16 »
Onze oven kan worden bestuurd via het netwerk..
Als ik 'n pizza insteek wanneer ik thuis kom,
naar boven ga, een uurtje later honger krijg, moet ik gewoon een of ander programmatje openen dat papa gemaakt heeft met VB, en de oven die is begonnen met warmen. Daarna krijg ik zelfs een melding als't programma afgerond is..

& gezien er geen utp draden in de keuken liggen, vermoed ik draadloos internet..

Soit, ik bedoel maar dat er ovens zijn die ip's kunnen krijgen :)

Vess

  • Gast
Re: Linux versnellen
« Reactie #8 Gepost op: 2008/12/17, 13:30:09 »
Aerosmith was nog niet klaar met zingen: Dream yourself a dream come true  :P

Wat grappig dat dat zo kan nooit gehoord. Nu nog iets dat het eten d.m.v. een programma erin wordt gezet ;)

Groetjes Jurgen

Offline jespdj

  • Lid
Re: Linux versnellen
« Reactie #9 Gepost op: 2008/12/17, 15:37:19 »
2. Bij punt 7. Moet je eenmalig "profile" erachter zetten of moet je het ook in het menu.lst zetten?(omdat ik dacht dat als je dat doet hij de instelling niet bewaard)
Dat moet je éénmalig doen. Zoals beschreven duurt het booten langer als je met deze optie opstart, omdat er dan een profiel gemaakt wordt van het bootproces. Als je daarna weer normaal opstart (zonder de optie) dan zou het sneller moeten gaan, omdat Ubuntu aan de hand van het profiel heeft bepaald wat de optimale volgorde is om programma's te laden.
Dell XPS M1530 | Core 2 Duo T9300 (2,5 GHz) | 4 GB RAM | nVidia 8600M GT | Ubuntu 8.04

Offline DarkStar

  • Lid
    • Mijn persoonlijke website
Re: Linux versnellen
« Reactie #10 Gepost op: 2008/12/17, 15:53:27 »
Deze tips en ik al meerdere malen tegengekomen en heb sommige ervan al gebruikt.

Ik zou trouwens punt 1 niet toepassen. De meeste ip-adressen van tegenwoordig zijn IPv6.

Ik ben in de praktijk nog nooit IPv6 tegen gekomen, en ik ben toch wel vrij serieus met netwerken bezig.
Het grootste 'probleem' met IPv6 is dat het bijna onmogelijk is om een IP adres nog te onthouden. Zeg nu zelf, 192.168.1.1 (IPv4) is toch heel wat makkelijker dan bv. 3ffe:6a88:85a3::1319:8a2e:0370:7344. Dan heb je nog die regels ivm. nullen weglaten, IPv4 address mapping, etc... Meer info: http://nl.wikipedia.org/wiki/Internet_Protocol_Version_6

On-topic: altijd leuk om je systeem sneller te maken, maar ik wil wel op voorhand weten wat er exact aangepast wordt, en wat de eventuele gevolgen zijn. Je weet nooit of er iets anders afhankelijk is van een bepaalde parameter.
Er staat volgens mij trouwens een fout bij punt 4:

4. Disable pango
I know that this is already taken care of in firefox but it still makes a good performance boost to thunderbird and some other apps.
sudo kate /etc/environment
and add:
MOZ_DISABLE_PANGO=”1?

Moet dat niet MOZ_DISABLE_PANGO=”1” zijn?

° Bezoek mijn blog Digital (in)Sanity °

Re: Linux versnellen
« Reactie #11 Gepost op: 2008/12/17, 16:12:16 »
Onze oven kan worden bestuurd via het netwerk..
Als ik 'n pizza insteek wanneer ik thuis kom,
naar boven ga, een uurtje later honger krijg, moet ik gewoon een of ander programmatje openen dat papa gemaakt heeft met VB, en de oven die is begonnen met warmen. Daarna krijg ik zelfs een melding als't programma afgerond is..

& gezien er geen utp draden in de keuken liggen, vermoed ik draadloos internet..

Soit, ik bedoel maar dat er ovens zijn die ip's kunnen krijgen :)

Dat is harstikke leuk :) Mag ik weten hoe je dat doet? Want dat wil ik ook wel hier bij ons thuis (wij hebben ook draadloos internet btw)

Deadangel

  • Gast
Re: Linux versnellen
« Reactie #12 Gepost op: 2008/12/17, 19:33:31 »
Onze oven kan worden bestuurd via het netwerk..
Als ik 'n pizza insteek wanneer ik thuis kom,
naar boven ga, een uurtje later honger krijg, moet ik gewoon een of ander programmatje openen dat papa gemaakt heeft met VB, en de oven die is begonnen met warmen. Daarna krijg ik zelfs een melding als't programma afgerond is..

& gezien er geen utp draden in de keuken liggen, vermoed ik draadloos internet..

Soit, ik bedoel maar dat er ovens zijn die ip's kunnen krijgen :)

Dat is harstikke leuk :) Mag ik weten hoe je dat doet? Want dat wil ik ook wel hier bij ons thuis (wij hebben ook draadloos internet btw)
Ik zelf heb geen idee, ons papa heeft dat zo (laten maken ? /) voor elkaar gekregen ..
De oven is van miele..

Re: Linux versnellen
« Reactie #13 Gepost op: 2008/12/18, 11:43:37 »
Ok, dan zoek ik wel even op internet ;)