Pjproject 2.10: memory usage with asterisk

PW
Pirmin Walthert
Tue, Apr 14, 2020 2:09 PM

Hi there,

A few days ago I've tested Asterisk 16.9 with Pjsip 2.10 (the bundled
version is still 2.9 and so is the version we usually use).

One thing I've noticed was that the combination with Pjsip 2.10 was
using a lot more memory according to top (compiled with the same
config_site.h and the same configure options, the usage was ~90MByte
compared to ~68MByte after boot). This was even the case with
PJ_TIMER_DEBUG 0 and PJ_TIMER_HEAP_USE_COPY 0

So with these two options disabled I'd expect about the same memory
footprint. Does anyone have an idea about which changeset could be
responsible for this?

Best regards,

Pirmin

Hi there, A few days ago I've tested Asterisk 16.9 with Pjsip 2.10 (the bundled version is still 2.9 and so is the version we usually use). One thing I've noticed was that the combination with Pjsip 2.10 was using a lot more memory according to top (compiled with the same config_site.h and the same configure options, the usage was ~90MByte compared to ~68MByte after boot). This was even the case with PJ_TIMER_DEBUG 0 and PJ_TIMER_HEAP_USE_COPY 0 So with these two options disabled I'd expect about the same memory footprint. Does anyone have an idea about which changeset could be responsible for this? Best regards, Pirmin
AW
Andreas Wehrmann
Wed, Apr 15, 2020 5:10 AM

On 14/04/2020 16:09, Pirmin Walthert wrote:

Hi there,

A few days ago I've tested Asterisk 16.9 with Pjsip 2.10 (the bundled
version is still 2.9 and so is the version we usually use).

One thing I've noticed was that the combination with Pjsip 2.10 was
using a lot more memory according to top (compiled with the same
config_site.h and the same configure options, the usage was ~90MByte
compared to ~68MByte after boot). This was even the case with
PJ_TIMER_DEBUG 0 and PJ_TIMER_HEAP_USE_COPY 0

So with these two options disabled I'd expect about the same memory
footprint. Does anyone have an idea about which changeset could be
responsible for this?

Best regards,

Pirmin

Hey there,
is the memory usage higher, right from the beginning?
I'm asking because I'm currently dealing with memory usage problems as
well, with my own app though:
https://github.com/pjsip/pjproject/issues/2389

Regards,
Andreas

On 14/04/2020 16:09, Pirmin Walthert wrote: > > Hi there, > > A few days ago I've tested Asterisk 16.9 with Pjsip 2.10 (the bundled > version is still 2.9 and so is the version we usually use). > > One thing I've noticed was that the combination with Pjsip 2.10 was > using a lot more memory according to top (compiled with the same > config_site.h and the same configure options, the usage was ~90MByte > compared to ~68MByte after boot). This was even the case with > PJ_TIMER_DEBUG 0 and PJ_TIMER_HEAP_USE_COPY 0 > > So with these two options disabled I'd expect about the same memory > footprint. Does anyone have an idea about which changeset could be > responsible for this? > > Best regards, > > Pirmin > Hey there, is the memory usage higher, right from the beginning? I'm asking because I'm currently dealing with memory usage problems as well, with my own app though: https://github.com/pjsip/pjproject/issues/2389 Regards, Andreas
AW
Andreas Wehrmann
Wed, Apr 15, 2020 5:13 AM

On 15/04/2020 07:10, Andreas Wehrmann wrote:

On 14/04/2020 16:09, Pirmin Walthert wrote:

Hi there,

A few days ago I've tested Asterisk 16.9 with Pjsip 2.10 (the bundled
version is still 2.9 and so is the version we usually use).

One thing I've noticed was that the combination with Pjsip 2.10 was
using a lot more memory according to top (compiled with the same
config_site.h and the same configure options, the usage was ~90MByte
compared to ~68MByte after boot). This was even the case with
PJ_TIMER_DEBUG 0 and PJ_TIMER_HEAP_USE_COPY 0

So with these two options disabled I'd expect about the same memory
footprint. Does anyone have an idea about which changeset could be
responsible for this?

Best regards,

Pirmin

Hey there,
is the memory usage higher, right from the beginning?
I'm asking because I'm currently dealing with memory usage problems as
well, with my own app though:
https://github.com/pjsip/pjproject/issues/2389

