Why is kernel-2.6.9 (OEL-4) faster than kernel-2.6.18 (OEL-5) ?

Hi,
as long as RHEL-5 and then OEL-5 have been released, I have been wondering why my own programs, compiled and run on RHEL-5/OEL-5, are slower than the same programs compiled and run on RHEL-4/OEL-4 on the same machine. This is really barmy since gcc-4.1, shipped with RHEL-5/OEL-5, is very aggressive compiler and produces faster binary code than gcc-3.4.6, shipped with RHEL-4/OEL-4. I verified this hundred times testing both compilers on RHEL-4/OEL-4 and RHEL-5/OEL-5. The 4.1 compiler always produces faster executable on the same OS.
The problem is obviously in kernel-2.6.18. There is something in the kernel (maybe scheduler?) that slows down the execution of programs. But what? I experimented with changing various kernel boot parameters (eg "acpi=off" etc), even tried to recompile the kernel many times with various combinations of config parameters, and nothing helps. Thus, I'm still wondering whether the problem is solvable by disabling one or more config parameters and recompiling the kernel, or is deeply embedded in the main kernel code.
Is there anybody in this forum who experienced the same, say running OEL-4 before migrating to OEL-5?
Here are two examples showing different execution times on OEL-4.5 (kernel-2.6.9-55.0.5.0.1.EL.i686, gcc-3.4.6-8.0.1) and OEL-5 (kernel-2.6.18-8.1.10.0.1.el5, gcc-4.1.1-52.el5.2). The first example is trivial but very sensitive to overal system load and kernel version. The second example is "Sieve of Eratosthenes" - the program for finding prime numbers (CPU bound).
EXAMPLE 1.
/*  Simle program for text screen console  */
/*  very sensitive to overall system load  */
/*  and kernel version                     */
#include <stdio.h>
int main(void)
    register int i;
    for(i = 0; i < 1000000; i++)
     printf(" %d ", i);
    return 0;
/* end of program */
$ gcc -O2 -o example1 -s example1.c
$ time ./example1The average execution times on OEL-4.5 and OEL-5 are as follow:
Mode      OEL-4.5         OEL-5
real      0m3.141s        0m4.931s
user      0m0.394s        0m0.366s
sys       0m2.747s        0m4.563s
----------------------------------As we can see, the program on the same machine, compiled and run on OEL-4.5 (gcc-3.4.6 and kernel-2.6.9) is 57% faster than the same program compiled and run on OEL-5 (gcc-4.1.1 and kernel-2.6.18), although gcc-4.1.1 produces much faster binary code. Since the times the process spent in user mode are almost equal on both OS, the whole difference is due to the time the process spent in kernel mode. Note that kernel mode (sys) is taking 66% more time on OEL-5. It tells me that "something" in the kernel-2.6.18 slows down the execution of the program.
In the second example OEL-4.5 is also faster than OEL-5, but the differences in execution times are not so drastic as in the first example.
EXAMPLE 2.
/*           Sieve of Eratosthenes           */
#define GNUSOURCE
#include <stdio.h>
#include <stdlib.h>
#define MAX_PRIME_AREA 100000
#define REPEAT_LOOP 10000
int main(void)
    int prime, composite, count;
    char *sieve_array;
    if ((sieve_array = (char *) malloc( (size_t) (MAX_PRIME_AREA + 1))) == NULL)
     fprintf(stderr,"Memory block too big!\nMemory allocation failed!\a\n");
     exit(EXIT_FAILURE);
    for(count = 0; count < REPEAT_LOOP; count++)
     for(prime = 0; prime < (MAX_PRIME_AREA + 1); prime++)
             *(sieve_array + prime) = (char) '\0';
     for(prime = 3; prime < (MAX_PRIME_AREA + 1); prime += 2)
         if (! *(sieve_array + prime) )
          *(sieve_array + prime) = (char) 'P';  /* offset prime is a prime */
             for(composite = (2 * prime); composite < (MAX_PRIME_AREA + 1); composite += prime)
              *(sieve_array + composite) = (char) 'X';  /* offset composite is a composite */
        /* DO NOT COMPILE FOR TEST !!!
        fprintf(stdout, "\n%d\n", 2);
        for(prime = 3; prime < (MAX_PRIME_AREA + 1); prime += 2)
            if ( *(sieve_array + prime) == 'P' )
                fprintf(stdout, "%d\n", prime);
    free(sieve_array);     
    return 0;
/* End of Sieve of Eratosthenes */The average execution times on the same machine on OEL-4.5 and OEL-5 are:
MAX_PRIME_AREA     Mode         OEL-4.5         OEL-5     
                   real         0m9.196s        0m10.531s
   100000          user         0m9.189s        0m10.478s
                   sys          0m0.002s        0m0.010s
                   real         0m20.264s       0m21.532s
   200000          user         0m20.233s       0m21.490s
                   sys          0m0.020s        0m0.025s
                   real         0m30.722s       0m33.502s
   300000          user         0m30.684s       0m33.456s 
                   sys          0m0.024s        0m0.032s
                   real         1m10.163s       1m15.215s
   400000          user         1m10.087s       1m14.704s
                   sys          0m0.075s        0m0.079s
