[OpenSIPS-Users] memory management and drouting

Bogdan-Andrei Iancu bogdan at voice-system.ro
Thu Jun 11 09:43:47 CEST 2009


Hi Brett,

as discussed on the #opensips IRC channel, it is rather impossible to 
pre-determine the amount of memory that will be used by Drouting to 
cache the rules. Mainly because it highly depends  on the complexity of 
the rules (number of gws per rule, time definition), the length of the 
prefixes you have and most important, of the overlapping between the 
prefixes (prefixes sharing a longer sub-prefix will be stored more 
compact into mem, rather than prefixes with no common sub-prefix).

Looking at the measurements for ~400K of rules (see 
http://www.opensips.org/html/docs/modules/1.5.x/drouting.html#id227244), 
the required mem was of ~100M, so for 1M of rule, we can estimate 250M 
of mem only for DR...NOTE that during a reload you need double of mem 
(for old data and new data), so you need 500M....plus needed for the 
rest of the modules :)

Regards,
Bogdan

Brett Nemeroff wrote:
> All,
> Does anyone have any recommendations on memory management with 
> drouting? I have no idea how much memory I need for my route table 
> which is normally over 1 million rows.
>
> So I'm left to guess on numbers until opensips loads without 
> crashing.. But even then I don't know if I'll have enough memory to 
> perform a fifo dr_reload.
>
> So can anyone offer a suggestion as to how much memory is required ( a 
> formula maybe ) or perhaps can the module be smart enough to look at 
> my table, know how big it is, recommend a size based on that module's 
> needs alone that ALSO allows reloading of the table.
> Thanks!
> -Brett
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   




More information about the Users mailing list