Regards,
Andreas

I misread, you wrote "after boot"...

On 15/04/2020 07:10, Andreas Wehrmann wrote: > On 14/04/2020 16:09, Pirmin Walthert wrote: >> >> Hi there, >> >> A few days ago I've tested Asterisk 16.9 with Pjsip 2.10 (the bundled >> version is still 2.9 and so is the version we usually use). >> >> One thing I've noticed was that the combination with Pjsip 2.10 was >> using a lot more memory according to top (compiled with the same >> config_site.h and the same configure options, the usage was ~90MByte >> compared to ~68MByte after boot). This was even the case with >> PJ_TIMER_DEBUG 0 and PJ_TIMER_HEAP_USE_COPY 0 >> >> So with these two options disabled I'd expect about the same memory >> footprint. Does anyone have an idea about which changeset could be >> responsible for this? >> >> Best regards, >> >> Pirmin >> > > Hey there, > is the memory usage higher, right from the beginning? > I'm asking because I'm currently dealing with memory usage problems as > well, with my own app though: > https://github.com/pjsip/pjproject/issues/2389 > > Regards, > Andreas > I misread, you wrote "after boot"...
PW
Pirmin Walthert
Fri, Apr 17, 2020 7:19 AM

Hi Andreas,

Well, it was indeed caused by the timer refactoring. I didn't notice
that PJ_TIMER_HEAP_USE_COPY had been renamed to PJ_TIMER_USE_COPY in a
later revision, so setting PJ_TIMER_HEAP_USE_COPY to 0 had no effect at all.

Now with PJ_TIMER_USE_COPY set to 0 I get the old memory usage back.
(~70MByte compared to ~88MByte on the same system with the same
configuration).

Best regards,

Pirmin

Am 15.04.20 um 07:10 schrieb Andreas Wehrmann:

On 14/04/2020 16:09, Pirmin Walthert wrote:

Hi there,

A few days ago I've tested Asterisk 16.9 with Pjsip 2.10 (the bundled
version is still 2.9 and so is the version we usually use).

One thing I've noticed was that the combination with Pjsip 2.10 was
using a lot more memory according to top (compiled with the same
config_site.h and the same configure options, the usage was ~90MByte
compared to ~68MByte after boot). This was even the case with
PJ_TIMER_DEBUG 0 and PJ_TIMER_HEAP_USE_COPY 0

So with these two options disabled I'd expect about the same memory
footprint. Does anyone have an idea about which changeset could be
responsible for this?

Best regards,

Pirmin

Hey there,
is the memory usage higher, right from the beginning?
I'm asking because I'm currently dealing with memory usage problems as
well, with my own app though:
https://github.com/pjsip/pjproject/issues/2389

Regards,
Andreas


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

Hi Andreas, Well, it was indeed caused by the timer refactoring. I didn't notice that PJ_TIMER_HEAP_USE_COPY had been renamed to PJ_TIMER_USE_COPY in a later revision, so setting PJ_TIMER_HEAP_USE_COPY to 0 had no effect at all. Now with PJ_TIMER_USE_COPY set to 0 I get the old memory usage back. (~70MByte compared to ~88MByte on the same system with the same configuration). Best regards, Pirmin Am 15.04.20 um 07:10 schrieb Andreas Wehrmann: > On 14/04/2020 16:09, Pirmin Walthert wrote: >> >> Hi there, >> >> A few days ago I've tested Asterisk 16.9 with Pjsip 2.10 (the bundled >> version is still 2.9 and so is the version we usually use). >> >> One thing I've noticed was that the combination with Pjsip 2.10 was >> using a lot more memory according to top (compiled with the same >> config_site.h and the same configure options, the usage was ~90MByte >> compared to ~68MByte after boot). This was even the case with >> PJ_TIMER_DEBUG 0 and PJ_TIMER_HEAP_USE_COPY 0 >> >> So with these two options disabled I'd expect about the same memory >> footprint. Does anyone have an idea about which changeset could be >> responsible for this? >> >> Best regards, >> >> Pirmin >> > > Hey there, > is the memory usage higher, right from the beginning? > I'm asking because I'm currently dealing with memory usage problems as > well, with my own app though: > https://github.com/pjsip/pjproject/issues/2389 > > Regards, > Andreas > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org