---------------------------------------------------------Does this ring a bell with anyone? Any clue why?
N.J.

An hour? Hard to believe or is your hardware that
old?An hour? That's a super good time for 3 kernel
packages (i686, xen and PAE) with all modules, plus 3
kernel-devel packages, plus debuginfo package of
150-580 MB where smart people at Red Hat decided to
put uncompressed vmlinux image which is necessary for
kernel profiling and debugging. Ah, I had a different kernel make process in mind.
Oracle doesn't ship
debuginfo package. Of course, this is when I build a
"complete suite" of kernel rpm packages using
unmodified spec file. And, to be honest, it takes
much more than an hour, maybe even two hours. Another
thing is compiling single i686 kernel without
building a package. But it also takes at least half
an hour. Anyway the time significantly depends on how
many modules are selected to be built in.That what I was looking for.
What's your time to build a single kernel (which
version?) with default set of modules ? On which
hardware ? I've only access to a root server right now, which is
cat /proc/cpuinfo | grep "model name"
model name      : AMD Athlon(tm) 64 Processor 3700+with about 2GB of RAM
free -m
             total       used       free     shared    buffers     cached
Mem:          2024       1957         67          0        368       1291
-/+ buffers/cache:        297       1727
Swap:         3827         24       3803under
uname -a
Linux base 2.6.22-gentoo-r5 #5 PREEMPT Mon Sep 10 22:32:37 CEST 2007 i686 AMD Athlon(tm) 64 Processor 3700+ AuthenticAMD GNU/LinuxThis is what i did
cd /usr/src/linux
make clean
time nice -n  19 genkernel --lvm2 --makeopts="-j2" --oldconfig all
* Running with options: --lvm2 --makeopts=-j2 --oldconfig all
* Linux Kernel 2.6.22-gentoo-r5 for x86...*
mount: /boot mounted successfully!
* config: >> Running oldconfig...
* config: --no-clean is enabled; leaving the .config alone.
*         >> Compiling 2.6.22-gentoo-r5 bzImage...
*         >> Compiling 2.6.22-gentoo-r5 modules......
real    17m30.582s
user    16m8.480s
sys     1m9.000sWhat could helped here was that I've switched off some modules and (maybe) the use of ccache.
C.

