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 ...

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.

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/

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.

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/

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.

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/

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.

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..

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.

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.

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:

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...