Re: [SR-Users] jsonrpcs - safest way to get data

2020-10-07 Thread Henning Westerholt
Hello,

Your requirement to frequently dump millions of user location entries on a 
loaded production system sounds a bit odd to me. Maybe you can elaborate a bit 
on your requirements. If you have the requirement to access this data 
frequently, maybe getting it from the database directly is the better idea. If 
you want to get it from kamailio, choose a module that provides the option to 
configure the number of children (e.g. like dgram_workers in jsonrpcs) and set 
it to a sufficient number.

Cheers,

Henning

--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com

From: sr-users  On Behalf Of Ilie Soltanici
Sent: Tuesday, October 6, 2020 12:29 AM
To: Kamailio (SER) - Users Mailing List 
Subject: [SR-Users] jsonrpcs - safest way to get data

Hello,

I'm trying to periodically get all registered contacts from the Kamailio memory 
in the json format.
JSONRPCS module have 3 different types of transport to get this data. I just 
wonder what will be the safest transport for the Kamailio to get all this data? 
Because all this data it's not so important, I want to gather it without 
affecting the main process or with the minimal effect on the Kamailio SIP 
Processing module.

1. The HTTP transport - very useful, working async, but because it depends on 
the xhttp module - which works synchronously I'm afraid that for big data with 
contacts this type of transport can affect the kamailio performance.

2. FIFO - this transport also is very fast, working locally - but it's 
synchronous, I'm not sure how it will affect Kamailio SIP Processing when the 
local database will have few millions of users registered.

3. DGRAM - also seems to be very fast, working locally or remotely through the 
UDP protocol, but again it's synchronous and I'm not sure that this transport 
is returning any output for the request, I tried - but didn't get back 
anything, while for changing something it worked fine. Maybe it was a 
misconfiguration in my config file.

What would be your recommendation for this case?

Thank you.
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Result limitation on sqlops

2020-10-07 Thread Alex Balashov

Duarte,

It's hard to fathom a scenario in which you need anywhere near 32 result 
containers simultaneously. And if you don't need them simultaneously, 
they can be reused.


I have a very DB-intensive config with many, many queries and only need 
one container at any given time. I think I once had a scenario where I 
needed two -- it was a bizarre one.


-- Alex

On 10/7/20 8:48 AM, Duarte Rocha wrote:

Hey,

I just upgrade to Kamailio 5.4 and i see that now sqlops has a 
limitation of 32 results containers which is not enough for my proxy.


Is it possible that this limitation can be configured via module parameters?

In the meanwhile i've changed the value in sql_api.c but i would like to 
have my source code as close as the original as possible.


Best Regards,

Duarte Rocha

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users



--
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Result limitation on sqlops

2020-10-07 Thread Daniel-Constantin Mierla
And for the records: I just pushed the commit with code adding a
modparam for setting this value.

On 07.10.20 17:20, Daniel-Constantin Mierla wrote:
>
> Hello,
>
> that can be made a modparam, but do you really need more than 32
> result containers? The result containers can be reused if you do not
> need the results at the same time or to be persistent in the worker
> process. So even you do sql_query() more than 32 times, if you do not
> need all the 32+ results at the same time, then you should reuse the
> containers because it helps with performances (although it is not a
> real concern) as well as lower memory usage.
>
> In my configs, I do not recall any case when I needed more than 4,
> even on very intensive db-oriented configs (e.g., with more than 20
> queries on a request processing) and typically I have 1 or 2 result
> containers per config.
>
> Cheers,
> Daniel
>
> On 07.10.20 14:48, Duarte Rocha wrote:
>> Hey, 
>>
>> I just upgrade to Kamailio 5.4 and i see that now sqlops has a
>> limitation of 32 results containers which is not enough for my proxy.
>>
>> Is it possible that this limitation can be configured via module
>> parameters?
>>
>> In the meanwhile i've changed the value in sql_api.c but i would like
>> to have my source code as close as the original as possible.
>>
>> Best Regards,
>>
>> Duarte Rocha
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> -- 
> Daniel-Constantin Mierla -- www.asipto.com
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
> Funding: https://www.paypal.me/dcmierla

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Funding: https://www.paypal.me/dcmierla

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Result limitation on sqlops

2020-10-07 Thread Daniel-Constantin Mierla
Hello,

that can be made a modparam, but do you really need more than 32 result
containers? The result containers can be reused if you do not need the
results at the same time or to be persistent in the worker process. So
even you do sql_query() more than 32 times, if you do not need all the
32+ results at the same time, then you should reuse the containers
because it helps with performances (although it is not a real concern)
as well as lower memory usage.

In my configs, I do not recall any case when I needed more than 4, even
on very intensive db-oriented configs (e.g., with more than 20 queries
on a request processing) and typically I have 1 or 2 result containers
per config.

Cheers,
Daniel

On 07.10.20 14:48, Duarte Rocha wrote:
> Hey, 
>
> I just upgrade to Kamailio 5.4 and i see that now sqlops has a
> limitation of 32 results containers which is not enough for my proxy.
>
> Is it possible that this limitation can be configured via module
> parameters?
>
> In the meanwhile i've changed the value in sql_api.c but i would like
> to have my source code as close as the original as possible.
>
> Best Regards,
>
> Duarte Rocha
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Funding: https://www.paypal.me/dcmierla

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Result limitation on sqlops

2020-10-07 Thread Duarte Rocha
Hey,

I just upgrade to Kamailio 5.4 and i see that now sqlops has a limitation
of 32 results containers which is not enough for my proxy.

Is it possible that this limitation can be configured via module parameters?

In the meanwhile i've changed the value in sql_api.c but i would like to
have my source code as close as the original as possible.

Best Regards,

Duarte Rocha
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users