Similar Messages

  • Why is my iMac 450/128 much, much faster than my Powerbook 333/512?

    Hey boys and girls,
    I'm sort of new to the Mac world, but I'm working hard to become clever.
    So, here's the story. I have a Powerbook Bronze 333MHz with 512MB of RAM and the Toshiba 6GB drive it was born with and 10.3.9. I have a Bumbleberry (I think that's the "official" colour) iMac at work with a G3 at 450MHz and only 128MB of RAM also running 10.3.9.
    The iMac runs much, much faster than the Powerbook, despite barely meeting the minimum RAM requirements of 10.3. What are some possible reasons for this? I understand that this ain't no speed machine, but the Powerbook is so slow that there is a second or two second typing delay in an Adium chat window for heaven's sake.
    OK, so the iMac is technically faster, but I feel as though there is something wrong with the performance of the Powerbook, especially with all the RAM I've thrown at it (the Activity Monitor says that the PB has roughly 140MB of free RAM right now). I have a newer 40GB 5400 RPM drive that I'm tempted to install, to see if the 6GB drive is just old and tired (it whines a bit, so I'm sure it is to some degree) -- am I wasting my time?
    Thanks for any help in advance.
    Ugli
    PB Bronze   Mac OS X (10.3.9)  

    ugli:
    Welcome to Apple Discussions.
    You are well on the way to becoming clever. Really. Just by logging in and posting here you have started a process of learning that can go on until you are really clever.
    There are a number of reasons your iMac seems faster that the Lombard. One is that it has a faster processor. Secondly, even with more RAM your Lombard has a small, slow HDD. I don't know how much free space there is on your HDD, but 6 GB fills up quite quickly these days. I am sure the larger (and faster) HDD will make a difference. I had maxxed out the RAM on my Pismo, but it was when I installed a larger, faster HDD that I noticed the difference. And, of course, when I upgraded the processor I noticed the biggest difference. Still not match for the newer faster machines, but then, I'm not as fast as I used to be either.
    Good luck in your quest.
    cornelius
    PismoG4 550, 100GB 5400 Toshiba internal, 1 GB RAM; Pismo 500 OS X (10.4.5) Mac OS X (10.4.5) Beige G3 OS 8.6

  • Why does Magic Mouse use much more battery power than the keyboard?

    I have the Bluetooth versions of the keyboard and the Magic Mouse. I use the same rechargeable batteries in each. Yet the mouse has now come to the end of a THIRD set of AAs, while the keyboard still has 60% of its first set.
    Why? They are both constantly in use, so why does the Mouse drain batteries so much faster than the keyboard? Viz: the mouse about once a week (two, max), while at this rate, it will be another month or more before the keyboard drains.

    Actually I don't! I consider myself a 'power user' in that I will always use the keyboard first, and I learn keyboard shortcuts for nearly everything I do regularly.
    I would guess my use is 50:50 at worst?

  • Why would my video clips be running too fast when played on the monitor panel?

    I posted my problem earlier today, but re-reading it maybe I didn't explain myself well enough.
    My main question is: "why would my video clips be running too fast when played on the monitor panel ?".  This is occuring after I have selected my media from the Tasks Panel and placed them in correct order in the Timeline/Sceneline.  I knew something was wrong when I could see that the clips were not indicating their right length when viewed in the (expanded) timeline.  They were compressed into just a few seconds, whereas the clips should have been at least 5 minutes.  I ran the clips in the monitor and sure enough they ran too fast, with a lot of jerking movements.
    The 3 video clips I am trying to make into a HD PAL video were taken with my Nokia N8 mobile video camera. These are in mp4 format. Can this present a problem ?  Note that when I play these individual HD clips on my computer in (Windows Media Player) they run fine.
    After I placed the clips in my Project Panel (or before in the Organize Workspace), I have perforned no change or manipulation of the clips.  They are in their original state.
    Just too confirm that the clips did seem to be compressed, I burnt a DVD, the resultant video ran in a matter of seconds.
    Help would be greatly appreciated.

    Yes, that is what the problem was.
    Although the video camera on my Nokia N8, mobile was capturing at 25fps,
    for some reason once transfered over to PrE9 (via file transfer), the clip was interpreted as 500fps.  Once in Interpret Footage I was able to change the fps to 25.
    Thanks for the help.

  • Why is the iTunes shop in Australia more expensive than the rest of the world?

    Why is the iTunes shop in Australia more expensive than the rest of the world?

    How do you know that there is not parity?
    Do you know Apples expenses in each country?
    Apple has to sell the music for the price that they can negotiate with the owners of the distribution rights in each country.
    Perhaps those who own the rights to distribute the music in Australia simply negotiated a higher price.

  • Why are 'saved as' .psd files so much bigger than original raw nef files?

    I was under the impression that original raw files were the biggest possible. I appear to be very wrong. Why are 'saved as' .psd files so much bigger than original raw nef files?
    I'm beginning to think that saving them as psd is a bad idea.
    Yes, though I've heard all the arguments of keepng the original raw files (For ex. Did you throw away the negatives when you were using film) I se eno purpose in keeping them. Once I've made the initial adjustments--cropping, color correction etc. I don't feel a need to ever go back and never do. Most of my work is done in Photoshop and I like it that way--but suddenly finding myself with such huge files doesn't appeal to me at all--and other formats like tif...well never mind for now.

    Good point made c.pfaffenbichler however, my thinking is this--there is time spent on the raw file and then there is much more time spent on (usually a psd) the file once in Photoshop. For me to then go back to the orignal raw file, after having worked on it on PS would mean getting rid of all the work (larger amount of work, time wise and artistic wise) done on PS which seems pointless. Although the psd file does show your layers and stuff it only shows the end results of that layer. It does not show from where to where you pointed your brush, from what point to what point you changed the color or part of an image etc. etc.Anyhow I understand why most people keep their raw files, but this is the main reason why I do not. It would mean hours of work on an image you already worked on (and usually were satisfied with) to perhaps make some minor alteration. Also please note that though I was noce a pro photog, no I do it mostly for fun. Getting the exact red in my Coca Cola can has never been of importance. On the other hand, if there were a way of working on a raw file within Photoshop and keep it (save it as) a raw file equivalent, then I would absolutely do so.

  • Why is the audio on my finalized project different than when I'm editing it?

    Why is the audio on my finalized project louder than the when I watch it on the editing screen? The background music doesn't turn down when I watch the final product and I cannot hear the clip, but on the small/edit screen it works perfectly.

    Have you already exported it and is it there where it messes up? If you are just clicking the button that makes the video full-screen in iMovie, that's your problem. For some reason, many people have movie glitches when they do that, like the video pausing for no reason, loss of sound, and other glitches. Just export it and it will most likely work.

  • Why is JVM faster than CLR?

    hi
    i wrote a N-body algorithm in both Java and C# (shown below). i executed it using .NET CLR and JDK1.4.1. in JDK it is twice as fast as .NET (on win2000). now i am trying to find out why is it so??
    the interesting thing is that i ran some other algorithms like FFT and graph alogrithms, and they are faster in .NET. so i want to find is there some operation in the below algorithm that is making it run faster in JDK.
    in general, what can the possible reasons be for JVM to run faster than CLR?
    thanks
    double G = 6.6726E-11;
    double difference = 0.0;
    for(int i=0; i<numBodies; i++)
         accelarations[i] = 0.0;
         for(int j=0; j<numBodies; j++)
              if(i != j)
              difference = radii[i] - radii[j];
              if(difference != 0)
              accelarations[i] += masses/(Math.pow(difference, 2));
         accelarations[i] *= G;

    Interesting N-Body problem that treats accelerations as scalars.
    Anyway, if there is no optimisation for small integer powers in the Math.pow() method, then I'd expect almost all the time is used there or in its equivalent in .NET. Hardly a meaningful test of relative performance.
    Try using (difference * difference) instead.
    Sylvia.

  • Why Garageband doesn't let me send email more than 10 mb suddenly since today 1/10/14

    Why Garageband doesn't let me send email more than 10 mb suddenly since today 1/10/14.
    Just destroy my business of voice over. It makes me furious first thing in the morning!!Why????

    hey leonie you just don't get it,
    I understand your issue very well, only there is no solution but to use the provided tools in iOS 8.
    It looks like Apple blocked large email attachments completely for any app. I cannot mail any file larger than 10 MB in any way from my iPad or iPhone, neither photos nor videos. all ill bring up this warning.
    Since downgrading to iOS 7 and the earlier GarageBand version is not supported by Apple, you can only send feedback to Apple and report a usability problem and request a feature change.
    Use this form:  Apple - GarageBand IOS - Feedback
    BTW: none of my friends or family members can receive attachments larger than 10MB. It is only our university network that allows to mail larger files.

  • Why is my 2008 Macbook faster than my 2012 MacBook Pro?

    I got a basic, 13Inch Macbook back in 2008. It has been used, nonstop, for the past almost 5 yrs since i bought it. I never turn it off, it always gets used on a bed/couch, tonnes of windows/programs constantly open. Its full of crappy DLed programs, movies, music and whatnot, has only recently been updated to 10.6 OS X. Its dying, the charger barely works, and it over heats and blacksout sometimes and yet, it runs so much faster than my end of 2012 13in MacBook Pro, 2.9GHz model. Slower to the point that i still use my old one and let Hubby take the new one to the Construction site with him. Ive used it maybe once or twice since i bought it in November. Booting up is slower, general use is slow, opening programs is slower. And its got almost nothing on it!
    Just wondering why its slower when its newer and supposedly better? I thought i was upgrading?

    Wipe the drive on the new system and Reinstall OS X. Factory installs aren't all they are supposed to be. Sometimes corrupted from the Get Go.
    Only by wiping the drive and doing a Fresh Clean Install will you know if your slowness was caused by some type of OS corruption or posibly a hardware problem.
    Also you don't mention what RPM the drive is in your older Mac but Apple puts really Slow 5400RMP drives in the newer models by default. These Slow 5400RPM drives will slow down the whole system. Slow to boot. Slow to load programs and files into those programs and slow to save back to the drive. Also OS X is constantly writing to and reading from the hard drive so a slower drive will again slow down the whole system.
    If it is less then 14 days old you can return it No Questions Asked for a full refund and then maybe try another, different, machine.

  • Why is iMovie 5 x faster than AP3?

    I noticed that slideshow exports in AP3 seemed to take a long time and did a test with iMoive 09. I exported the exact same slideshow of 60 pictures and 1 song from both iMoive and AP3. The iMovie export was 5 times faster than the AP3 export.
    Why is this and can anything be done to speedup AP3 slideshow exports?
    I have a fairly quick Mac, 2 x 2.26 Ghz Quad-Core Intel Xeon, 16 meg of ram, ATI Radeon HD 4870.
    Any thoughts?
    Ken

    You may also want to check your router. Some routers use a priority bandwidth feature that will dedicate more bandwidth to one machine. If for some reason the macbook's download was started earlier than the imac's, then this might be part of the discrepancy. There are a lot of factors to think about when it comes to wifi bandwidth.
    I do agree with the one comment about testing one computer at a time instead of simultaneously.
    Also, when you said you have the movies from the Macbook on your iMac, can you elaborate? If you are using a shared library, then your iMac is going to be using part of your download speed for updates to your shared itunes library, where your Macbook is only going to be uploading the list. If I am incorrect in my understanding of the sharing of iTunes library, someone please let me know.

  • Why are ACR PSD files 10-20 percent larger than the same file resaved in PSD?

    Why are ACR > PSD files 10-20 percent larger than the same file resaved in PSD? I posted this many years ago and never found an answer. Now that my drives fill up quicker, I thought I might chase this question a little bit further.
    Same .CR2 saved within ACR either with cmd-R or open ACR within PSD, the saved file is 34.5mb. Resave that same file (no edits) within PSD either with or without Max-compatible and the file is now 30.7mb. Another file that is 24.5 becomes 19.5MB.
    Why the difference? Is ACR and PSD actually using different compression strategies?
    thanks.
    Mac 10.8.5 / CC / ACR 8.4.1 - but this has been a consistent behavior over many years and versions, CS6 / CC.
    Same .CR2 saved within ACR either with cmd-R or open ACR within PSD, the saved file is 34.5mb. Resave that same file (no edits) within PSD either with or without Max-compatible and the file is now 30.7mb. Another file that is 24.5 becomes 19.5MB.

    Hi Jeff
    If it is RLE it's not as efficient as LZW:
    Saved ACR>PSD = 40.1MB  (sample image this AM)
    opened in PS and resaved as PSD = 30.8MB
    resaved as TIF without LZW = 40.1MB    (this adds to your thought that the ACR>PSD doesn't us any compression)
    resaved as TIF/LZW = 9.6MB
    Jeff Schewe wrote:
    I really think your priorities are a bit off. 10-20% is meaningless...you just need to get bigger....  and quit fussing over a few GB's here or there...
    ???   I hope that the Adobe engineers are fussing over 10-20% efficiencies.
    I'm within arms reach to a rack of 40TB of drives (doesn't include off-site drives), and all 2TB drives are being recycled to 4TB drives, as a result the rack is always growing. Actually the ACR>PSD files don't really make a difference in our long term storage, only for the nightly backups. But anyway, how you save, what you save etc. should all be part of the discussion.
    .... so in my case, throw in an excess MB here and there and all of a sudden you are talking TB's. Plus advantages in backup times, drive life, and energy use.
    Somebody added compression into the PS>PSD format, but it wasn't included in the ACR>PSD format, was it a decision or an oversight? If it's just a matter of making ACR compatible with PS when saving the same PSD format..... then why not?
    regards,
    j

  • HT201386 many of the functions of iPhoto are lost in Photos. Why delete it? its better to remove Photos than iPhotos.

    many of the functions of iPhoto are lost in Photos. Why delete it? its better to remove Photos than iPhotos.

    Please use the feedback form to let the Apple developers know:
    Apple - iPhoto - Feedback
    Brushes, tags, captions, info panels are all essential for a photo library.

  • Why would oracle 9i drivers faster than oracle 10g drivers against a 10g?

    I'm skeptical of the claim but we have a system at work and tests have been done that apparently is showing that the older oracle 9i thin jdbc driver is performing a fetch faster than the 10g driver. This for a query that is currently doing a full table scan.
    Is there a default setting in 10g vs 9i that can explain why the perceived query performance is faster with the older thin driver?

    steffi2 wrote:
    What was observed was that when they started using the old Oracle 8.1.7 8i client jar against this 10g data the actual execution plan changed dramatically to use indexes where was previously it was not doing so and it was doing a full tablescan.
    Why would the introduction of the old 8i jar have this affect?Maybe the test is flawed. For example one test was run with the network was loaded while the other wasn't. Or different connection parameters.
    That said I believe somewhere the claim has been made that Oracle drivers changed from one API to another somewhat recently. Thus that could be the source.
    Or maybe something to do with hints.

  • Why is 8gb only showing total memory of less than 6.5?

    why is 8gb only showing total memory of less than 6.5?

    Because the difference is due to the operating system taking up most of the diference and the other is how GB is advertised and actually used.
    http://en.wikipedia.org/wiki/Gigabyte

Maybe you are looking for

  • 2 Probs

    Hi all, I wonder if you can help as I am experiencing 2 problems with my temporary 1.25 gHz Powerbook Aluminium. (os x Tiger 10.4.11) Basically I have been using Mail with no problems both on the machine and from my i-phone and suddenly my emails won

  • How to make indented text in Muse

    How to: make indented text in Muse, like a list with bullits

  • How to process an email with signature and attachments

    Hi, I need to process emails which have been signed with a pkcs7-signature (smime.p7s) and have one XML-attachment. Everything works fine if an eMail has no signature, but only the attachment. How do you get rid of the email-signature with XI? Any he

  • Keynote needs NOTES.

    I like to keep my slides very sparse, about 10 to 12 words, tops. I want the ability to add presenter's notes to the slides. Thanks.

  • Deleting Users on computer

    I was told a safety precaution was to delete my original account through users & groups. So I created a new  administrator user and erased my old one. There are currently two users aside from guest user because I accidently created two new ones. I no