Speed Tweaking PCLinuxOS 2007 TR3

Using PCLinuxOS 2007 TR3 for the last few weeks, I’ve noticed VAST improvements over the .93a release. The most noticable of these is boot times. My boot time is absolutely amazing on this Dell E521n…it averages 30-40 seconds. That’s right. 30-40 SECONDS. I was floored the first time I booted after install. I thought I had done something wrong. I quickly rebooted and got out the stopwatch and recorded 32 seconds as my official time. I rebooted another 5-6 times and averaged in between 30-40 seconds each time and was closer to 30 on 8 out of 10 boots. Absolutely amazing.

Linux, with projects like upstart which is being considered for the next release of Ubuntu, are getting to the point now where boot times will drop considerably. This is welcome as far as I’m concerned…it allows you to get going right away with your business be it personal or other.

Once you’re logged in though…many people don’t touch the OS itself and instead leave it at the default settings. For most people this is ok…as not having something set to be optimized is ok and most distro rollers setup their distros so that they cause the least amount of problems for the most variety of hardware. For me, I like to mess around. I like to play. “I like the night life…I like to boogie

So without further silliness and introductional nonsense, I proudly present a bunch of data that I gathered from various sources (cited where possible) and a few tricks of my own that will allow most rpm based distros to tweak their way into improved performance. Since I did this specifically for the PCLinuxOS community though, I’ve titled the article accordingly. As it is, the article should work for most Fedora’s and Mandriva’s and possibly even OpenSuse.

  • Disable IPV6

Many distros out there are configured by with this disabled by default (see note below). PCLinuxOS is no different in this respect…but it’s always good to doublecheck things. Since most of us don’t use IPV6 networks, this setting can slow down communication throughout our network. Turning this networking feature off is both desirable and easy for those of us who do not use IPV6 enabled networks. To do this in PCLinuxOS:

Open your Kmenu and choose “Run Command”. When the dialogue comes open, type “kdesu kate /etc/sysconfig/network” and hit enter. If it asks you for a session, choose open session. Now the file is open…you can edit it. Add the following line:

NETWORKING_IPV6=no

Now save and exit out of the Kate program. That’s it! Next time we boot we’ll have IPV6 disabled. This tip was taken from the “Fiesty perfomance…Fly like a butterfly” blog post at Another techgeek on the net. I also used the Mandriva Linux 2007 Errata on this tip.

NOTE: Some people point to settings like the one discussed in this post that can be done to disable IPV6. This is done by default in PCLinuxOS 2007 so no change is required.

  • Force use of your RAM vs. Swap

Linux uses hard disk space called swap to write information it needs for accessing various temporary programs when system RAM is busy. This is because many years ago, RAM sizes were relatively small. To combat this, swap space was born. Now the OS could write to the disk when RAM wasn’t available. Times have changed though and many systems have much more RAM than they did in the past. With this tip you can change the tendancy of the distro when it writes to Swap so that it uses Swap less and RAM more. This setting is called swappiness. PCLinuxOS comes with a default of 60 (seen by parsing the command “cat /proc/sys/vm/swappiness” in a console as root). To change it, use the following command:

sysctl -w vm.swappiness=10

This will change the tendency of the OS to write to RAM which is faster than hard disk writes. Now go to Kpanel, Run Command and paste the following:

kdesu kate /etc/sysctl.conf

add the following line at the very bottom:

vm.swappiness=10

You’re all done! That should make the change permanent and allow you to have more writes to RAM and less to Swap to speed things up. Note that you should only do this if you have a larger amount of RAM (I have 2GB…I’d say 1GB and up). This tip was taken from the same Fiesty article linked above and also from the Linux Journal.

Please note that the removal of virtual terminals discussed by many of the articles I’ve linked to above will get you NO noticeable speed increases…it honestly isn’t needed.

  • Speed Up Boot

In PCLinuxOS, you can use the PCLinuxOS Control Center to disable different running services.

Now the PCC is a fine option for the most common items starting up…but what about uncommon ones that aren’t listed? In this instance, your best bet is the ntsysv tool. It’s not installed by default in PCLinuxOS so fire up Synaptic and install ntsysv. Now open up a terminal/konsole and as root type “ntsysv” and you should see something similar to the screenshot on the right.

The Linux Journal article posted about this tool says to turn off “apmd, autofs, identd, ip6tables, iptables, isdn, lpd, nfs, portmap, talkd and sendmail” but to remember that this is disabling services in run level 5 and that disabling them in runlevel 3 is also advised (see the article for greater details).

These services didn’t match those present in PCLinuxOS, so I disabled httpd, iptables (my firewall is in front of my pclos box), laptop-mode, postfix, wltool, and apmd. You may select those also…it’s up to you. These services might not also be running…as some tools require that you configure them and run them a single time before they’re initiated to startup as a service.

Also, please be advised that you should only disable iptables (your iptables firewall like shorewall or firestarter) if you are behind a good firewall/router.

  • Add your hostname to Hosts

Most host files look like this:

127.0.0.1        localhost

Another techgeek suggests you make it look like this:

127.0.0.1        localhost

and add the line:

127.0.0.1        hostname

where hostname is the hostname of your computer. This might speed things up a bit for application launch and it may speed some network functions up as well. Then again, it just might not do anything at all. Many people do report success with this though so we’ll include it in this article.

Do you have any tips or tricks that aren’t listed here that give PCLinuxOS a performance gain? If so, I’d love to hear of them. Please post them in the comments section or you can email them to me at devn3t @ gmail.com. I hope this helps some of you squeeze out more performance out of the already fantastic performance PCLinuxOS has!

Author: devnet

devnet has been a project manager for a Fortune 500 company, a Unix and Linux administrator, a Technical Writer, a System Analyst, and a Systems Engineer during his 20+ years working with Technology.

6 thoughts on “Speed Tweaking PCLinuxOS 2007 TR3”

  1. In the swappiness issue, i am wondering what would be the proper value for 512MB RAM… or shall i just keep the value PCLOS sets by default?

  2. “projects like upstart which is being considered for the next release of Ubuntu”

    Actually, Upstart has been used in Ubuntu since Edgy (6.10) and I have to say that its quite nice 🙂

    See also http://en.wikipedia.org/wiki/Upstart

    Its not completely phased in though, but will be in six months when “Gutsy Gibbon” is released:

    “From the start of development of edgy+2, no new packages will be accepted unless they provide upstart jobs instead of init scripts and init scripts will be considered deprecated.”

    From http://www.netsplit.com/blog/articles/2006/08/26/upstart-in-universe

  3. Guys, can you help me? I’m newbie for Linux. Tell me please – can I start learning Linux from PCLinuxOS? Or better well-known distributives like Red Hat or Mandriva?

  4. Sure! PCLinuxOS would be a good one to learn on. Mandriva is also a very good one to learn on.

    Give them a go and see what you think!

Comments are closed.

Creative Commons License
Except where otherwise noted, the content on this site is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.