Re: strange CPU speedups with SMP on Athlon 64 X2

From: Willy Tarreau (willy_at_w.ods.org)
Date: 08/31/05

  • Next message: Fernando Lopez-Lezcano: "Re: jack, PREEMPT_DESKTOP, delayed interrupts?"
    Date:	Wed, 31 Aug 2005 06:51:31 +0200
    To: Nathan Becker <nbecker@physics.ucsb.edu>
    
    

    Hi,

    stupid question : isn't it possible that your motherboard does some sort of
    overclocking when it detects high cpu usage (bus activity, etc...) ? It
    should not be easy to check (rdtsc every second ?), but you might want to
    explore such a possibility.

    Regards,
    willy

    On Tue, Aug 30, 2005 at 12:16:04PM -0700, Nathan Becker wrote:
    > Hi,
    >
    > I'm having a strange problem when I benchmark some of my physics
    > simulation code on my new Athlon 64 X2 4800 machine. It occurs on all
    > current kernels that I have tested including 2.6.12.5 and 2.6.13.
    >
    > If I run my benchmark single threaded, so that one of the two CPU cores
    > is just idling then the calculation goes pretty fast. But if I load both
    > CPU cores simultaneously but with INDEPENDENT calculations, then each
    > calculation runs about 12-15% faster than when running alone. I have
    > found this to be always reproducible. There is no disk access involved
    > in the calculation and RAM usage is fairly minimal so this is not caused
    > by caching. Also, if I compile the kernel to disable SMP then the machine
    > runs a single calculation at the same speed as when running alone when
    > SMP is enabled.
    >
    > I am aware of the timing issues on these machines (especially since I
    > reported the bug http://bugzilla.kernel.org/show_bug.cgi?id=5105 ).
    > However, I double-checked my benchmark with a stop-watch, so this is
    > independent of something strange happening in the timer.
    >
    > I also checked the cpufreq governor and according to the logs, my CPU is
    > holding steady at the maximum setting of 2.4GHz. I set the governor to
    > "performance" mode which should prevent unintended downclocking.
    >
    > I would be happy to post my exact C source that I use to do the
    > benchmark, but I wanted to get some feedback first in case I'm just doing
    > something stupid. Also, since I'm not subscribed to this list, please cc
    > me directly regarding this topic.
    >
    > Thanks very much,
    >
    > Nathan
    > -
    > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    > the body of a message to majordomo@vger.kernel.org
    > More majordomo info at http://vger.kernel.org/majordomo-info.html
    > Please read the FAQ at http://www.tux.org/lkml/
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Fernando Lopez-Lezcano: "Re: jack, PREEMPT_DESKTOP, delayed interrupts?"

    Relevant Pages

    • [patch -mm] scheduler cache hot autodetect, isolcpus fix
      ... > For a cpu-exclusive cpuset cpu, ... > The expense of the migration_costcalculation can be sizeable. ... > reflect true migration costs. ...
      (Linux-Kernel)
    • Re: merits of Lisp vs Python
      ... calculations a CPU can do per time unit could be a way to do that. ... So you already know his calculation. ... If it was a single cpu then super computers were ca. 1000 times faster. ... Lisp compilers will generate better and better code. ...
      (comp.lang.lisp)
    • Re: [PATCH] -mm tree: broken "dynamic sched domains" and "migration cost"
      ... > this is that an exhaustive NxN calculation will be very slow for ... Perhaps we could provide an ARCH specific routine that would map any ... and a smaller maximum value of the largest cpu number returned. ... pair to its canonical pair, and if not already done, compute its ...
      (Linux-Kernel)
    • Re: Pi to 10 trillion places
      ... If I run the calculation on new hardware to 2 trillion ... than doing it a million times, and tells you nothing about 90% of your CPU. ... It would be like testing a new car design by driving it in reverse for 2,000 ...
      (sci.math)
    • Re: CPU Spiking every 9 Seconds
      ... For further information about Process Explorer see here: ... image name producing the high CPU usage, right click, ... service in turn and then restore it noting what effect it has on CPU ... When you click on the Dependencies tab allow ...
      (microsoft.public.windowsxp.perform_maintain)