Hi guys,

I think  Alexey's point is different:  the idea is that PKG memory is used to store data which is proportional to SHM memory.  The same type of problem exists with the dialog/usrloc MI "dump" commands: "since dialogs and contacts are stored in SHM, can we really expect to be able to build a big PKG buffer where to print them out?"

IMO, both of these operations (cluster sync and MI dumping of large amounts of SHM data) should use SHM buffers.  We're only talking about a single alloc operation that occurs seldom, and it's not the end of the world if you grab the SHM lock for a couple of microseconds when that happens.  The payoff for having gotten rid of the original problem is much higher.

Cheers,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 05.12.2018 10:22, Răzvan Crainea wrote:
@Alexei: unfortunately there is no way in OpenSIPS to auto-scale the private or public memory - you'll have to decide from the beginning how much traffic you are going to support and scale the memory usage accordingly. Syncing cannot be done using shared memory, so the only solution I can see is to increase the pkg (-M) parameter to a comfortable value.

@Mohit: In order to use cluster replication for dialogs, you can follow this[1] tutorial, or this[2] one for usrloc replication. Both methods require a full working cluster. For details about cluster configuration, please read the module's manual[3].

[1] https://blog.opensips.org/2018/03/23/clustering-ongoing-calls-with-opensips-2-4/ [2] https://blog.opensips.org/2018/09/13/clustered-sip-user-location-the-full-sharing-topology/
[3] https://opensips.org/html/docs/modules/2.4.x/clusterer#idp6120384

Best regards,
Răzvan

On 12/4/18 7:30 AM, Mohit Sachan wrote:
plz tell me how to configure opensips for cluster replication (usrloc or dialog)

On Mon, Dec 3, 2018 at 1:00 PM vasilevalex <[email protected] <mailto:[email protected]>> wrote:

    Hi all,

    I have simple cluster with full-sharing usrloc. Everything is in
    memory, no
    DB for usrloc.
    When starting backup server it syncing usrloc data. So I got errors:

    Dec  1 20:15:12 test02 /usr/sbin/opensips[30896]:
    ERROR:core:fm_malloc: not
    enough free pkg memory (30400 bytes left, need 35904), please
    increase the
    "-M" command line parameter!
    Dec  1 20:15:12 test02 /usr/sbin/opensips[30896]: INFO:core:fm_malloc:
    attempting defragmentation...
    Dec  1 20:15:12 test02 /usr/sbin/opensips[30896]: INFO:core:fm_malloc:
    unable to alloc a big enough fragment!
    Dec  1 20:15:12 test02 /usr/sbin/opensips[30896]: INFO:core:fm_malloc:
    unable to alloc a big enough fragment!
    Dec  1 20:15:12 test02 /usr/sbin/opensips[30896]: INFO:core:fm_malloc:
    attempting defragmentation...
    Dec  1 20:15:12 test02 /usr/sbin/opensips[30896]: INFO:core:fm_malloc:
    unable to alloc a big enough fragment!
    Dec  1 20:15:12 test02 /usr/sbin/opensips[30896]: INFO:core:fm_malloc:
    attempting defragmentation...

    Start parameters:
    /usr/sbin/opensips -m 512 -M 32

    And this errors starts with only little bit more than 500 phones.
    When cluster in sync, on Backup server I has real_used_size about 11 Mb.

    Of course I can increase package memory for example to 64 Mb. But
    what if I
    want not 1000 phones, but 10000 ? May be syncing must use shared memory?
    Unfortunately I don't know this process so deep.
    Thanks.




    --
    Sent from:
http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-Users-f1449235.html

    _______________________________________________
    Users mailing list
    [email protected] <mailto:[email protected]>
    http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to