Discussion:
[SR-Users] RFC: updating default values
Daniel-Constantin Mierla
2014-04-16 10:06:06 UTC
Permalink
Hello,

I am opening this discussion to decide if there is need to adjust some
of the default values we have in Kamailio. Many of them were set even
like 10 years ago, so they might not be very actual anymore.

The main goal is to get the best possible settings for common usage.

To start with, here are some values that should be reviewed:

- default private memory is 4MB - if the config is not that small, it
might not be sufficient free pkg to play with (e.g., for sql_query()
result, storage of $var(...) values). Should it be increased to 8MB or
other value? Debian/Centos have startup script that sets its value to 8
via command line

- default shared memory is 32MB - for a decent deployment with tm,
location, lcr/dispatcher, permissions, and anti-flood, it might leave
not much free space. Should we double it or set to a different value

- usrloc - db_ops_ruid should enabled (1) - seems stable, without it
there are problems updating/deleting location records when UA changes
the call-id for same contact address.

- usrloc - hash_size - now is 9, which results in 512 slots, meaning is
ok for few thousands of registered users, for more, performance will
decrease when doing save/lookup location -- should it be made 10 (1024
slots for internal hash table)?

- auth_db - load_credentials defaults to 'rpid', meaning that the query
to get the password will retrieve also the rpid column. I haven't see
rpid being used that much lately (replaced by PAI/PPI). I would make
this parameter empty by default to avoid querying for an extra column
that is likely to be empty.

Perhaps there are more, I just wanted to get started. Reply with your
comments to above list as well as add new items you thinks their default
values should be adjusted.

Cheers,
Daniel
--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Juha Heinanen
2014-04-16 10:41:15 UTC
Permalink
Post by Daniel-Constantin Mierla
- default private memory is 4MB - if the config is not that small, it
might not be sufficient free pkg to play with (e.g., for sql_query()
result, storage of $var(...) values). Should it be increased to 8MB or
other value? Debian/Centos have startup script that sets its value to 8
via command line
i agree on increasing this to 8 MB. my sip-proxy does not start with
4. it starts with 8 on i386, but not on amd64 arch.
Post by Daniel-Constantin Mierla
- default shared memory is 32MB - for a decent deployment with tm,
location, lcr/dispatcher, permissions, and anti-flood, it might leave
not much free space. Should we double it or set to a different value
my proxy is happy with 32 here.
Post by Daniel-Constantin Mierla
- usrloc - db_ops_ruid should enabled (1) - seems stable, without it
there are problems updating/deleting location records when UA changes
the call-id for same contact address.
i agree.
Post by Daniel-Constantin Mierla
- usrloc - hash_size - now is 9, which results in 512 slots, meaning is
ok for few thousands of registered users, for more, performance will
decrease when doing save/lookup location -- should it be made 10 (1024
slots for internal hash table)?
i'm fine with that change.
Post by Daniel-Constantin Mierla
- auth_db - load_credentials defaults to 'rpid', meaning that the query
to get the password will retrieve also the rpid column. I haven't see
rpid being used that much lately (replaced by PAI/PPI). I would make
this parameter empty by default to avoid querying for an extra column
that is likely to be empty.
i agree, since i have modparam("auth_db", "load_credentials", "") in my
config.

-- juha
Daniel-Constantin Mierla
2014-10-02 07:59:25 UTC
Permalink
Hello,

apart of shared memory size (still to be considered), I made the other
changes.

Based on last days of testing at SIPit31 and reviewing my configs, few
other values look a bit small considering what we can get on the wire:

- tcp_rd_buf_size - it is 4096b, but with audio/video and ice, the size
is to small. I propose either 8k or even 16k
- pv_buffer_size - it is 1024b, given the above and that this is used
for variables, many don't fit. The same as above, I propose 8k or 16k

Opinions, other internals that we should consider for adjusting default
value?

Cheers,
Daniel
Post by Juha Heinanen
Post by Daniel-Constantin Mierla
- default private memory is 4MB - if the config is not that small, it
might not be sufficient free pkg to play with (e.g., for sql_query()
result, storage of $var(...) values). Should it be increased to 8MB or
other value? Debian/Centos have startup script that sets its value to 8
via command line
i agree on increasing this to 8 MB. my sip-proxy does not start with
4. it starts with 8 on i386, but not on amd64 arch.
Post by Daniel-Constantin Mierla
- default shared memory is 32MB - for a decent deployment with tm,
location, lcr/dispatcher, permissions, and anti-flood, it might leave
not much free space. Should we double it or set to a different value
my proxy is happy with 32 here.
Post by Daniel-Constantin Mierla
- usrloc - db_ops_ruid should enabled (1) - seems stable, without it
there are problems updating/deleting location records when UA changes
the call-id for same contact address.
i agree.
Post by Daniel-Constantin Mierla
- usrloc - hash_size - now is 9, which results in 512 slots, meaning is
ok for few thousands of registered users, for more, performance will
decrease when doing save/lookup location -- should it be made 10 (1024
slots for internal hash table)?
i'm fine with that change.
Post by Daniel-Constantin Mierla
- auth_db - load_credentials defaults to 'rpid', meaning that the query
to get the password will retrieve also the rpid column. I haven't see
rpid being used that much lately (replaced by PAI/PPI). I would make
this parameter empty by default to avoid querying for an extra column
that is likely to be empty.
i agree, since i have modparam("auth_db", "load_credentials", "") in my
config.
-- juha
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Juha Heinanen
2014-10-02 08:30:26 UTC
Permalink
Post by Daniel-Constantin Mierla
- tcp_rd_buf_size - it is 4096b, but with audio/video and ice, the size
is to small. I propose either 8k or even 16k
i have used 16k in my setups.
Post by Daniel-Constantin Mierla
- pv_buffer_size - it is 1024b, given the above and that this is used
for variables, many don't fit. The same as above, I propose 8k or 16k.
4k has worked for me so far.

-- juha
Daniel-Constantin Mierla
2014-10-02 08:45:15 UTC
Permalink
One more came in my mind:

- failure_reply_mode in tm set to 3 (now is 0)

Daniel
Post by Juha Heinanen
Post by Daniel-Constantin Mierla
- tcp_rd_buf_size - it is 4096b, but with audio/video and ice, the size
is to small. I propose either 8k or even 16k
i have used 16k in my setups.
Post by Daniel-Constantin Mierla
- pv_buffer_size - it is 1024b, given the above and that this is used
for variables, many don't fit. The same as above, I propose 8k or 16k.
4k has worked for me so far.
-- juha
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Juha Heinanen
2014-10-02 08:48:05 UTC
Permalink
Post by Daniel-Constantin Mierla
- failure_reply_mode in tm set to 3 (now is 0)
i have been using 3 there.

-- juha
Klaus Darilion
2014-10-02 13:45:18 UTC
Permalink
Post by Juha Heinanen
Post by Daniel-Constantin Mierla
- failure_reply_mode in tm set to 3 (now is 0)
i have been using 3 there.
IMO this makes sense

Loading...