Dual-core systems - AMD - Windows Vista - NTP

This is a discussion on Dual-core systems - AMD - Windows Vista - NTP ; Folks, I'm still trying to resolve NTP on Windows Vista. I do have a dual-core system, so I was wondering how NTP handled dual-core. Does it discipline both cores, and is a special start-up switch required? Should I define the ...

+ Reply to Thread
Page 1 of 3 1 2 3 LastLast
Results 1 to 20 of 56

Thread: Dual-core systems - AMD - Windows Vista

  1. Dual-core systems - AMD - Windows Vista

    Folks,

    I'm still trying to resolve NTP on Windows Vista. I do have a dual-core
    system, so I was wondering how NTP handled dual-core. Does it discipline
    both cores, and is a special start-up switch required? Should I define
    the affinity for NTP to a single core?

    Looking at the AMD Web site, they do have a utility to sync the two
    cores - "AMD Dual-Core Optimizer" - under certain circumstances. I tried
    to install this on Vista, but a file appears to be missing! Has anyone
    got this working, and does it affect NTP?

    http://www.amd.com/us-en/Processors/..._13118,00.html

    I seem to be full of questions and not answers today!

    Thanks,
    David



  2. Re: Dual-core systems - AMD - Windows Vista

    David J Taylor wrote:
    > Folks,
    >
    > I'm still trying to resolve NTP on Windows Vista. I do have a dual-core
    > system, so I was wondering how NTP handled dual-core. Does it discipline
    > both cores, and is a special start-up switch required? Should I define
    > the affinity for NTP to a single core?
    >
    > Looking at the AMD Web site, they do have a utility to sync the two
    > cores - "AMD Dual-Core Optimizer" - under certain circumstances. I tried
    > to install this on Vista, but a file appears to be missing! Has anyone
    > got this working, and does it affect NTP?
    >
    > http://www.amd.com/us-en/Processors/..._13118,00.html
    >
    > I seem to be full of questions and not answers today!
    >
    > Thanks,
    > David
    >
    >


    I don't see why NTP should even be aware that it's running on a
    Dual-Core CPU. Why should it be any different from a box with, say,
    four CPUs?


  3. Re: Dual-core systems - AMD - Windows Vista

    Richard B. Gilbert wrote:
    > David J Taylor wrote:
    >> Folks,
    >>
    >> I'm still trying to resolve NTP on Windows Vista. I do have a
    >> dual-core system, so I was wondering how NTP handled dual-core. Does
    >> it
    >> discipline both cores, and is a special start-up switch required?
    >> Should I
    >> define the affinity for NTP to a single core?
    >>
    >> Looking at the AMD Web site, they do have a utility to sync the two
    >> cores - "AMD Dual-Core Optimizer" - under certain circumstances. I
    >> tried to install this on Vista, but a file appears to be missing! Has
    >> anyone got this working, and does it affect NTP?
    >>
    >>
    >> http://www.amd.com/us-en/Processors/..._13118,00.html
    >>
    >> I seem to be full of questions and not answers today!
    >>
    >> Thanks,
    >> David
    >>
    >>

    >
    > I don't see why NTP should even be aware that it's running on a
    > Dual-Core CPU. Why should it be any different from a box with, say,
    > four CPUs?


    NTP on Windows uses the RDTSC instruction. Which CPU does it read the
    time stamp counter from? If NTP is multi-threaded, different threads
    could be run on different CPUs with different TSCs. Yes, just the same
    issues arise with 4 CPUs, and I don't know how the Windows version of NTP
    handles the multi-processor scenario.

    Cheers,
    David



  4. Re: Dual-core systems - AMD - Windows Vista

    David J Taylor wrote:
    []
    > Looking at the AMD Web site, they do have a utility to sync the two
    > cores - "AMD Dual-Core Optimizer" - under certain circumstances. I
    > tried to install this on Vista, but a file appears to be missing!


    Fixed by using "Run as administrator".

    Cheers,
    David



  5. Re: Dual-core systems - AMD - Windows Vista

    David,

    The multiple-CPU nanokernel code that left here and is in the Alpha
    kernel assumes each CPU has an individual cycle counter and the timer
    interupts are vectored to a designated CPU. There is a data structure
    associated with each CPU that holds the measured current cycle counter
    scaling and offset, which is updated once each second by interprocessor
    interrrupt. A call to read the system clock lands on a j-random CPU,
    which reads the global time maintained by timer interrupts and
    interpolates according to the current CPU values.

    I don't know if Vista attempts to provide granularity within the tick;
    but if it does, I would expect it to use a similar strategy.

    Dave

    David J Taylor wrote:
    > Folks,
    >
    > I'm still trying to resolve NTP on Windows Vista. I do have a dual-core
    > system, so I was wondering how NTP handled dual-core. Does it discipline
    > both cores, and is a special start-up switch required? Should I define
    > the affinity for NTP to a single core?
    >
    > Looking at the AMD Web site, they do have a utility to sync the two
    > cores - "AMD Dual-Core Optimizer" - under certain circumstances. I tried
    > to install this on Vista, but a file appears to be missing! Has anyone
    > got this working, and does it affect NTP?
    >
    > http://www.amd.com/us-en/Processors/..._13118,00.html
    >
    > I seem to be full of questions and not answers today!
    >
    > Thanks,
    > David
    >
    >


  6. Re: Dual-core systems - AMD - Windows Vista

    David L. Mills wrote:
    > David,
    >
    > The multiple-CPU nanokernel code that left here and is in the Alpha
    > kernel assumes each CPU has an individual cycle counter and the timer
    > interupts are vectored to a designated CPU. There is a data structure
    > associated with each CPU that holds the measured current cycle counter
    > scaling and offset, which is updated once each second by
    > interprocessor interrrupt. A call to read the system clock lands on a
    > j-random CPU, which reads the global time maintained by timer
    > interrupts and interpolates according to the current CPU values.
    >
    > I don't know if Vista attempts to provide granularity within the tick;
    > but if it does, I would expect it to use a similar strategy.
    >
    > Dave


    Thanks for that, Dave. I haven't needed to touch assembler for a little
    wile now, so I'm not up to speed on whether the various Intel and AMD
    architectures (hyper-threading, dual/quad-core, and physical
    multi-processor etc.) provide access to every cycle counter from a single
    CPU or executing thread.

    The Windows implementation does try to provide granularity within the
    tick, but I have no idea how the Meinberg port I'm using handles
    multi-processors. Checking. I see the routine: nt_clockstuff.c mentions
    that how to handle multi-processors is not yet decided, but that seems
    very old code (year 2000). I can't find the RDTSC instruction anywhere in
    version ntp-4.2.4p4. So I'm a bit stuck right now!

    Cheers,
    David



  7. Re: Dual-core systems - AMD - Windows Vista

    David J Taylor wrote:

    > NTP on Windows uses the RDTSC instruction. Which CPU does it read the
    > time stamp counter from? If NTP is multi-threaded, different threads
    > could be run on different CPUs with different TSCs. Yes, just the same
    > issues arise with 4 CPUs, and I don't know how the Windows version of NTP
    > handles the multi-processor scenario.
    >


    How do you know that NTP on Windows uses the RDTSC instruction? The CPU
    on which the thread is running will be used to read the TSC. In the case
    of Windows NTP definitely *is* multithreaded. It needs to be to operate
    correctly. I cannot currently tell you how it interoperates with Windows
    with multiprocessors. That's a research topic and non-trivial at that.

    > Cheers,
    > David


  8. Re: Dual-core systems - AMD - Windows Vista

    Dave,

    While I would agree with you in general, we don't have any real idea
    what the Windows code is doing whether or not it is a uniprocessor or
    multiprocessor. I very much doubt that they duplicated your work though
    I would think that it's very important for the CPU's to keep each other
    in close synch in order for threading to work properly. I can say that
    at least with threading they have gotten it right and done a better job
    than almost every other O/S that I know. I doubt that they could do that
    if the CPU's were not properly synchronized.

    Danny

    David L. Mills wrote:
    > David,
    >
    > The multiple-CPU nanokernel code that left here and is in the Alpha
    > kernel assumes each CPU has an individual cycle counter and the timer
    > interupts are vectored to a designated CPU. There is a data structure
    > associated with each CPU that holds the measured current cycle counter
    > scaling and offset, which is updated once each second by interprocessor
    > interrrupt. A call to read the system clock lands on a j-random CPU,
    > which reads the global time maintained by timer interrupts and
    > interpolates according to the current CPU values.
    >
    > I don't know if Vista attempts to provide granularity within the tick;
    > but if it does, I would expect it to use a similar strategy.
    >
    > Dave


  9. Re: Dual-core systems - AMD - Windows Vista

    Danny Mayer wrote:
    > David J Taylor wrote:
    >
    >> NTP on Windows uses the RDTSC instruction. Which CPU does it read
    >> the time stamp counter from? If NTP is multi-threaded, different
    >> threads could be run on different CPUs with different TSCs. Yes,
    >> just the same issues arise with 4 CPUs, and I don't know how the
    >> Windows version of NTP handles the multi-processor scenario.
    >>

    >
    > How do you know that NTP on Windows uses the RDTSC instruction? The
    > CPU on which the thread is running will be used to read the TSC. In
    > the case of Windows NTP definitely *is* multithreaded. It needs to be
    > to operate correctly. I cannot currently tell you how it
    > interoperates with Windows with multiprocessors. That's a research
    > topic and non-trivial at that.


    Danny,

    Thanks for your reply. Perhaps my recollection is at fault here, but I
    recall that NTP on Windows uses some interpolation technique to overcome
    timer granularity, and that the interpolation used a CPU counter.

    Now I think further into the topic, I realise that with Windows XP NTP
    works perfectly witha dual-core AMD or Intel system (once the multi-media
    timers are enabled for the duration), but the problem appears to be on
    Windows Vista. So the question I should be asking is more: "How does
    Windows Vista differ from Windows XP so as to affect NTP, and is that
    anything to do with multi-processors or not?".

    The performance I'm seeing is definitely much poorer and, at times, it
    looks almost like NTP is switching between two different times. For
    example, look at yesterday around 10:00 UTC.

    http://www.david-taylor.myby.co.uk/mrtg/gemini_ntp.html

    I may try rebooting that PC with dual-core disabled and see what happens.

    Cheers,
    David



  10. Re: Dual-core systems - AMD - Windows Vista

    David J Taylor wrote:
    > Danny Mayer wrote:
    >
    >>David J Taylor wrote:
    >>
    >>
    >>>NTP on Windows uses the RDTSC instruction. Which CPU does it read
    >>>the time stamp counter from? If NTP is multi-threaded, different
    >>>threads could be run on different CPUs with different TSCs. Yes,
    >>>just the same issues arise with 4 CPUs, and I don't know how the
    >>>Windows version of NTP handles the multi-processor scenario.
    >>>

    >>
    >>How do you know that NTP on Windows uses the RDTSC instruction? The
    >>CPU on which the thread is running will be used to read the TSC. In
    >>the case of Windows NTP definitely *is* multithreaded. It needs to be
    >>to operate correctly. I cannot currently tell you how it
    >>interoperates with Windows with multiprocessors. That's a research
    >>topic and non-trivial at that.

    >
    >
    > Danny,
    >
    > Thanks for your reply. Perhaps my recollection is at fault here, but I
    > recall that NTP on Windows uses some interpolation technique to overcome
    > timer granularity, and that the interpolation used a CPU counter.
    >
    > Now I think further into the topic, I realise that with Windows XP NTP
    > works perfectly witha dual-core AMD or Intel system (once the multi-media
    > timers are enabled for the duration), but the problem appears to be on
    > Windows Vista. So the question I should be asking is more: "How does
    > Windows Vista differ from Windows XP so as to affect NTP, and is that
    > anything to do with multi-processors or not?".
    >
    > The performance I'm seeing is definitely much poorer and, at times, it
    > looks almost like NTP is switching between two different times. For
    > example, look at yesterday around 10:00 UTC.
    >
    > http://www.david-taylor.myby.co.uk/mrtg/gemini_ntp.html
    >
    > I may try rebooting that PC with dual-core disabled and see what happens.
    >
    > Cheers,
    > David
    >
    >


    Have you considered disabling Windows Vista?? ;-)

    Linux or Solaris X86 should do a far better job of keeping time than
    Windows.


  11. Re: Dual-core systems - AMD - Windows Vista

    Richard B. Gilbert wrote:
    []
    > Have you considered disabling Windows Vista?? ;-)
    >
    > Linux or Solaris X86 should do a far better job of keeping time than
    > Windows.


    Richard,

    You may well be right, but there are many people today who need Windows
    for the applications they wish to run, so alternative OSes are not an
    option. The PCs which they are buying today will, most likely, have
    Windows Vista as the version of Windows which is installed. My aim, as
    I'm sure you will appreciate, is to help folk get as good a timekeeping
    with Windows Vista as they can already enjoy with Windows XP and earlier,
    in keeping with the philosophy of NTP to be as widely deployed as
    possible.

    Cheers,
    David



  12. Re: Dual-core systems - AMD - Windows Vista

    On Dec 1, 8:58 am, "David J Taylor" bit.nor-this-bit.co.uk> wrote:
    > Richard B. Gilbert wrote:
    > > David J Taylor wrote:
    > >> Folks,

    >
    > >> I'm still trying to resolve NTP on Windows Vista. I do have a
    > >> dual-core system, so I was wondering how NTP handled dual-core. Does
    > >> it
    > >> discipline both cores, and is a special start-up switch required?
    > >> Should I
    > >> define the affinity for NTP to a single core?

    >
    > >> Looking at the AMD Web site, they do have a utility to sync the two
    > >> cores - "AMD Dual-Core Optimizer" - under certain circumstances. I
    > >> tried to install this on Vista, but a file appears to be missing! Has
    > >> anyone got this working, and does it affect NTP?

    >
    > >>http://www.amd.com/us-en/Processors/...0,,30_182_871_...

    >
    > >> I seem to be full of questions and not answers today!

    >
    > >> Thanks,
    > >> David

    >
    > > I don't see why NTP should even be aware that it's running on a
    > > Dual-Core CPU. Why should it be any different from a box with, say,
    > > four CPUs?

    >
    > NTP on Windows uses the RDTSC instruction. Which CPU does it read the
    > time stamp counter from? If NTP is multi-threaded, different threads
    > could be run on different CPUs with different TSCs. Yes, just the same
    > issues arise with 4 CPUs, and I don't know how the Windows version of NTP
    > handles the multi-processor scenario.
    >
    > Cheers,
    > David- Hide quoted text -
    >
    > - Show quoted text -


    You can use the START command to bind ntpd to specific processors
    (this is called processor affinity on Windows). I would try running:

    c:\>start /affinity 01 ntpd.exe

    If you get different or better behavior, then it is a multi-processor
    issue.

  13. Re: Dual-core systems - AMD - Windows Vista

    On Dec 1, 10:42 am, "David L. Mills" wrote:

    > The multiple-CPU nanokernel code that left here and is in the Alpha
    > kernel assumes each CPU has an individual cycle counter and the timer
    > interupts are vectored to a designated CPU. There is a data structure
    > associated with each CPU that holds the measured current cycle counter
    > scaling and offset, which is updated once each second by interprocessor
    > interrrupt. A call to read the system clock lands on a j-random CPU,
    > which reads the global time maintained by timer interrupts and
    > interpolates according to the current CPU values.


    Just curious, but is it aware that the CPU clock frequency may change
    on the fly and differently for each processor for power-management
    purposes? As a result, the rate of the count by RDTSC may vary. For
    example, all multi-core AMD Opteron processors, both Barcelona
    generation and the previous one.

    Thanks.

  14. Re: Dual-core systems - AMD - Windows Vista

    David J Taylor wrote:
    > Danny Mayer wrote:
    >> David J Taylor wrote:
    >>
    >>> NTP on Windows uses the RDTSC instruction. Which CPU does it read
    >>> the time stamp counter from? If NTP is multi-threaded, different
    >>> threads could be run on different CPUs with different TSCs. Yes,
    >>> just the same issues arise with 4 CPUs, and I don't know how the
    >>> Windows version of NTP handles the multi-processor scenario.
    >>>

    >> How do you know that NTP on Windows uses the RDTSC instruction? The
    >> CPU on which the thread is running will be used to read the TSC. In
    >> the case of Windows NTP definitely *is* multithreaded. It needs to be
    >> to operate correctly. I cannot currently tell you how it
    >> interoperates with Windows with multiprocessors. That's a research
    >> topic and non-trivial at that.

    >
    > Danny,
    >
    > Thanks for your reply. Perhaps my recollection is at fault here, but I
    > recall that NTP on Windows uses some interpolation technique to overcome
    > timer granularity, and that the interpolation used a CPU counter.


    We are intending to implement that but we haven't done so yet.

    > Now I think further into the topic, I realise that with Windows XP NTP
    > works perfectly witha dual-core AMD or Intel system (once the multi-media
    > timers are enabled for the duration), but the problem appears to be on
    > Windows Vista. So the question I should be asking is more: "How does
    > Windows Vista differ from Windows XP so as to affect NTP, and is that
    > anything to do with multi-processors or not?".
    >
    > The performance I'm seeing is definitely much poorer and, at times, it
    > looks almost like NTP is switching between two different times. For
    > example, look at yesterday around 10:00 UTC.
    >
    > http://www.david-taylor.myby.co.uk/mrtg/gemini_ntp.html
    >
    > I may try rebooting that PC with dual-core disabled and see what happens.
    >

    There are a couple of boot switches you can try and see if that makes a
    difference. I'm not really familiar with Vista and the switch might not
    help on Vista. You should also consider that it may be doing things in a
    different way which could cause additional interrupts so that the clock
    tick doesn't update in a regular fashion. The possibilities are endless.
    Time for a support call to Microsoft? I know you don't have 8 hours to
    remain on hold.

    There is one other thing that needs to be considered. This is a 64-bit
    system> In that case it's possible that the code may need to be changed
    to deal with it properly. For example using the VS 2005 compiler I have
    found that it uses a 64-bit integer instead of 32-bit integer for
    time_t. This could affect the quality of the results, it's hard to say.

    > Cheers,
    > David
    >
    >
    > _______________________________________________
    > questions mailing list
    > questions@lists.ntp.org
    > https://lists.ntp.org/mailman/listinfo/questions
    >


  15. Re: Dual-core systems - AMD - Windows Vista

    Danny Mayer wrote:
    > David J Taylor wrote:

    []
    >> Thanks for your reply. Perhaps my recollection is at fault here,
    >> but I recall that NTP on Windows uses some interpolation technique
    >> to overcome timer granularity, and that the interpolation used a CPU
    >> counter.

    >
    > We are intending to implement that but we haven't done so yet.


    Thanks for your reply, Danny. Ah, my mistake - I was sure it was already
    included!

    []
    > There are a couple of boot switches you can try and see if that makes
    > a difference. I'm not really familiar with Vista and the switch might
    > not help on Vista. You should also consider that it may be doing
    > things in a different way which could cause additional interrupts so
    > that the clock tick doesn't update in a regular fashion. The
    > possibilities are endless. Time for a support call to Microsoft? I
    > know you don't have 8 hours to remain on hold.


    I was trying to switch off one core in the BIOS but I don't seem to have
    that choice. The boot is rather different now, and no longer is there a
    boot.ini to edit. What documentation I can find mentions "number of
    processors" and not "number of cores". I'm unsure if this is significant
    or not.

    > There is one other thing that needs to be considered. This is a 64-bit
    > system> In that case it's possible that the code may need to be
    > changed to deal with it properly. For example using the VS 2005
    > compiler I have found that it uses a 64-bit integer instead of 32-bit
    > integer for time_t. This could affect the quality of the results,
    > it's hard to say.


    The version I'm testing is the 32-bit version of Vista, albeit on a 64-bit
    capable CPU. 64-bit can be a pain though for subtle errors, I appreciate.

    I didn't think that a 64-bit version of NTP was included in the Meinberg
    distribution. When I looked briefly at the Windows port in:
    ntp-4.2.4p4\ports\winnt\ntp.dsw I found that VS2005 needed to convert the
    format of some of the files - so it looked as if it might be for an older
    version of Visual Studio. I can't build NTP because the openssl
    definitions appear to be missing from the download, and I got this error
    as well:

    BSCMAKE: error BK1506 : cannot open file '.\debug\nt_clockstuff.sbr': No
    such file or directory



    Comments?



    Cheers,
    David



  16. Re: Dual-core systems - AMD - Windows Vista

    Guys,

    David J Taylor wrote:
    > The Windows implementation does try to provide granularity within the
    > tick, but I have no idea how the Meinberg port I'm using handles
    > multi-processors. Checking. I see the routine: nt_clockstuff.c mentions
    > that how to handle multi-processors is not yet decided, but that seems
    > very old code (year 2000). I can't find the RDTSC instruction anywhere in
    > version ntp-4.2.4p4. So I'm a bit stuck right now!


    I think a few notes are required here.

    The ntpd port for Windows does interpolate (or extrapolate?) between the
    timer ticks. This has been in the NTP code base for a long time and has
    _not_ been invented by Meinberg. And, just to recall, there is no "Meinberg
    port", there is just "precompiled by Meinberg" version which is based on
    the standard code.

    Timer tick interpolation is not based directly on RDTSC. It uses the Windows
    Performance Counter API (QueryPerformanceCounter/QueryPerformanceFrequency)
    to do so. Those API calls are implemented in the Hardware Abstraction Layer
    (HAL), so the exact way how it works depends on which of the different HALs
    shipped with the OS is actually installed.

    AFAIK recent versions of Windows come with a couple of HAL implementations,
    which can use different counters (HPET or whatever) to implement the
    Performance Counter. Earlier versions (e.g. WNT/W2K) came with only 2 HALs.
    One was installed on single processor systems and used the standard timer
    chip (1.9 MHz clock rate) to implement the performance counter. The other
    one was installed by default on SMP machines or machines with dual core CPU
    (which in fact is similar to SMP) and used the CPU TSC to implement the
    performance counter.

    While on legacy multiprocessor systems the CPU clocks (and thus the TSC) may
    differ for each CPU, I'm _assuming_ that multicore CPUs are clocked by the
    same source, so the TSCs should runs synchrounously.

    Finally, the Windows port of ntpd also calls a Windows API to set the thread
    affinty for the clock interpolation thread to the first CPU, so it should
    not be required to specify a certain CPU to run on, as proposed by Ryan.

    Martin
    --
    Martin Burnicki

    Meinberg Funkuhren
    Bad Pyrmont
    Germany

  17. Re: Dual-core systems - AMD - Windows Vista

    Martin Burnicki wrote:
    []
    > I think a few notes are required here.
    >
    > The ntpd port for Windows does interpolate (or extrapolate?) between
    > the timer ticks. This has been in the NTP code base for a long time
    > and has _not_ been invented by Meinberg. And, just to recall, there
    > is no "Meinberg port", there is just "precompiled by Meinberg"
    > version which is based on the standard code.


    I should have said "Meinberg package", and I did not say that you had
    invented the interpolation, but thanks for clarifying that point.

    > Timer tick interpolation is not based directly on RDTSC. It uses the
    > Windows Performance Counter API
    > (QueryPerformanceCounter/QueryPerformanceFrequency) to do so. Those
    > API calls are implemented in the Hardware Abstraction Layer (HAL), so
    > the exact way how it works depends on which of the different HALs
    > shipped with the OS is actually installed.


    I've found the calls in the source code. I alos use QueryPerformance in
    my own software and it's usually quite relaible.

    > AFAIK recent versions of Windows come with a couple of HAL
    > implementations, which can use different counters (HPET or whatever)
    > to implement the Performance Counter. Earlier versions (e.g. WNT/W2K)
    > came with only 2 HALs. One was installed on single processor systems
    > and used the standard timer chip (1.9 MHz clock rate) to implement
    > the performance counter. The other one was installed by default on
    > SMP machines or machines with dual core CPU (which in fact is similar
    > to SMP) and used the CPU TSC to implement the performance counter.
    >
    > While on legacy multiprocessor systems the CPU clocks (and thus the
    > TSC) may differ for each CPU, I'm _assuming_ that multicore CPUs are
    > clocked by the same source, so the TSCs should runs synchrounously.


    This assumption is probably wrong, as AMD (at least) have needed to issue
    a fix to synchronise the counters on the two cores (if I understand this
    correctly):

    http://www.amd.com/us-en/Processors/..._13118,00.html
    => AMD Dual-Core Optimizer

    There's an implication that the OS may do this providing you don't call
    RDTSC.

    > Finally, the Windows port of ntpd also calls a Windows API to set the
    > thread affinty for the clock interpolation thread to the first CPU,
    > so it should not be required to specify a certain CPU to run on, as
    > proposed by Ryan.
    >
    > Martin


    Thanks for that clarification, Martin. Host helpful. Looking at the
    ntpd.exe process with Windows Task Manager under Vista, right-click Set
    Affinity, shows both CPU0 and CPU1 as being checked. I can't see how to
    confirm this using SysInternals Process Explorer.

    I'd welcome any performance comparison with my own data, or insight as to
    why the same system performs so much more poorly under Vista than under
    XP.

    Cheers,
    David



  18. Re: Dual-core systems - AMD - Windows Vista

    Danny Mayer wrote:
    > David J Taylor wrote:
    >> Thanks for your reply. Perhaps my recollection is at fault here, but I
    >> recall that NTP on Windows uses some interpolation technique to overcome
    >> timer granularity, and that the interpolation used a CPU counter.

    >
    > We are intending to implement that but we haven't done so yet.


    Huh? Danny you should know the code is already there for many years ...

    >> Now I think further into the topic, I realise that with Windows XP NTP
    >> works perfectly witha dual-core AMD or Intel system (once the multi-media
    >> timers are enabled for the duration), but the problem appears to be on
    >> Windows Vista. So the question I should be asking is more: "How does
    >> Windows Vista differ from Windows XP so as to affect NTP, and is that
    >> anything to do with multi-processors or not?".
    >>
    >> The performance I'm seeing is definitely much poorer and, at times, it
    >> looks almost like NTP is switching between two different times. For
    >> example, look at yesterday around 10:00 UTC.


    As mentioned in my other post, this may depend on which HAL is currently
    used, i.e. which type of timer is being used to implement the performance
    counter, and whether the timer clock frequency is constant, or not. I did
    not yet have more time to play around with this.

    >> http://www.david-taylor.myby.co.uk/mrtg/gemini_ntp.html
    >>
    >> I may try rebooting that PC with dual-core disabled and see what happens.
    >>

    > There are a couple of boot switches you can try and see if that makes a
    > difference. I'm not really familiar with Vista and the switch might not
    > help on Vista. You should also consider that it may be doing things in a
    > different way which could cause additional interrupts so that the clock
    > tick doesn't update in a regular fashion. The possibilities are endless.
    > Time for a support call to Microsoft? I know you don't have 8 hours to
    > remain on hold.
    >
    > There is one other thing that needs to be considered. This is a 64-bit
    > system> In that case it's possible that the code may need to be changed
    > to deal with it properly. For example using the VS 2005 compiler I have
    > found that it uses a 64-bit integer instead of 32-bit integer for
    > time_t. This could affect the quality of the results, it's hard to say.


    Shouldn't this only matter when the 32 bit time_t overflows?

    Martin
    --
    Martin Burnicki

    Meinberg Funkuhren
    Bad Pyrmont
    Germany

  19. Re: Dual-core systems - AMD - Windows Vista

    David J Taylor wrote:
    >> There is one other thing that needs to be considered. This is a 64-bit
    >> system> In that case it's possible that the code may need to be
    >> changed to deal with it properly. For example using the VS 2005
    >> compiler I have found that it uses a 64-bit integer instead of 32-bit
    >> integer for time_t. This could affect the quality of the results,
    >> it's hard to say.

    >
    > The version I'm testing is the 32-bit version of Vista, albeit on a 64-bit
    > capable CPU. 64-bit can be a pain though for subtle errors, I appreciate.
    >


    That's a problem. There are even more subtle issues when you run a
    32-bit O/S on a 64-bit system. I don't think we can even try to support
    that since there are likely to be too many unknowns. It's a very nasty mix.

    > I didn't think that a 64-bit version of NTP was included in the Meinberg
    > distribution. When I looked briefly at the Windows port in:
    > ntp-4.2.4p4\ports\winnt\ntp.dsw I found that VS2005 needed to convert the
    > format of some of the files - so it looked as if it might be for an older
    > version of Visual Studio. I can't build NTP because the openssl
    > definitions appear to be missing from the download, and I got this error
    > as well:
    >


    With VS 2005, just open the dsw file and tell it to convert all the
    project files. I recently add the necessary macros to the dsp files so
    that I don't have to add a bunch of macros every time I pull in a new
    tarball. I'm only building on VS 2005 these days. Building on VS 6 I
    reserve for releasing builds.

    We don't ship the OpenSSL sources due to possible export regulations.
    You can download that yourself from the openssl.org site. Just follow
    the build instructions for Windows. I use the nt suboption.

    > BSCMAKE: error BK1506 : cannot open file '.\debug\nt_clockstuff.sbr': No
    > such file or directory
    >

    hard to say why but it obviously was not compiled.

    Danny

    >
    >
    > Comments?


  20. Re: Dual-core systems - AMD - Windows Vista

    Martin Burnicki wrote:
    > Guys,
    >
    > David J Taylor wrote:
    >> The Windows implementation does try to provide granularity within the
    >> tick, but I have no idea how the Meinberg port I'm using handles
    >> multi-processors. Checking. I see the routine: nt_clockstuff.c mentions
    >> that how to handle multi-processors is not yet decided, but that seems
    >> very old code (year 2000). I can't find the RDTSC instruction anywhere in
    >> version ntp-4.2.4p4. So I'm a bit stuck right now!

    >
    > I think a few notes are required here.
    >
    > The ntpd port for Windows does interpolate (or extrapolate?) between the
    > timer ticks. This has been in the NTP code base for a long time and has
    > _not_ been invented by Meinberg.


    Right. However Pete Rosin (Eckberg) and Terje Mathisen back in May had
    come up with a scheme to provide additional code to improve the
    interpolation. That is what is not yet in the code.

    > While on legacy multiprocessor systems the CPU clocks (and thus the TSC) may
    > differ for each CPU, I'm _assuming_ that multicore CPUs are clocked by the
    > same source, so the TSCs should runs synchrounously.


    Perhaps we need definition of the difference between multi-CPU and
    multi-core how that effects the clock, TSC, etc. because that's not
    entirely clear to me.

    Danny

+ Reply to Thread
Page 1 of 3 1 2 3 LastLast