Slashdot Mirror


Optimizing KDE 3.1.x

David Lechnyr writes "This article goes into detail on optimizing KDE for speed. Typically, most distributions include pre-compiled binaries of KDE which are optimized for an Intel i386 computer. Chances are that you're running something faster than this; if so, this should help you tweak the compile process to speed things up a bit."

83 comments

  1. mandatory gentoo user post... by dotgod · · Score: 5, Informative

    Gentoo does all this by default. To compile and install optimized binaries for kde, you just type "emerge kde"

    1. Re:mandatory gentoo user post... by Anonymous Coward · · Score: 2, Funny

      But what do you do for the next eight hours, huh?

    2. Re:mandatory gentoo user post... by dotgod · · Score: 3, Insightful

      You wait for it to compile and install, which beats waiting several days waiting for redhat/mandrake, etc. to release rpms.

    3. Re:mandatory gentoo user post... by be-fan · · Score: 0, Troll

      Sleep. Eat. Code. Go out with somef riends. Watch a movie, whatever.

      --
      A deep unwavering belief is a sure sign you're missing something...
    4. Re:mandatory gentoo user post... by Anonymous Coward · · Score: 0

      Wow. Lots of Gentoo kiddies have mod points today.

    5. Re:mandatory gentoo user post... by Anonymous Coward · · Score: 2, Informative

      Too bad Gentoo's optimizations have been known to break software by being too agressive.

    6. Re:mandatory gentoo user post... by JohnnyGTO · · Score: 1

      So, simply adjust the optimization settings. RTFM.

      --
      Si vis pacem, para bellum! For evil to succeed good men need only do nothing!
    7. Re:mandatory gentoo user post... by Anonymous Coward · · Score: 0


      Sleep, eat, go to your 9-5, go outside and get some fresh air, watch a couple DVD's, have sex with a Saigon whore...

    8. Re:mandatory gentoo user post... by Vej · · Score: 1

      Agreed, it beats awaiting for anyone else to do it :)

      The problem is most people think there's going to be an option/etc they missed and didn't know about and will be running a flawed/broken system. Heck, I can barely get the guys at work to watch me patch a kernel for real-time linux or something, they want it all pre-packaged.

    9. Re:mandatory gentoo user post... by F1uX · · Score: 1

      Before going bed, you've just to run "emerge kde", and when you'll get up the next day you'll have your new kde release installed and, above all, optimized for your system...

    10. Re:mandatory gentoo user post... by F1uX · · Score: 1

      It's up to you to choose which level of optimization to use(and how agressive you want it to be), but, definitely, if you use the flags in the gentoo documentation, you'll be reasonably sure to have a package to be compiled correctly and to run fast!!!

    11. Re:mandatory gentoo user post... by Anonymous Coward · · Score: 0
      Official Gentoo-Linux-Zealot translator-o-matic

      Gentoo Linux is an interesting new distribution with some great features. Unfortunately, it has attracted a large number of clueless wannabes who absolutely MUST advocate Gentoo at every opportunity. Let's look at the language of these zealots, and find out what it really means...

      "Gentoo makes me so much more productive."
      "Although I can't use the box at the moment because it's compiling something, as it will be for the next five days, it gives me more time to check out the latest USE flags and potentially unstable optimisation settings."

      "Gentoo is more in the spirit of open source!"
      "Apart from Hello World in Pascal at school, I've never written a single program in my life or contributed to an open source project, yet staring at endless streams of GCC output whizzing by somehow helps me contribute to international freedom."

      "I use Gentoo because it's more like the BSDs."
      "Last month I tried to install FreeBSD on a well-supported machine, but the text-based installer scared me off. I've never used a BSD, but the guys on Slashdot say that it's l33t though, so surely I must be for using Gentoo."

      "Heh, my system is soooo much faster after installing Gentoo."
      "I've spent hours recompiling Fetchmail, X-Chat, gEdit and thousands of other programs which spend 99% of their time waiting for user input. Even though only the kernel and glibc make a significant difference with optimisations, and RPMs and .debs can be rebuilt with a handful of commands (AND Red Hat supplies i686 kernel and glibc packages), my box MUST be faster. It's nothing to do with the fact that I've disabled all startup services and I'm running BlackBox instead of GNOME or KDE."

      "...my Gentoo Linux workstation..."
      "...my overclocked AMD eMachines box from PC World, and apart from the third-grade made-to-break components and dodgy fan..."

      "You Red Hat guys must get sick of dependency hell..."
      "I'm too stupid to understand that circular dependencies can be resolved by specifying BOTH .rpms together on the command line, and that problems hardly ever occur if one uses proper Red Hat packages instead of mixing SuSE, Mandrake and Joe's Linux packages together (which the system wasn't designed for)."

      "All the other distros are soooo out of date."
      "Constantly upgrading to the latest bleeding-edge untested software makes me more productive. Never mind the extensive testing and patching that Debian and Red Hat perform on their packages; I've just emerged the latest GNOME beta snapshot and compiled with -O9 -fomit-instructions, and it only crashes once every few hours."

      "Let's face it, Gentoo is the future."
      "OK, so no serious business is going to even consider Gentoo in the near future, and even with proper support and QA in place, it'll still eat up far too much of a company's valuable time. But this guy I met on #animepr0n is now using it, so it must be growing!"

      -

    12. Re:mandatory gentoo user post... by gilesjuk · · Score: 1

      As mentioned elsewhere, the optimisation settings are user defined.

      But if these settings are breaking the software then surely it's the fault of the gcc compiler or the software in question?

      Gentoo's ebuild are often just scripts, the actual software is often downloaded direct from the website of the actual developer of the software.

    13. Re:mandatory gentoo user post... by Anonymous Coward · · Score: 0

      Unless of course it takes several days to compile on your machine.

    14. Re:mandatory gentoo user post... by JJahn · · Score: 1

      Ahem, Red Hat performs extensive testing on their packages? Thats utter bullshit, and most people by now know it. Debian surely does, but I think anyone who knows what they are talking about remembers GCC 2.96 on Redhat.

    15. Re:mandatory gentoo user post... by Alan · · Score: 1

      "You Red Hat guys must get sick of dependency hell..."
      "I'm too stupid to understand that circular dependencies can be resolved by specifying BOTH .rpms together on the command line, and that problems hardly ever occur if one uses proper Red Hat packages instead of mixing SuSE, Mandrake and Joe's Linux packages together (which the system wasn't designed for)."


      Actually, dependancy hell is when you download program X to try it out. rpm -i and it requires package Y... search around and find package Y only to find it depends on packages Z, A and C, find these packages and discover that they depend on...

      Sure, if you're using mandrake and urpmi (and a mirror source that doesn't suck) this isn't an issue, nor is it an issue if you use only the approved packages and download sources, but dare you step out of that little box....

      Oh, and while I am a gentoo user, I'm not saying that similar problems don't exist on gentoo btw. However the above has been my experience more than once when downloading j-random-rpm from the net.

    16. Re:mandatory gentoo user post... by sig+cop · · Score: 0
      What is it with all these people that start their messages with "Ahem"? My guess is that the stupid wankers are spelling out that throaty sound people often make when interjecting their verbal comments into a discussion. Hello, idiot? You don't need to interject into this here web BLOG because we're already paying attention to your inane words when we read "ahem". It makes no sense, I tell you. It's like that post I read on on slasdot the other day which included the words "quote unquote" written out in addition to using quote marks.

      Do you people talk out loud when posting to slashdot? What's next, transcribed hand gestures and facial tics?

    17. Re:mandatory gentoo user post... by sig+cop · · Score: 0
      GENTOO!!! W00t!! D000d. Im so glad you brough up Gentooo - you beet me to the post. Gentoo roxors on my system. You get super fast KDE and GNOMe proggies 4 free with gentoo. I used to run RedHat until someone told me they were the M$ of Lunix, then I switched over took Mandrake. But I heard that Mandrake was French and Anti-American (OB GOD Bless AMERIKA!!!!). So I was in the market for a new distro. I heard BSD was l33t, but I couldNT find it on the Lunix distro page, so last week I decided to try GENTOOOO. My boxen isn't to fasten, but its nothting to scoff at eiter: Intel Celeron 233000000 HZ, 64MB ECC RAM, 2x CDROM, 40Gb disks, dual floppies, 14inch EGA monitor, not the best but I got a killer deal on it from the CompUSA (USA #1 BEOTCHES!!!!). So I installed Gentoo UNiX with all the oppies: -fomit-slow-instructions, -O9999, -PICK, --funroll-all-da-loopies. Just got done w/ the comp, and I must say, this boxen just screems. KDE is super fast with this set up.

      Just wante d to give my pr0pz to gentoo and say all other linux == sux. GENTOOOOOO!!

  2. just run gentoo or FreeBSD by Anonymous Coward · · Score: 0

    use Gentoo or FreeBSD and you get to set compiler flags for everything to be best for your system.

  3. prelink by dotgod · · Score: 4, Interesting

    Using prelink will also provide additional optimization.

    1. Re:prelink by IIEFreeMan · · Score: 4, Informative

      Prelink is not useful anymore provided you use a recent glibc (>= 2.3) ...

      This is done automatically by the libc and the dynamic linker.

    2. Re:prelink by Spy+Hunter · · Score: 3, Informative
      This is simply not true. Here's the truth straight from the source: glibc NEWS file. It says you need "additional tools" to take advantage of prelinking, and the "prelink" program is that additional tool. I have also heard other people say that prelinking is not necessary anymore, but they were wrong. Prelinking my KDE binaries on Debian unstable resulted in a noticable startup performance increase. I hope this misinformation doesn't cause people to discount prelinking as a possible performance booster.

      FYI, prelinking KDE is not easy. On Debian the QT package has OpenGL support compiled in. The OpenGL library is not prelinkable because it is not PIC (Position Independent Code). Since all KDE applications are linked to QT and thus to OpenGL indirectly, this also means that all of KDE isn't prelinkable. I don't know of any KDE app that actually uses QT's OpenGL support, so I don't know why it is compiled in. To prelink KDE I had to compile my own version of QT without OpenGL support. This works to allow prelinking, but using a a version of QT compiled with different options makes QT's style plugins not work and has other disadvantages. There are two real solutions:

      1. Compile OpenGL as PIC - I don't know why it isn't already.
      2. Compile QT without OpenGL support, and provide separate packages for people who need OpenGL support.
      I've sent emails to the debian-kde list about prelinking the Debian KDE packages, but the maintainers didn't seem interested. Hopefully they will eventually see the light and start working toward prelinking KDE.
      --
      main(c,r){for(r=32;r;) printf(++c>31?c=!r--,"\n":c<r?" ":~c&r?" `":" #");}
    3. Re:prelink by JohnFluxx · · Score: 4, Informative

      >I've sent emails to the debian-kde list about prelinking the >Debian KDE packages, but the maintainers didn't seem >interested. Hopefully they will eventually see the light and >start working toward prelinking KDE.

      I looked at the discussion on prelinking in Debian, and it's not all such a straight forward issue.

      When you have a binary, and run it, it loads all the libraries that the binary uses. When it loads the libraries, it basically puts it into memory, and then tells the binary the memory address of everything in the library. I think this is things like functions, data structures, etc.
      Anyway, prelinking is when you now modify the binary, and tell it about the particular version of the libraries that it links (say version 1.0.3 or whatever) Now when you run the binary and use that particular version of the library, it loads the library into a specific memory address, and the binary already knows the memory address of all the functions and data structures.
      This speeds up loading time and saves memory.
      If the library version changes, then it falls back on the old method.

      Now, the trouble is, when you update a library, you must update all the binaries. This means (as far as I see it) either you also update all the appropriate binaries by running prelink again on all the binaries, or you update the packages the binaries are in.
      The second option would cause libraries to have huge number of dependancies, and would make minor upgrades of libraries horrendous for dial up users.
      The first option has slightly more subtle problems. The problem is that it means when you update a library, it goes and unpredictably modifies binaries. This plays absolute havoc with things like tripwire, and any kind of security.

      This is merely my understanding from 5 mins research, so take it as you will.

    4. Re:prelink by Spy+Hunter · · Score: 1

      I'm not suggesting that they prelink the libraries inside the packages, I would just be happy if they distributed binaries which could be prelinked by users who wanted to install the prelink package. The debian prelink package is easy to use, and optional. Just apt-get install prelink, and then run prelink -a to prelink all your binaries. I'm not sure, but it might even register a cron job to automatically prelink stuff regularly. If you're running tripwire or something like that you don't have to install the prelinker.

      --
      main(c,r){for(r=32;r;) printf(++c>31?c=!r--,"\n":c<r?" ":~c&r?" `":" #");}
    5. Re:prelink by twener · · Score: 2, Insightful

      You confuse objprelink with the real prelink.

    6. Re:prelink by IIEFreeMan · · Score: 1

      Yes it seems so.

      Thanks for the information !

    7. Re:prelink by IamTheRealMike · · Score: 3, Insightful

      To be more accurate, prelinking allocates each library a unique location in virtual address space and then stores the precalculated GOT (or is it the PLT) in a new section in the binary. That means you only need to do a few links, instead of a lot (due to the ELF fixup semantics, sometimes you get conflicts which must always be linked at runtime).

  4. portage ? by Bobas · · Score: 1, Offtopic

    Hey, all you need here is a decent port system such as FreeBSD's or Gentoo's portage. Not much to see here, i guess.

    On the other hand compiling unpatched source with experimental optimization flags for your system is just asking for trouble.

    1. Re:portage ? by brad-x · · Score: 2, Interesting

      Absolutely. Using either of these technologies allows one to compile any piece of software using the best possible optimizations for your system.

      --
      // -- http://www.BRAD-X.com/ -- //
    2. Re:portage ? by dh003i · · Score: 4, Interesting

      Experimental? Come on. Maybe -O3 and then a series of other additional optimizations beyond that are experimental. But the sane optimizations most people use are not experimental. I, myself, default to:

      -march=athlon-tbird -Os -pipe -fomit-frame-pointer

      Btw, compiling everything from scratch is hardly "unstable". That's what FreeBSD does. Furthermore, memory optimizations often-times increase system-stability, by reducing the likelihood of situations where there isn't enough RAM. Furthermore, some of the USE settings increase stability by eliminating compiled-in support for crap that you don't use. If you don't use something, and support for it is compiled in, it's just useless crap that has the potential to reduce stability.

    3. Re:portage ? by larry+bagina · · Score: 5, Informative
      it's not about "experimental optimizations", it's about beling able to select instructions optimized for your CPU.

      the difference between a 386, 486, and pentium I-IV isn't just clockspeed and MMX, a handful of new instructions have been added. If you don't specify the arcitecture, you'll generate i386 compatable code.

      so if (i == 0) i = 1234; will generate code like this:
      cmp eax,0
      jne L1
      mov eax, 1234
      L1:

      A PII however, can do this:
      cmp eax,0
      cmove eax,1234

      that might not look all that much better, but branches are a huge bubble in the pipeline, and are horrible for performance.

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

    4. Re:portage ? by SQLz · · Score: 1

      I don't consider -03 experimental. The only thing you get with 03 over 02 is -fomit-frame-pointer on platforms where -fomit-frame-pointer has no effect on debug information. So, on i386, -O3 -fomit-frame-pointer is the same as -O2 -fomit-frame-pointer.

    5. Re:portage ? by Anonymous Coward · · Score: 0

      "using the best possible optimizations"... resulting in unstable software with disasterous results.

      And then you wonder why KDE segfaults all the time and why KDE developers are known to have delete bug reports from people using Gentoo

    6. Re:portage ? by brad-x · · Score: 1

      People who use Gentoo are largely irresponsible with it; I migrated to Gentoo on my workstations coming from FreeBSD, so I know to be sparing with CFLAGS, etc.

      The distribution does need significant policies with respect to how to compile things. FreeBSD will not let you impose unruly CFLAGS like -fignore-important-functions and then report bugs. It will even filter out -march and replace it with something the development team supports.

      Gentoo definitely does need to mature.

      --
      // -- http://www.BRAD-X.com/ -- //
    7. Re:portage ? by Anonymous Coward · · Score: 0

      Erm, no. "-O3" turns on -finline-functions, not -fomit-frame-pointer.

  5. I do this with ALL my software, automatically. by ewomack · · Score: 5, Interesting

    See http://www.sourcemage.org/ All source, downloaded from the authors site and compiled to the settings and optimizations YOU choose.

  6. Gentoo... by dh003i · · Score: 4, Insightful

    "Does" this all for you. By "does", I mean that the install guide forcefully tells you to alter your /etc/make.conf file to include support for the features you want and the optimizations you want.

    Btw, you don't just sit around for 8 hours waiting for something to compile. If you're in CLI-only, you do the following:

    emerge screen
    screen emerge kde
    C^A C^C


    Then you do whatever else you want to do. I recommend getting IRSSI and Lynx for internet-amusement.

    If you already have Xfree86 setup, then you do the following:

    emerge ratpoison
    C^A C^C


    Then run whatever graphical X-programs you want in your new ratpoison windows.

    This is the beauty of a *modern day* multi-tasking OS like GNU/Linux. This isn't the same crap as Micro$oft. You can compile something AND do other things at the same time, since memory management is great as is multi-tasking (depending on your kernel and compile options for the kernel). Try compiling something using MS's compilers and doing something else at the same time. I compiled WindowMaker, for example, while doing other tasks in ratpoison.

    As for compile-time optimizations, I recommend the following:

    CFLAGS = -march=cpu_type -Os -pipe -fomit-frame-pointer

    That will optimize for small-size binaries and minimal RAM usage. I recommend the -Os optimization for the vast majority of applications, most of which are not CPU-intensive. That includes WMs, DEs, word-processors, spreadsheets, internet browsers, e-mail programs, GIMP, etc. I recommend -O2 for things which are CPU-intensive, like video/sound players, video/sound encoders, DNA/AA sequence alignment, and bayesian phylogenies.

    Make sure to

    man gcc

    So you know what your doing. Hint: once you hit a certain point with optimization, you can't have it both ways. Higher levels of optimization involve trading a memory/speed tradeoff, and you can go one way or the other. As I suggested before, I suggest memory optimizations for non-CPU intensive programs (the one's you'll probably be using all of the time, thus which'll be clogging up your memory); and speed optimizations for CPU-intensive programs, which you probably won't use as much.

    1. Re:Gentoo... by Anonymous Coward · · Score: 0

      Do you need to have a network connection to install gentoo? Or does everything come on the cdrom? I only have dialup.

    2. Re:Gentoo... by Anonymous Coward · · Score: 0

      gee i wonder why gentoo is infamous nowadays for 'new linux elite i'm so fast' wannabe following..

      (doesnt make the distro bad though, but buffing up things like this, i mean "hey dudes, you can do something else in linux whilst compiling!", come oon, you really think we could wait for hours and hours on our 486's without doing anything else? let that something else be a game of wumpus but still.. well. uh. gets me speechless, who the f runs in single virtual-terminal mode anyways?)

    3. Re:Gentoo... by dh003i · · Score: 2, Informative

      Please don't mis-represent my point. I did not say that you can play games or encode OGG-files while compiling software and get good performance/responsiveness. I believe I specifically mentioned common-day activities that all of us tend to do, which includes web-browsing, e-mail checking, document creation, and other "productivity" things...I haven't tried watching movies yet, but I suspect that wouldn't be a problem, since that goes through the graphics card.

      I am also not talking about a 486. That was my fault for not specifying. I'm on a 1.1GHz, 256MB RAM, 64MB GeForce 2 GTS, 19" monitor system (which I run at 2046x1536 resolution). On that particular system, I can compile and do other things fine. Those with similar systems should have similar experiences. Even on my "high-power" (though it's not really high-power anymore) system, I could not compile something and do other things productively on Windows.

      I'm not talking about a 486 here. if you have a 486, you should be compiling on some other, high-power, system and then moving that over to your 486. This would be especially important for such old crappy processors, because any extra optimization would help alot.

    4. Re:Gentoo... by dh003i · · Score: 0, Offtopic

      If you want to install the latest, up-to-date packages, yes. If not, I think you can buy a set of CDs with all the stuff on it. Look around on Gentoo.

    5. Re:Gentoo... by Anonymous Coward · · Score: 0

      for c++ code especially, alias analysis (-falias) can cause some real big speed (and size) improvements. It can easily take 2--20 times longer to compile, but for the QT and KDE base libraries, there is a significant speed boost (my benchmarks have shown a 10% boost for KDE, but X is probably the limiting factor).

    6. Re:Gentoo... by dh003i · · Score: 1

      Hmmm...interesting...does this also work for C and Obj-C code? I just might redo the entire system with it if it does ;-)

    7. Re:Gentoo... by vrt3 · · Score: 1
      On that particular system, I can compile and do other things fine. Those with similar systems should have similar experiences. Even on my "high-power" (though it's not really high-power anymore) system, I could not compile something and do other things productively on Windows.

      That's somewhat weird, since I've done exactly that for years, with much less powerfull systems. Visual Studio running on Windows NT, 98, 2000: no problem.

      These days I do the same on a P4 1.7 GHz, but Borland C++Builder instead of MS Visual Studio. Much less responsive: the machine seems to be swapping all the time.

      --
      This sig under construction. Please check back later.
    8. Re:Gentoo... by Dahan · · Score: 1
      No, I think you're missing the point... the point is that we've been running other programs while compiling for decades now. On 486s, even. There's nothing special about Gentoo in that regard. I was passing the time by reading Usenet while waiting for a compile to finish before Linux even existed.

      I did not say that you can play games or encode OGG-files while compiling software and get good performance/responsiveness.

      Sounds like something's wrong with your OS or setup if you can't do that on your 1.1GHz machine... I can certainly play games and encode OGG files and compile at the same time, and the fastest machine I have is a PIII 850MHz laptop. I can even use nice to control the portion of CPU time I'd like to give to each of those tasks.

    9. Re:Gentoo... by Anonymous Coward · · Score: 0
      yes. It works wherever a variable may be referred to by a pointer. If you take the address of a variable (&) or dereference a pointer, gcc won't be able to keep the variable in a register (since it may be modified in memory). So every variable access requires reloading/restoring it to memory.


      Alias Analysis does some extra calculations to see if that will be a problem, and allows other optimizations to be run if it's not a problem.


      I belive the actual flag is -fstrict-aliasing. For scientific/pointer arithmetic code it can really help. C++ gets the boost because there are a lot of pointers behind the scenes.

    10. Re:Gentoo... by FroMan · · Score: 1

      This is the beauty of a *modern day* multi-tasking OS like GNU/Linux.

      For the most part I'd agree with you. However, when there is a lot of disk IO, it will still bind up some. Not so bad with SCSI disks, but IDE drives, even with DMA you will run into problems.

      When gentoo is doing the copying part it can still be pretty chunky on the desktop. Granted usually that is for a fairly short period of time. During the build its pretty reasonable, as it should be.

      --
      Norris/Palin 2012
      Fact: We deserve leaders who can kick your ass and field dress your carcass.
    11. Re:Gentoo... by Anonymous Coward · · Score: 0

      omfg 10% speed boost.. menus now drop down .003% faster! gent00 pwnz m3!!!

    12. Re:Gentoo... by Anonymous Coward · · Score: 0
      Official Gentoo-Linux-Zealot translator-o-matic

      Gentoo Linux is an interesting new distribution with some great features. Unfortunately, it has attracted a large number of clueless wannabes who absolutely MUST advocate Gentoo at every opportunity. Let's look at the language of these zealots, and find out what it really means...

      "Gentoo makes me so much more productive."
      "Although I can't use the box at the moment because it's compiling something, as it will be for the next five days, it gives me more time to check out the latest USE flags and potentially unstable optimisation settings."

      "Gentoo is more in the spirit of open source!"
      "Apart from Hello World in Pascal at school, I've never written a single program in my life or contributed to an open source project, yet staring at endless streams of unintelligible GCC output whizzing by somehow helps me contribute to international freedom."

      "I use Gentoo because it's more like the BSDs."
      "Last month I tried to install FreeBSD on a well-supported machine, but the text-based installer scared me off. I've never used a BSD, but the guys on Slashdot say that it's l33t though, so surely I must be for using Gentoo."

      "Heh, my system is soooo much faster after installing Gentoo."
      "I've spent hours recompiling Fetchmail, X-Chat, gEdit and thousands of other programs which spend 99% of their time waiting for user input. Even though only the kernel and glibc make a significant difference with optimisations, and RPMs and .debs can be rebuilt with a handful of commands (AND Red Hat supplies i686 kernel and glibc packages), my box MUST be faster. It's nothing to do with the fact that I've disabled all startup services and I'm actually running BlackBox instead of GNOME or KDE."

      "...my Gentoo Linux workstation..."
      "...my overclocked AMD eMachines box from PC World, and apart from the third-grade made-to-break components and dodgy fan..."

      "You Red Hat guys must get sick of dependency hell..."
      "I'm far too stupid to understand that circular dependencies can be resolved by specifying BOTH .rpms together on the command line, and that problems hardly ever occur if one uses proper Red Hat packages instead of mixing SuSE, Mandrake and Joe's Linux packages together (which the system wasn't designed for)."

      "All the other distros are soooo out of date."
      "Constantly upgrading to the latest bleeding-edge untested software makes me more productive. Never mind the extensive testing and patching that Debian and Red Hat perform on their packages; I've just emerged the latest GNOME beta snapshot and compiled with -O9 -fomit-instructions, and it only crashes once every few hours."

      "Let's face it, Gentoo is the future."
      "OK, so no serious business is going to even consider Gentoo in the near future, and even with proper support and QA in place, it'll still eat up far too much of a company's valuable time. But this guy I met recently on #animepr0n is now using it, so it must be growing!"

      -

  7. QOTD by BoneMarrow · · Score: 0, Offtopic

    I know this is offtopic but, the quote at the bottom of the page:

    A wise man can see more from a mountain top than a fool can from the bottom of a well.

    This doesn't make sense does it?

    Shouldn't the fool be on the mountain seeing less than the wise man in the well? may be I'm the fool.

    --
    Unfortunately, no one can be told what my sig is...
    1. Re:QOTD by th032 · · Score: 1

      I think thats why the wise man is on the mountain and the fool is in the well...the wise man would never get himself a well

    2. Re:QOTD by th032 · · Score: 1

      in a well

    3. Re:QOTD by BoneMarrow · · Score: 1

      But isn't the point about what they can see, not where they are?

      ie. The wise man knows about things like bugs and molecules etc, but the fool down the well can probably only see water and/or mud.

      --
      Unfortunately, no one can be told what my sig is...
    4. Re:QOTD by Anonymous Coward · · Score: 0

      The point is, the standard quotation really is:

      "A wise man can see more from the bottom of a well than than a fool can from a mountain top."

      By changing it around like this, it's vaguely amusing if you know the original quote.

      Yes though, your reasoning is quite correct. Frankly I'd have preferred the original quote.

  8. See, this is what I don't get... by Joseph+Wharton · · Score: 1

    Why aren't more binary releases compiled for i686 or at least i586? For command-line applications, I can understand compiling for i386. Many of us have a 386/486 PC running as a router or for some other use. But you would think that with the horsepower required by KDE, binary releases would be i586 or i686 by default.

    --
    Quality or Quantity, don't tell me they're the same.
    1. Re:See, this is what I don't get... by Repugnant_Shit · · Score: 2, Informative

      Some distros do. But one problem is the code that the GCC generates. Gentoo warns you to not use march=pentium4, and to use i686 instead, because pentium4 can cause bad code. I guess that older versions of GCC may have had the same problem for i686 at one point. Who knows...

    2. Re:See, this is what I don't get... by SQLz · · Score: 1

      Some distro's do. Mandrake for instances compiles for Pentium and above (i586) because it considers itself a "desktop" form of linux and noone in their right mind is using less than a pentium for a desktop system. Redhat, Debian, and the like are need to be more platform independent because they are used on all kinds of hardwaref for all kinds of applications. Redhat has platform specific rpms for important thinks like glibc, the kernel, etc but a major selling point on linux is that it will run out of the box on anything.

  9. Here's a script that works. by SN74S181 · · Score: 5, Funny

    This optimizes the hell out of KDE, and it reduces the memory footprint as well. It's such a simple script that I include it right in my ~/.cshrc file:

    alias kde twm

    You can substitute fvwm2 or some other window manager if you're not a tab enthusiast.

    1. Re:Here's a script that works. by Anonymous Coward · · Score: 0

      I wonder why somebody modded that down as I troll...I thought it was kind of funny. I guess one of the moderators went and tried it

    2. Re:Here's a script that works. by Anonymous Coward · · Score: 0

      Probably a pedantic moderator marked it down because it doesn't work (unless you call your Window Manager from the command line once plain vanilla X is loaded).

      Or somebody pissed because it doesn't work that way in /bin/bash.

  10. How much? by ariels · · Score: 3, Insightful

    How much performance increase are we talking here? Faster startup times? Better response times? Perceived better response?

    There's no reason to work hard without knowing what the benefits are. For that matter, say I do all this and it doesn't seem to work any faster. How do I know if I did something wrong, or if there is nothing to measure?

    --
    2 dashes and a space, or just 2 dashes?
    1. Re:How much? by F1uX · · Score: 1

      I'll tell you that , coming from three years of different precompiled distros(redhat,mandrake, debian,slack), all with the last recompiled kernel, six month ago I tried to install gentoo: when I first started my new distro I found a "visible" general improvement, in every task I did, and also in startup procedure. This is why, from now on, I'm not going to change my distro anymore, I'm just too happy with gentoo...

  11. Konstruct by twener · · Score: 3, Informative

    Why not use Konstruct instead of typing all this manually?

  12. KDE performance tips by twener · · Score: 3, Informative

    I don't see where this article is talking about optimizing other then self-compiling. Better read the KDE performance tips.

  13. Hmmmm by Lukey+Boy · · Score: 1, Funny

    So far this is the best way I've found to speed up KDE.

    1. Re:Hmmmm by Anonymous Coward · · Score: 1, Informative

      Enlightenment is hardly light weight now is it? I always recommend the following to those who want a faster desktop experience:
      lwm
      PekWM
      WindowLab

    2. Re:Hmmmm by Anonymous Coward · · Score: 0

      Yuck. Try openbox. It's light, customisable, and has creamy antialiasing.

  14. I doubt it makes noticeable difference by Seli · · Score: 1

    The claim about distributions not optimizing for newer CPUs is not true. They usually use something like -march=i486 -mcpu=i686, which means it uses instructions that at least i486 knows, and optimizes them for i686 CPUs. I personally doubt recompiling KDE with better compile flags that those in distro shipped packages makes noticeable difference. Things like prelink, O(1) scheduler, better mapping of binaries into memory, or code optimizations of KDE are things that may make difference.

    BTW, even this may make for sure more difference that recompiling : http://dforce.sh.cvut.cz/~seli/download/tips.html

    1. Re:I doubt it makes noticeable difference by polyp2000 · · Score: 1

      Try Gentoo, compiling everything from source made a massive , noticable improvement with KDE on my dual athlon system! much faster than my previous SuSe install!

      --
      Electronic Music Made Using Linux http://soundcloud.com/polyp
    2. Re:I doubt it makes noticeable difference by Seli · · Score: 1

      But the thing that made the different most probably wasn't KDE recompile, but instead some of the other stuff I listed ( O(1) scheduler, prelink, whatever). Or maybe it was so much faster just because you believed it must be so much faster after you recompiled it.

    3. Re:I doubt it makes noticeable difference by SQLz · · Score: 1

      Actually, I was running Redhat 7.2 and their i386 binaries. KDE was unusable. Even Blackbox and Fluxbox had very poor GUI response. After switching to Gentoo I can use KDE 3.1.1 with all the bells and whistles on a 600Mhz laptop no problem, transparent menus and everything. The only thing I can attribute to the huge increase in graphican peformance itis compiling the whole system from source. Not to mention, doesn't using things like MMX,3DNOW, SSE, etc speed up graphical applications as long as the application is written to take advantage of the instructions? I don't know this for sure but doesn't X integrate MMX and other extentions to i386 that speed up performance. I remember when MMX came out I patched my photoshop with an MMX update and operations that were taking around 5 minutes to complete were now taking 3. At the time, that was huge. Anyway, It was a lame article but I do think that binaries optimized for a particular processor do make a huge differenece in peformance when the software is written to take advantage of it.

    4. Re:I doubt it makes noticeable difference by Tukla · · Score: 2, Interesting

      I'd love to, but I'm stuck on a dial-up connection. Is there any way to get a snapshot of all Gentoo on CD-ROM or DVD? I've been checking out the Linux stores without any luck.

  15. what about icc? by AssFace · · Score: 1

    Intel's compiler brags that it is totally compatible with gcc and gives a 30% speed increase to the final result on an Intel processor.

    On my code I have seen that to be very true - but I have never bothered trying it on "other people's" code.

    How much of it can you compile with that, and what sorts of speed increases (if any) do you see?

    I would imagine there isn't much speed increase if it won't even successfully compile of course - but if it works, then is it noticably better?

    And I suppose this is only applicable on Linux boxes that are using rpm since the icc installer seems to require that.

    --

    There are some odd things afoot now, in the Villa Straylight.
    1. Re:what about icc? by chowells · · Score: 1

      Some ICC support fixes have been comitted to CVS HEAD recently.

    2. Re:what about icc? by FooBarWidget · · Score: 2, Interesting

      "Intel's compiler brags that it is totally compatible with gcc and gives a 30% speed increase to the final result on an Intel processor."

      That's only true for pre-GCC 3.1 releases. GCC 3.2 can produce code that rivals that of Intel C++. GCC 3.1 and 3.2 contain lots and lots of x86 optimization improvements.

    3. Re:what about icc? by be-fan · · Score: 1

      Not on my code. I'm using 3.2.2, and there is still a lot of C++ code where Intel C++ will easily be over 20% faster. A lot of it has to do with high-level optimizations. You throw complex/abstracted code at GCC, and you lose a significant amount of performance compared to low level C type code. Meanwhile, ICC will compile away most of that abstraction, and you'll get code that's as fast as the equivilent C code. Now both compilers optimize very well, and a performance diff of 20% in certain cases really isn't that important, but the performance difference is there, and there are several cases where ICC will do obvious optimizations and GCC won't.

      --
      A deep unwavering belief is a sure sign you're missing something...
  16. Xinerama? by Anonymous Coward · · Score: 0

    Why the hell does the user disable Xinerama? It seems negligent to disable it without even explaining why you might want it.

  17. missing option (intel) by oliverthered · · Score: 1

    why not use the intel compiler while you at it, it's much better than GCC for intel processors?

    --
    thank God the internet isn't a human right.
  18. Filtering out -march? by Anonymous Coward · · Score: 0

    Now that's just irresponsible. Specifying the correct architecture is the best thing you can do when compiling your software, aside from using the -O# settings and not the -frandom-crap flags. If -march=$$$ breaks the software, then the compiler is broken and a bug report needs to be filed. If setting -O3 breaks your software, file a bug report. If -Os breaks your software, file a bug report. If -ffast-math breaks your software, don't use -ffast-math ! It is specifically documented as unsafe for a reason. Why the hell do people think that they know better than the authors of their compiler what optimization settings are safe? The best options for compiling software, all software, is -march=$$$$$ -O#, where # is 1, 2, 3, or s. And remember too, there are no numbers beyond 3 anymore. And 3 is the same as 2 with code-bloating optimizations enabled, same as s is the same as 2 with code-constricting optimizations.

  19. and by Anonymous Coward · · Score: 0

    Don't forget -funroll-loops.

  20. Mandatory RPM user post... by Ed+Avis · · Score: 1

    I don't get it, why are the instructions telling you to get the raw tarballs and 'make install'? Why not get the source packages from whatever distribution you use and rebuild them with different compiler flags?

    It sure would be useful to have a single command equivalent to Gentoo's 'emerge' which means 'download the source packages, build them with my compiler switches and install'. Does any RPM- or dpkg-based distribution have this?

    --
    -- Ed Avis ed@membled.com
  21. hrm... by DreadSpoon · · Score: 1

    Durn, my RedHat9 CDs won't install on my Mac! So much for run on anything out of the box. ;-)

    I really don't agree with this one-Linux-fits-all approach. Separate RedHat's (or whatever) for Desktop and Server use would be great. Which they do now, I suppose; perhaps in RedHat X we'll see better optimizations for desktop usage.

    Of course, as I advocate this splitting of distros, I also hate the way we have 20 distros to do the same thing, and they all do it half-assed... ;-) Lindows/Xandros/Lycoris/Ark/etc. merge would be nice, since they all do the same thing but just fragment the market. Same goes for Mandrake/RedHat/SuSE/etc.

    One can argue they each have strengths and weaknesses, but that's mostly because they haven't merged. ~,^

    I'd love to see one primary distro for each class of device/use, along with the plethora of hobby linuxes (which I rather enjoy using from time to time). In the commercial world, tho, the fragementation isn't helping with anything other than increased competition, but we all have enough of that from Microsoft/Sun/Apple already, don't we?

    It'd also be great financially to have fewer commercial entities. Take Mandrake and SuSE for example; they both employ developers. How many of those developers end up doing the exact same thing for their companies? Two installer dev teams, two config tool teams, etc. Imagine, if they merged developers, they'd have the income from both companies to pay these developers, but now they can stop duplicating. You get more for the money. And Linux distros aren't exactly a high income source, they need to waste as little as possible. :(

    Of course, why I'm wasting time to say this to a bunch of Slashdot users that will, over all, have absolutely no effect on the situation, is beyond me. ~,^