[erlang-questions] inaccurate interval timer

Xiao Jia stfairy@REDACTED
Thu Nov 15 04:37:30 CET 2012


I think it's because Erlang is for *soft* realtime systems.

A hard realtime system guarantees that a certain action will *always*
be carried out in less than a certain time, while soft realtime
systems let you make the sort of guarantee that "a database lookup
takes less than 20ms in 97% of cases".

See: http://www.erlang.org/faq/academic.html#soft-realtime

Also I remember Ubuntu source repository always has a out-of-dated
version so you're using R14B04. Maybe you can give a try to R15B02 by
compiling from source. :-)

Cheers,
Xiao

On Thu, Nov 15, 2012 at 11:12 AM, Mark Geib <mark.geib.44@REDACTED> wrote:
> I am using timer:send_interval(..) to generate recurring messages that drive the sending of UDP packets at a given rate. However, using a network analyzer I am observing that the network datagrams are being sent at a rate greater than the intended rate. Log messages with timestamps indicate the erlang code is sending the datagrams at the proper time. So the question is whether the erlang VM could possibly have a clock that is "tic-ing" at a incorrect frequency, or this an issue with the underlying OS, linux in this case. The interval of the timer is set to 25ms, I am observing times of 23.7-24.5ms. Also, this is only happening on a single machine, testing on four other machines confirms proper rates are being generated.
>
> I am running ubuntu 12.04 fully updated with erlang R14B04.
>
> Thanks for any help or suggestions.
>
> Mark.
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list