Timer server

Kenneth Lundin kenneth@REDACTED
Fri Jan 17 15:12:33 CET 2003


Vlad Dumitrescu EAW wrote:
> Hi,
> 
> does anyone have had problems with the timer server, involving the timer_server process to grow larger and larger, until the whole VM crashes? It's in R7/R8.
> 
> We observed such a behaviour, and are puzzled. The memory consumption graph looks something like this:
>                    |
>            |---|   |
>            |   |   |
>   |----|   |   |---|
>   |    |---|
>   |
> --|
> 
>  The trouble is that we can't reproduce it in the lab, so if anyone could provide a clue, we'd be very thankful.
> 
> Best regards,
> Vlad

The timer_server (timer module) is in the process of beeing rewritten 
right now. The new implementation will use the timer BIFs (see the man 
page for the erlang module) as much as possible.
The current implementation is inefficient (use the timer BIFs if you 
can) especially if there are many timers at the same time.

There is a function which is non tail recursive which traverses the list 
of timers linearly each time a new timer is about to be inserted.
This might be an explanation to your observation.
Another thought is that there might be code in your system that inserts 
a huge amount of timers by mistake.

Regards Kenneth Lundin (Product Manager for OTP)





More information about the erlang-questions mailing list