[OpenSER-Devel] usrloc get_all_db_ucontacts frequency

Bogdan-Andrei Iancu bogdan at voice-system.ro
Tue Mar 25 13:07:33 CET 2008


Hi Juha,

This is more or less DB_ONLY mode specific - for the other modes, there 
are no DB penalties.

This has nothing to do with mem consumption - is about distributing the 
pings in time.

Adding a new param to control the usrloc interaction may complicate and 
confuse the users - at least this is MHO. But if there is a demand for 
such enhancement, you can open a feature request.

Regards,
Bogdan


Juha Heinanen wrote:
> Bogdan-Andrei Iancu writes:
>
>  > The get_all_db_ucontacts() you see every minute is actually because of 
>  > distributed NAT pinging :) - instead of taking all contacts once at 
>  > every n seconds, nathelper takes every seconds a subset of contacts (but 
>  > taking care to scan all contacts within n seconds).
>
> bogdan,
>
> thanks for your explanation.  i did some more debugging and nathalper is
> making usrloc query every second and asking each time 1/20th of the
> contacts, when natping_interval is set to 20:
>
> 080324 11:05:32       1 Query       select received, contact, socket, cflags, path from location where expires > '2008-03-24 11:05:32' and cflags & 2 = 2 and id % 20 = 1
> 080324 11:05:33       1 Query       select received, contact, socket, cflags, path from location where expires > '2008-03-24 11:05:33' and cflags & 2 = 2 and id % 20 = 2
> 080324 11:05:34       1 Query       select received, contact, socket, cflags, path from location where expires > '2008-03-24 11:05:34' and cflags & 2 = 2 and id % 20 = 3
>
> i guess it is tradeoff between memory consumption and db query
> frequency.  perhaps it would make sense to have one more module
> parameter that would tell db query interval.
>
> -- juha
>
>   




More information about the Devel mailing list