Slashdot Mirror


Linux Tuning Tricks?

Milo_Mindbender writes: "Over the weekend I was attempting to improve my CD ripping performance and discovered RedHat 7.2 was running my Ultra/ATA 100 hard drive in a very slow non-DMA mode. After a fair amount of searching for how to fix this, a trivial change (look here) improved drive performance from 3MBs to 38MBs! FSCK on my 40gb partition went from over 5 minutes to under 1! This issue wasn't documented in RedHat's manuals but it effected a number of boxes in our office so I'm betting many other people in the world have the same problem. This made me wonder how many other common Linux tuning snafus there might be that a lot of people are probably missing. Do you know of any?"

11 of 71 comments (clear)

  1. disable system services on startup by babychess · · Score: 3, Informative

    On RedHat, you can use ksysv, the init editor, to turn off boot-time system services that are not needed. Candidates are daemons for GPM, USB, SCSI, LPD, APM, which are all enabled by default, and which may not be needed.

    1. Re:disable system services on startup by eufaula · · Score: 3, Informative
      with redhat (maybe others) you can also run the command "setup" and have a curses-based way to do it. or, you can go into /etc/rc3.d (or whatever runlevel your distro/os normally runs at) and move the S##xxxx scripts to K##xxxx to prevent them from starting. this is the standard way of starting/stopping services on SYSV UNIX, so this holds true for Solaris and others.

      -- aside -- you CAN move them to anything other than S##xxxx, but i normally stick with the standard and use K##xxxx

    2. Re:disable system services on startup by Diamon · · Score: 2, Informative

      Renaming them to K##xxxx is not necessarily a good idea. Instead of just not telling them to start, you're telling them to Kill off the service if it's running. This will slow down your boot as you try to kill of things that never started.

      I always preferred what my predecessor used of renaming S##xxxx to _S##xxxx. This keeps things clear as to what the system *used* to do.

    3. Re:disable system services on startup by briany · · Score: 2, Informative
      Actually, the K* scripts are run when you leave that runlevel. Your shutdown will be slower as the system is trying to shutdown daemons that aren't running.

      I usually move the scripts from S* to s*. This way I can tell quite easily what I've disabled by hand.

  2. Just a tip. by Anonymous Coward · · Score: 2, Informative

    s/effected/affected/

    Not trying to be a prick, just trying to let you know for future use! I see this mistake a lot, so...

    "Effect" is a noun, whereas "affect" is a verb.

    When you change something, you affect it. When something you did caused a change, you say the thing you did "had an effect".

    (Effect can also be a verb meaning "to cause", but it's rarely used that way. i.e. "I effected a change.")

    Sorry for the grammar nazi post!

    1. Re:Just a tip. by suwain_2 · · Score: 2, Informative
      This is a common mistake, as you said. I think this is one of those words where the meaning keeps evolving... I wouldn't be surprised if, at some point, some dictionary gives in and just says something like "In modern usage, effect and affect are interchangable."

      For now, though, this helfpul tip from Merriam-Webster is pretty informative (and interesting):

      "The confusion of the verbs affect and effect is not only quite common but has a long history. Effect was used in place of 3affect as early as 1494 and in place of 2affect as early as 1652. If you think you want to use the verb effect but are not certain, check the definitions in this dictionary. The noun affect is sometimes mistakenly used for effect. Except when your topic is psychology, you will seldom need the noun affect." -- From the "effect" entry in Merriam-Webster's online Collegiate Dictionary.

      --
      ________________________________________________
      suwain_2 :: quality slashdot p
  3. Careful with hdparm! by dead_penguin · · Score: 5, Informative

    If you are going to be playing with hdparm, take my advice and make a backup first! Some interfaces aren't fully supported by the kernel yet, and trying to run drives off of them in certain modes could break in a bad way. In my experience, this then means massive filesystem corruption and a complete reinstall.

    Of course I'm not saying *don't* play with hdparm; just be sensible and only try it on a system you have backed up and can afford to lose for a little while as you're rebuilding it.

    --

    It's only software!
  4. PCI Bus speed by optikSmoke · · Score: 2, Informative

    Another thing I recently noticed which jumped out at me from my kernel messages during boot: the kernel was assuming a 33Mhz system bus speed for PIO. This was fixed by passing "idebus=66" as a kernel boot parameter. See ide.txt in the kernel documentation sources for more info.

    1. Re:PCI Bus speed by Gothmolly · · Score: 3, Informative

      Your PCI bus speed IS 33MHz, unless you are overclocking or running a new, rare, high-end box.

      --
      I want to delete my account but Slashdot doesn't allow it.
  5. Powertweak and /proc twiddling by embobo · · Score: 4, Informative

    You may try to use Powertweak to alter settings to improve performance.

    Then there is tweaking settings via /proc. I used to have a link to some excellent documentation on it but, alas, I can't seem to find it. You could try reading the various bits of info in the Documentation tree of the Linux source but it is pretty spartan.

  6. Pretty good resource by Yoda2 · · Score: 2, Informative

    Lots of nice little Linux tidbits can be found on The Linux Pimp. Can't think of a site more ontopic for this post. The intro is pretty funny too.