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

_______________________________________________
Devel mailing list
Devel@lists.openser.org
http://lists.openser.org/cgi-bin/mailman/listinfo/devel

Reply via email to