Re: [OpenSIPS-Users] FW: problem with hep tracing.
Hi Johan, Whats your opensips capturer server config looks like ? Are you using the default opensips config pack with homer installation ? On Friday, 28 September 2018, 1:41:58 AM GMT+5:30, johan de clercq wrote: Hi, Using opensips 2.4, I try to send all the sip messages to a homer server (5.0.5). I made the opensips config like this: HEP loadmodule "proto_hep.so" modparam("proto_hep", "hep_id","[hep_dst]192.168.0.3:9060; version=2") ### activate homer5 CSV like format for the payload modparam("proto_hep", "homer5_on", 1) ### set the delimiter for the payload modparam("proto_hep", "homer5_delim", "##") SIPtrace loadmodule "siptrace.so" modparam("siptrace", "trace_id", "[hep_id]uri=hep:hep_dst") … Route { … if (is_method("REGISTER")) { sip_trace("hep_id","t","sip"); if (!www_authorize("", "subscriber")) { www_challenge("", "0"); exit; } if (!save("location")){ sl_reply_error(); exit; } exit; } … ##initial INVITE if (is_method("INVITE") && !has_totag()) { xlog("callid=$ci: Route[0]: initial INVITE is coming in from A: $fU to B: $rU"); xlog("callid=$ci: Route[0]: let's do accounting first"); do_accounting("db","cdr"); sip_trace("hep_id","d","sip"); … } Opensips sends the packets correctly, see attached file. Unfortunately, homer keeps complaining …. Sep 27 18:29:49 ns3019374 homer[22750]: ERROR: [core/lvalue.c:346]: lval_pvar_assign(): non existing right pvar Sep 27 18:29:49 ns3019374 homer[22750]: ERROR: [core/lvalue.c:404]: lval_assign(): assignment failed at pos: (1049,30-1049,40) Sep 27 18:29:49 ns3019374 homer[22750]: ERROR:
Re: [OpenSIPS-Users] opensips will not start while loading huge blacklist
Hi Jon, Thanks, I'll check it out with memcached and Redis both. Current disturbance is opensips restart due to localcache loading from mysql. Once loaded, it works like a charm. Any idea about *-m* and *-M* vales? How much RAM was allocated to the box? Opensips performed better when I increased shared and package memory. I want to avoid overkill of resources. -- regards, abdul basit On Sun, 30 Sep 2018 at 20:00, Jon Abrams wrote: > On the high CPS box its an old OpenSIPs 1.9 instance running 64 children > IIRC on a pair of old 6 core Westmere Core Xeons. On a 2.2 box the code > looks sort of like this: > > # memcached config > modparam("cachedb_memcached", "cachedb_url", "memcached:blacklist:// > 127.0.0.1:11211/") > > > # in the main route block > if (cache_fetch("memcached: blacklist ", "$avp(key)", $avp(value))) > { >#reject the call or something > } > > The only other possible downside to memcached is the lack of longest > prefix match, which you may not need. You also need to build the Memcached. > > I don't have any OpenSIPs Redis code samples handy, as I think I've only > used it with that other open source SIP server. > > Since the data is not being loaded into OpenSIPs memory, startup times are > considerably faster. With memcached you need to remember or script it to > reload the blacklist into memory on reboot or restart of memcached. > > With Redis you can persist it, although make sure check the performance > hit when you turn on persistence. AOF isn't bad, especially with a SSD > disk. The background save can add a bunch of latency when it kicks off. > If its a lot of data, I usually do a BGSAVE once a day during off-peak > times with a cron job. But I don't think 20-30 million entries will cause > much disturbance. > > - Jon > > On Sun, Sep 30, 2018 at 9:13 AM Abdul Basit wrote: > >> Hi Jon, >> >> Good to know. >> If possible, can you share the settings you have for opensips? >> Whats the server hardware specification? >> Whats opensips service startup time? >> >> -- >> regards, >> >> abdul basit >> >> On Sun, 30 Sep 2018 at 05:17, Jon Abrams wrote: >> >>> I have used memached to store 20-30 million entry blacklists while >>> maintaining 6000-9000 responses per second on a dipping server. The >>> downside is its not persistent. >>> >>> I've used redis as well to store the whole North American LNP database >>> in memory, but I've only tried pushing it to a couple thousand CPS so far. >>> I would imagine it would perform at least as well as the memcached if >>> needed. >>> >>> I wouldn't worry about the speed difference between local cache speed >>> and using Redis/Memcached over a socket in a normal deployment scenario. >>> >>> - Jon >>> >>> On Sat, Sep 29, 2018 at 6:17 PM Abdul Basit >>> wrote: >>> Hi team, I am thinking to do horizontal scaling through dispatcher module and sharding the blacklist to 2 or 3 opensips nodes local cache. or using redis for blacklist repository but local cache is even more quick. Any comments or experience to share about the problem I am facing currently? -- regards, abdul basit On Fri, 28 Sep 2018 at 06:10, Abdul Basit wrote: > Hi team, > > I have a opensips 2.4 deployed having 4 children and with mysql > configured for loading user blacklist to opensips local cache on opensips > startup. > Opensips work fine on filtering the call based on user blacklist > records loaded into local cache. > > While blacklist was growing upto 1.3m records, opensips startup was > taking ~60 sec on VM of 16GB RAM and 6 CPU. > I increased shared memory to *6144* and package memory to *256.* > Filter works fine here yet. Call load is not that much only blacklist > entries are growing. > > But now blacklist has grown to very huge number, up to 10m records in > mysql. Opensips is not starting successfully and service startup requests > timeout after huge CPU spikes while trying to populate local cache from > mysql. > I increased shared memory to *12288* and package memory to *1024* but > no success yet. > > I indexed mysql blacklist table but no luck. > > Please advise what settings I should add to opensips for successful > startup. > > -- > regards, > > abdul basit > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>> ___ >>> Users mailing list >>> Users@lists.opensips.org >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>> >> ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] opensips will not start while loading huge blacklist
On the high CPS box its an old OpenSIPs 1.9 instance running 64 children IIRC on a pair of old 6 core Westmere Core Xeons. On a 2.2 box the code looks sort of like this: # memcached config modparam("cachedb_memcached", "cachedb_url", "memcached:blacklist:// 127.0.0.1:11211/") # in the main route block if (cache_fetch("memcached: blacklist ", "$avp(key)", $avp(value))) { #reject the call or something } The only other possible downside to memcached is the lack of longest prefix match, which you may not need. You also need to build the Memcached. I don't have any OpenSIPs Redis code samples handy, as I think I've only used it with that other open source SIP server. Since the data is not being loaded into OpenSIPs memory, startup times are considerably faster. With memcached you need to remember or script it to reload the blacklist into memory on reboot or restart of memcached. With Redis you can persist it, although make sure check the performance hit when you turn on persistence. AOF isn't bad, especially with a SSD disk. The background save can add a bunch of latency when it kicks off. If its a lot of data, I usually do a BGSAVE once a day during off-peak times with a cron job. But I don't think 20-30 million entries will cause much disturbance. - Jon On Sun, Sep 30, 2018 at 9:13 AM Abdul Basit wrote: > Hi Jon, > > Good to know. > If possible, can you share the settings you have for opensips? > Whats the server hardware specification? > Whats opensips service startup time? > > -- > regards, > > abdul basit > > On Sun, 30 Sep 2018 at 05:17, Jon Abrams wrote: > >> I have used memached to store 20-30 million entry blacklists while >> maintaining 6000-9000 responses per second on a dipping server. The >> downside is its not persistent. >> >> I've used redis as well to store the whole North American LNP database in >> memory, but I've only tried pushing it to a couple thousand CPS so far. I >> would imagine it would perform at least as well as the memcached if needed. >> >> I wouldn't worry about the speed difference between local cache speed and >> using Redis/Memcached over a socket in a normal deployment scenario. >> >> - Jon >> >> On Sat, Sep 29, 2018 at 6:17 PM Abdul Basit wrote: >> >>> Hi team, >>> >>> I am thinking to do horizontal scaling through dispatcher module and >>> sharding the blacklist to 2 or 3 opensips nodes local cache. >>> or using redis for blacklist repository but local cache is even more >>> quick. >>> >>> Any comments or experience to share about the problem I am facing >>> currently? >>> >>> -- >>> regards, >>> >>> abdul basit >>> >>> >>> On Fri, 28 Sep 2018 at 06:10, Abdul Basit wrote: >>> Hi team, I have a opensips 2.4 deployed having 4 children and with mysql configured for loading user blacklist to opensips local cache on opensips startup. Opensips work fine on filtering the call based on user blacklist records loaded into local cache. While blacklist was growing upto 1.3m records, opensips startup was taking ~60 sec on VM of 16GB RAM and 6 CPU. I increased shared memory to *6144* and package memory to *256.* Filter works fine here yet. Call load is not that much only blacklist entries are growing. But now blacklist has grown to very huge number, up to 10m records in mysql. Opensips is not starting successfully and service startup requests timeout after huge CPU spikes while trying to populate local cache from mysql. I increased shared memory to *12288* and package memory to *1024* but no success yet. I indexed mysql blacklist table but no luck. Please advise what settings I should add to opensips for successful startup. -- regards, abdul basit >>> ___ >>> Users mailing list >>> Users@lists.opensips.org >>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >>> >> ___ >> Users mailing list >> Users@lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] opensips will not start while loading huge blacklist
Hi Jon, Good to know. If possible, can you share the settings you have for opensips? Whats the server hardware specification? Whats opensips service startup time? -- regards, abdul basit On Sun, 30 Sep 2018 at 05:17, Jon Abrams wrote: > I have used memached to store 20-30 million entry blacklists while > maintaining 6000-9000 responses per second on a dipping server. The > downside is its not persistent. > > I've used redis as well to store the whole North American LNP database in > memory, but I've only tried pushing it to a couple thousand CPS so far. I > would imagine it would perform at least as well as the memcached if needed. > > I wouldn't worry about the speed difference between local cache speed and > using Redis/Memcached over a socket in a normal deployment scenario. > > - Jon > > On Sat, Sep 29, 2018 at 6:17 PM Abdul Basit wrote: > >> Hi team, >> >> I am thinking to do horizontal scaling through dispatcher module and >> sharding the blacklist to 2 or 3 opensips nodes local cache. >> or using redis for blacklist repository but local cache is even more >> quick. >> >> Any comments or experience to share about the problem I am facing >> currently? >> >> -- >> regards, >> >> abdul basit >> >> >> On Fri, 28 Sep 2018 at 06:10, Abdul Basit wrote: >> >>> Hi team, >>> >>> I have a opensips 2.4 deployed having 4 children and with mysql >>> configured for loading user blacklist to opensips local cache on opensips >>> startup. >>> Opensips work fine on filtering the call based on user blacklist records >>> loaded into local cache. >>> >>> While blacklist was growing upto 1.3m records, opensips startup was >>> taking ~60 sec on VM of 16GB RAM and 6 CPU. >>> I increased shared memory to *6144* and package memory to *256.* >>> Filter works fine here yet. Call load is not that much only blacklist >>> entries are growing. >>> >>> But now blacklist has grown to very huge number, up to 10m records in >>> mysql. Opensips is not starting successfully and service startup requests >>> timeout after huge CPU spikes while trying to populate local cache from >>> mysql. >>> I increased shared memory to *12288* and package memory to *1024* but >>> no success yet. >>> >>> I indexed mysql blacklist table but no luck. >>> >>> Please advise what settings I should add to opensips for successful >>> startup. >>> >>> -- >>> regards, >>> >>> abdul basit >>> >> ___ >> Users mailing list >> Users@lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> > ___ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users