Re: Keeping a VERY accurate time (within a millisecond) - Networking

This is a discussion on Re: Keeping a VERY accurate time (within a millisecond) - Networking ; On 09/06/08 10:03 am, Ignoramus10032 wrote: > I want my ubuntu servers to keep a VERY accurate time. That is, I want > to have a clock accurate to less than a millisecond. > > There is a business reason ...

+ Reply to Thread
Results 1 to 11 of 11

Thread: Re: Keeping a VERY accurate time (within a millisecond)

  1. Re: Keeping a VERY accurate time (within a millisecond)

    On 09/06/08 10:03 am, Ignoramus10032 wrote:
    > I want my ubuntu servers to keep a VERY accurate time. That is, I want
    > to have a clock accurate to less than a millisecond.
    >
    > There is a business reason for it.
    >
    > NTP, when it works, lets me keep a time accurate to a few
    > milliseconds, which is great, but I would like to do better than that.
    >

    What are your application requirements? Do you just need a highly
    accurate time reference, or do you need the system to respond to
    sub-millisecond events in sub-millisecond timeliness?
    Linux is not a realtime system. Thread priorities can keep one thread
    from responding to an event for 100s of milliseconds. Even acquiring a
    timestamp would be fairly meaningless given the time variance in how the
    timestamp is returned.

    --
    jmm (hyphen) list (at) sohnen-moe (dot) com
    (Remove .AXSPAMGN for email)

  2. Re: Keeping a VERY accurate time (within a millisecond)

    On 2008-09-07, Jim Moe wrote:
    > On 09/06/08 10:03 am, Ignoramus10032 wrote:
    >> I want my ubuntu servers to keep a VERY accurate time. That is, I want
    >> to have a clock accurate to less than a millisecond.
    >>
    >> There is a business reason for it.
    >>
    >> NTP, when it works, lets me keep a time accurate to a few
    >> milliseconds, which is great, but I would like to do better than that.
    >>

    > What are your application requirements? Do you just need a highly
    > accurate time reference, or do you need the system to respond to
    > sub-millisecond events in sub-millisecond timeliness?


    Just to have accurate timestamps.

    > Linux is not a realtime system. Thread priorities can keep one thread
    > from responding to an event for 100s of milliseconds. Even acquiring a
    > timestamp would be fairly meaningless given the time variance in how the
    > timestamp is returned.


    This is a big topic. I do not feel up to starting it. But suffice it
    to say that response times improve greatly when nothing is swapped out
    and there are more CPUs than the amount of stuff to compute.
    --
    Due to extreme spam originating from Google Groups, and their inattention
    to spammers, I and many others block all articles originating
    from Google Groups. If you want your postings to be seen by
    more readers you will need to find a different means of
    posting on Usenet.
    http://improve-usenet.org/

  3. Re: Keeping a VERY accurate time (within a millisecond)

    Ignoramus19762 wrote:
    > On 2008-09-07, Jim Moe wrote:


    >> What are your application requirements? Do you just need a highly
    >> accurate time reference, or do you need the system to respond to
    >> sub-millisecond events in sub-millisecond timeliness?

    >
    > Just to have accurate timestamps.
    >

    I thought about this back when I was running sendmail open to the Internet
    so people could send to me directly. I did get a lot of spam and I thought
    it would help when getting in touch with other users of sendmail to have
    accurate time so they could find things in their logs by knowing when they
    sent stuff to me (if they did at all).

    In the maillog, the timestamps are only to the nearest second, so it seemed
    to me that if my clock were accurate to 1/2 second or so, that would be
    enough. That is when I stopped running rdate once a day and started using
    ntp. But I have made no effort to be more exact than that.

    Similarly, my iptables firewall logs only to the nearest second.

    You have not said just why you would need more accurate timestamps.

    --
    .~. Jean-David Beyer Registered Linux User 85642.
    /V\ PGP-Key: 9A2FC99A Registered Machine 241939.
    /( )\ Shrewsbury, New Jersey http://counter.li.org
    ^^-^^ 07:35:01 up 32 days, 13:41, 4 users, load average: 4.26, 4.15, 4.08

  4. Re: Keeping a VERY accurate time (within a millisecond)

    On 2008-09-08, Jean-David Beyer wrote:
    > Ignoramus19762 wrote:
    >> On 2008-09-07, Jim Moe wrote:

    >
    >>> What are your application requirements? Do you just need a highly
    >>> accurate time reference, or do you need the system to respond to
    >>> sub-millisecond events in sub-millisecond timeliness?

    >>
    >> Just to have accurate timestamps.
    >>

    > I thought about this back when I was running sendmail open to the Internet
    > so people could send to me directly. I did get a lot of spam and I thought
    > it would help when getting in touch with other users of sendmail to have
    > accurate time so they could find things in their logs by knowing when they
    > sent stuff to me (if they did at all).
    >
    > In the maillog, the timestamps are only to the nearest second, so it seemed
    > to me that if my clock were accurate to 1/2 second or so, that would be
    > enough. That is when I stopped running rdate once a day and started using
    > ntp. But I have made no effort to be more exact than that.
    >
    > Similarly, my iptables firewall logs only to the nearest second.
    >
    > You have not said just why you would need more accurate timestamps.
    >


    I can only say "business reason".
    --
    Due to extreme spam originating from Google Groups, and their inattention
    to spammers, I and many others block all articles originating
    from Google Groups. If you want your postings to be seen by
    more readers you will need to find a different means of
    posting on Usenet.
    http://improve-usenet.org/

  5. Re: Keeping a VERY accurate time (within a millisecond)

    Ignoramus15569 wrote:
    > On 2008-09-08, Jean-David Beyer wrote:
    >> Ignoramus19762 wrote:
    >>> On 2008-09-07, Jim Moe wrote:
    >>>> What are your application requirements? Do you just need a highly
    >>>> accurate time reference, or do you need the system to respond to
    >>>> sub-millisecond events in sub-millisecond timeliness?
    >>> Just to have accurate timestamps.
    >>>

    >> I thought about this back when I was running sendmail open to the Internet
    >> so people could send to me directly. I did get a lot of spam and I thought
    >> it would help when getting in touch with other users of sendmail to have
    >> accurate time so they could find things in their logs by knowing when they
    >> sent stuff to me (if they did at all).
    >>
    >> In the maillog, the timestamps are only to the nearest second, so it seemed
    >> to me that if my clock were accurate to 1/2 second or so, that would be
    >> enough. That is when I stopped running rdate once a day and started using
    >> ntp. But I have made no effort to be more exact than that.
    >>
    >> Similarly, my iptables firewall logs only to the nearest second.
    >>
    >> You have not said just why you would need more accurate timestamps.
    >>

    >
    > I can only say "business reason".


    I am not asking you to divulge the business reason.
    It just seems to me to be an unusual need.

    --
    .~. Jean-David Beyer Registered Linux User 85642.
    /V\ PGP-Key: 9A2FC99A Registered Machine 241939.
    /( )\ Shrewsbury, New Jersey http://counter.li.org
    ^^-^^ 09:35:01 up 32 days, 15:41, 4 users, load average: 4.72, 4.48, 4.38

  6. Re: Keeping a VERY accurate time (within a millisecond)

    On 2008-09-08, Jean-David Beyer wrote:
    > Ignoramus15569 wrote:
    >> On 2008-09-08, Jean-David Beyer wrote:
    >>> Ignoramus19762 wrote:
    >>>> On 2008-09-07, Jim Moe wrote:
    >>>>> What are your application requirements? Do you just need a highly
    >>>>> accurate time reference, or do you need the system to respond to
    >>>>> sub-millisecond events in sub-millisecond timeliness?
    >>>> Just to have accurate timestamps.
    >>>>
    >>> I thought about this back when I was running sendmail open to the Internet
    >>> so people could send to me directly. I did get a lot of spam and I thought
    >>> it would help when getting in touch with other users of sendmail to have
    >>> accurate time so they could find things in their logs by knowing when they
    >>> sent stuff to me (if they did at all).
    >>>
    >>> In the maillog, the timestamps are only to the nearest second, so it seemed
    >>> to me that if my clock were accurate to 1/2 second or so, that would be
    >>> enough. That is when I stopped running rdate once a day and started using
    >>> ntp. But I have made no effort to be more exact than that.
    >>>
    >>> Similarly, my iptables firewall logs only to the nearest second.
    >>>
    >>> You have not said just why you would need more accurate timestamps.
    >>>

    >>
    >> I can only say "business reason".

    >
    > I am not asking you to divulge the business reason.
    > It just seems to me to be an unusual need.
    >


    I agree that it is unusual. I can only say that it is related to finance

    --
    Due to extreme spam originating from Google Groups, and their inattention
    to spammers, I and many others block all articles originating
    from Google Groups. If you want your postings to be seen by
    more readers you will need to find a different means of
    posting on Usenet.
    http://improve-usenet.org/

  7. Re: Keeping a VERY accurate time (within a millisecond)

    Jean-David Beyer writes:

    >Ignoramus19762 wrote:
    >> On 2008-09-07, Jim Moe wrote:


    >>> What are your application requirements? Do you just need a highly
    >>> accurate time reference, or do you need the system to respond to
    >>> sub-millisecond events in sub-millisecond timeliness?

    >>
    >> Just to have accurate timestamps.
    >>

    >I thought about this back when I was running sendmail open to the Internet
    >so people could send to me directly. I did get a lot of spam and I thought
    >it would help when getting in touch with other users of sendmail to have
    >accurate time so they could find things in their logs by knowing when they
    >sent stuff to me (if they did at all).


    >In the maillog, the timestamps are only to the nearest second, so it seemed
    >to me that if my clock were accurate to 1/2 second or so, that would be
    >enough. That is when I stopped running rdate once a day and started using
    >ntp. But I have made no effort to be more exact than that.


    >Similarly, my iptables firewall logs only to the nearest second.


    >You have not said just why you would need more accurate timestamps.


    Why not, when it is so easy.


  8. Re: Keeping a VERY accurate time (within a millisecond)

    Ignoramus15569 wrote:
    > On 2008-09-08, Jean-David Beyer wrote:
    >> Ignoramus15569 wrote:
    >>> On 2008-09-08, Jean-David Beyer wrote:
    >>>> Ignoramus19762 wrote:
    >>>>> On 2008-09-07, Jim Moe wrote:
    >>>>>> What are your application requirements? Do you just need a highly
    >>>>>> accurate time reference, or do you need the system to respond to
    >>>>>> sub-millisecond events in sub-millisecond timeliness?
    >>>>> Just to have accurate timestamps.
    >>>>>
    >>>> I thought about this back when I was running sendmail open to the Internet
    >>>> so people could send to me directly. I did get a lot of spam and I thought
    >>>> it would help when getting in touch with other users of sendmail to have
    >>>> accurate time so they could find things in their logs by knowing when they
    >>>> sent stuff to me (if they did at all).
    >>>>
    >>>> In the maillog, the timestamps are only to the nearest second, so it seemed
    >>>> to me that if my clock were accurate to 1/2 second or so, that would be
    >>>> enough. That is when I stopped running rdate once a day and started using
    >>>> ntp. But I have made no effort to be more exact than that.
    >>>>
    >>>> Similarly, my iptables firewall logs only to the nearest second.
    >>>>
    >>>> You have not said just why you would need more accurate timestamps.
    >>>>
    >>> I can only say "business reason".

    >> I am not asking you to divulge the business reason.
    >> It just seems to me to be an unusual need.
    >>

    >
    > I agree that it is unusual. I can only say that it is related to finance
    >

    like who bids first or something on an auction..

  9. Re: Keeping a VERY accurate time (within a millisecond)



    "Jean-David Beyer" wrote in message
    newsV9xk.708$Dj1.148@trnddc02...
    > Ignoramus15569 wrote:


    >> I can only say "business reason".

    >
    > I am not asking you to divulge the business reason.
    > It just seems to me to be an unusual need.


    I had to design a clock system for the billing records for telephone
    exchanges once, they have to be kept very accurate. I expect its something
    similar.


  10. Re: Keeping a VERY accurate time (within a millisecond)

    On 09/07/08 08:25 pm, Ignoramus19762 wrote:
    >
    >> Linux is not a realtime system. Thread priorities can keep one thread
    >> from responding to an event for 100s of milliseconds. Even acquiring a
    >> timestamp would be fairly meaningless given the time variance in how the
    >> timestamp is returned.

    >
    > This is a big topic. I do not feel up to starting it. But suffice it
    > to say that response times improve greatly when nothing is swapped out
    > and there are more CPUs than the amount of stuff to compute.


    How likely is that condition going to exist as the application ramps up?
    Regardless of how accurate the clock is, acquiring a timely timestamp is
    your real need. Linux cannot do that for you.
    Are there other servers that host the application? Do they require
    sub-millisecond synchronization with each other?
    It would seem you need a subsystem that handles whatever those events
    are that require such precise timing, that will respond quickly enough,
    and buffer one or more events and timestamps together for later collection.

    --
    jmm (hyphen) list (at) sohnen-moe (dot) com
    (Remove .AXSPAMGN for email)

  11. Re: Keeping a VERY accurate time (within a millisecond)

    > > This is a big topic. I do not feel up to starting it. But suffice
    > > it to say that response times improve greatly when nothing is
    > > swapped out and there are more CPUs than the amount of stuff to
    > > compute.


    > How likely is that condition going to exist as the application
    > ramps up?


    That probably depends on the conditions at Layer 8 oif the 9 layer model:

    https://secure.isc.org/index.pl?/store/t-shirt/

    WRT timestapms and linux and such. keep in mind that most (all?) NICs
    these days (gig and above) have _some_ sort of interrupt coalescing
    mechanism in place that unless you disable will result in traffic
    getting "batched" and quite possibly delayed for a non-trivial length
    of time (at least on the order of milliseconds) Whether or not that
    matters for this particular application I have no idea and may depend
    on condtions at Layer 9 of the aforementioned 9 Layer model. Still, I
    thought I would mention it despite the potential for drift.

    --
    denial, anger, bargaining, depression, acceptance, rebirth...
    where do you want to be today?
    these opinions are mine, all mine; HP might not want them anyway...
    feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...

+ Reply to Thread