Hello We are going to use kamailio 3.1.4 for a registrar server and need to know if the default parameters [shared memory and the like] is fine or if we need to plan in advance and increase it at compile time. If so, how should we proceed about it?
For subscribers and location type of information, which memory type should we be more concerned about? private memory, shared memory, memory per process etc because it looks like some modules use shared memory others private memory etc.
Also , I see that the command "kamctl fifo get_statistics all" gives info about memory used etc. How should we interpret the output like this:
shmem:fragments = 24 shmem:free_size = 9665456 shmem:max_used_size = 23915072 shmem:real_used_size = 23888976 shmem:total_size = 33554432 shmem:used_size = 23648072
is this fifo function exported by a specific module?
thank you in advance fborot
On Tuesday 12 July 2011, Fabian Borot wrote:
We are going to use kamailio 3.1.4 for a registrar server and need to know if the default parameters [shared memory and the like] is fine or if we need to plan in advance and increase it at compile time. If so, how should we proceed about it?
Hi Fabian,
the exact configuration depends on the load of your scenario, exact traffic patterns etc.. A PKG setting of 4-8 MB and a shared pool of 512MB should be really enough, if you don't have too extreme load.
For subscribers and location type of information, which memory type should we be more concerned about? private memory, shared memory, memory per process etc because it looks like some modules use shared memory others private memory etc.
Normally you're more concerned about private (per process) memory, as this used to be a compile time definition and its generally smaller. In upcoming 3.2 it will be possible to change it with a commandline parameter.
Also , I see that the command "kamctl fifo get_statistics all" gives info about memory used etc. How should we interpret the output like this:
The output is about the shared memory pool memory manager.
shmem:fragments = 24
memory fragments
shmem:free_size = 9665456
free size
shmem:max_used_size = 23915072
probably maximum used size since start
shmem:real_used_size = 23888976
total size plus overhead from malloc
shmem:total_size = 33554432
total size of memory pool, e.g. value from command line
shmem:used_size = 23648072
allocated size
is this fifo function exported by a specific module?
Its exported from the kamailio core.
Best regards,
Henning
thank you Henning
"A PKG setting of 4-8 MB and a shared pool of 512MB should be really enough" "Normally you're more concerned about private (per process) memory,"
where do I set them?
thank you fborot
From: henning.westerholt@1und1.de To: sr-users@lists.sip-router.org Subject: Re: [SR-Users] memory requirements for a registrar server Date: Wed, 13 Jul 2011 13:00:47 +0200 CC: fborot@hotmail.com
On Tuesday 12 July 2011, Fabian Borot wrote:
We are going to use kamailio 3.1.4 for a registrar server and need to know if the default parameters [shared memory and the like] is fine or if we need to plan in advance and increase it at compile time. If so, how should we proceed about it?
Hi Fabian,
the exact configuration depends on the load of your scenario, exact traffic patterns etc.. A PKG setting of 4-8 MB and a shared pool of 512MB should be really enough, if you don't have too extreme load.
For subscribers and location type of information, which memory type should we be more concerned about? private memory, shared memory, memory per process etc because it looks like some modules use shared memory others private memory etc.
Normally you're more concerned about private (per process) memory, as this used to be a compile time definition and its generally smaller. In upcoming 3.2 it will be possible to change it with a commandline parameter.
Also , I see that the command "kamctl fifo get_statistics all" gives info about memory used etc. How should we interpret the output like this:
The output is about the shared memory pool memory manager.
shmem:fragments = 24
memory fragments
shmem:free_size = 9665456
free size
shmem:max_used_size = 23915072
probably maximum used size since start
shmem:real_used_size = 23888976
total size plus overhead from malloc
shmem:total_size = 33554432
total size of memory pool, e.g. value from command line
shmem:used_size = 23648072
allocated size
is this fifo function exported by a specific module?
Its exported from the kamailio core.
Best regards,
Henning
On Wednesday 13 July 2011, Fabian Borot wrote:
thank you Henning
"A PKG setting of 4-8 MB and a shared pool of 512MB should be really enough" "Normally you're more concerned about private (per process) memory,"
where do I set them?
Hi Fabian,
you can set it at compile time in config.h (PKG_MEM_POOL or something like this), or the in upcoming version 3.2 on the command line.
Best regards,
Henning
ok, great...this is, I think, the relevant section on config.h
#ifndef PKG_MEM_SIZE #define PKG_MEM_SIZE 4 #endif #define PKG_MEM_POOL_SIZE PKG_MEM_SIZE*1024*1024 /*!< used only if PKG_MALLOC is defined*/
#define SHM_MEM_SIZE 32 /*!< used if SH_MEM is defined*/
SHM_MEM_SIZE 32 --> this looks like 32 MB and PKG_MEM_SIZE 4 looks like Bytes, that is why the PKG_MEM_POOL_SIZE is multiplied by 1024*1024 to get MBs I assume.
Please confirm. thank you
fborot
From: henning.westerholt@1und1.de To: fborot@hotmail.com Subject: Re: [SR-Users] memory requirements for a registrar server Date: Wed, 13 Jul 2011 18:15:40 +0200 CC: sr-users@lists.sip-router.org
On Wednesday 13 July 2011, Fabian Borot wrote:
thank you Henning
"A PKG setting of 4-8 MB and a shared pool of 512MB should be really enough" "Normally you're more concerned about private (per process) memory,"
where do I set them?
Hi Fabian,
you can set it at compile time in config.h (PKG_MEM_POOL or something like this), or the in upcoming version 3.2 on the command line.
Best regards,
Henning
Fabian wrote:
ok, great...this is, I think, the relevant section on config.h
Hi Fabian,
#define PKG_MEM_SIZE 4 #define PKG_MEM_POOL_SIZE PKG_MEM_SIZE*1024*1024 /*!< used only if PKG_MALLOC is defined*/ #define SHM_MEM_SIZE 32 /*!< used if SH_MEM is defined*/
SHM_MEM_SIZE 32 --> this looks like 32 MB and PKG_MEM_SIZE 4 looks like Bytes, that is why the PKG_MEM_POOL_SIZE is multiplied by 1024*1024 to get MBs I assume.
Correct, 4MB and 32MB. I'll have a look to to the file to document it a bit better in the next days.
You don't need to change config.h to change the shared pool. There exists a cmd line parameter, have a look to 'man kamailio' or run 'kamailio -h' for more informations. The specified values are just used in the case nothing else is configured. They are also some cfg script parameters, i think.
Regards,
Henning