Hi,
We use kamailio as a router in our PBX server. The test below causes significant decreasing of free shared memory and many "out of memory" errors in kamailio log:
Preconditions: kamailio server with 256Mb of shared memory allocated.
Test actions: run two load testing scripts at the same time: 1) 10000 register operations; 2) 20000 calls (about 300 per sec);
Results: 1) memory consumption in peak values: - shmem.free_size: 1.8Mb - core: 120Mb: - build_req_buf_from_sip_req: 12.5Mb - msg_lump_cloner: 23.6Mb - sip_msg_shm_clone: 84Mb - tm module: 118Mb 2) shmem.free_size parameter back to normal after the test, so it could be concluded that we don't have any memory leaks.
Is it normal behavior or it's possible to do something to increase performance?
PS: the same behaviour occurs for various values of shared memory defined at the start of kamailio server (128Mb, 256Mb, 512Mb etc.).
Thank you, Andrey
Hello,
if you run with 512MB, is the shm free getting to 1.8MB as well for same figures of registrations and calls?
Cheers, Daniel
On 12.01.18 09:19, Andrey Deykunov wrote:
Hi,
We use kamailio as a router in our PBX server. The test below causes significant decreasing of free shared memory and many "out of memory" errors in kamailio log:
Preconditions: kamailio server with 256Mb of shared memory allocated.
Test actions: run two load testing scripts at the same time: 1) 10000 register operations; 2) 20000 calls (about 300 per sec);
Results: 1) memory consumption in peak values: - shmem.free_size: 1.8Mb - core: 120Mb: - build_req_buf_from_sip_req: 12.5Mb - msg_lump_cloner: 23.6Mb - sip_msg_shm_clone: 84Mb - tm module: 118Mb 2) shmem.free_size parameter back to normal after the test, so it could be concluded that we don't have any memory leaks.
Is it normal behavior or it's possible to do something to increase performance?
PS: the same behaviour occurs for various values of shared memory defined at the start of kamailio server (128Mb, 256Mb, 512Mb etc.).
Thank you, Andrey
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Andrey, Can you please run “kamcmd tm.stats” and check the values. I have a similar problem and see clearly a lot of transactions not being freed, eating up memory and ending with out of memory messages in the log. Have an open issue about it in the bug tracker.
/O
On 12 Jan 2018, at 11:10, Daniel-Constantin Mierla miconda@gmail.com wrote:
Hello,
if you run with 512MB, is the shm free getting to 1.8MB as well for same figures of registrations and calls?
Cheers, Daniel
On 12.01.18 09:19, Andrey Deykunov wrote:
Hi,
We use kamailio as a router in our PBX server. The test below causes significant decreasing of free shared memory and many "out of memory" errors in kamailio log:
Preconditions: kamailio server with 256Mb of shared memory allocated.
Test actions: run two load testing scripts at the same time:
- 10000 register operations;
- 20000 calls (about 300 per sec);
Results: 1) memory consumption in peak values: - shmem.free_size: 1.8Mb - core: 120Mb: - build_req_buf_from_sip_req: 12.5Mb - msg_lump_cloner: 23.6Mb - sip_msg_shm_clone: 84Mb - tm module: 118Mb 2) shmem.free_size parameter back to normal after the test, so it could be concluded that we don't have any memory leaks.
Is it normal behavior or it's possible to do something to increase performance?
PS: the same behaviour occurs for various values of shared memory defined at the start of kamailio server (128Mb, 256Mb, 512Mb etc.).
Thank you, Andrey
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org mailto:sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla www.twitter.com/miconda http://www.twitter.com/miconda -- www.linkedin.com/in/miconda http://www.linkedin.com/in/miconda Kamailio Advanced Training - March 5-7, 2018, Berlin - www.asipto.com http://www.asipto.com/ Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com http://www.kamailioworld.com/_______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Daniel,
I've repeated the test with 1Gb of shared memory (-M 16 -m 1024). free_size parameter fell to 2Kb during the test.
Olle,
I've gathered metrics about tm module: - tm.build_cell: 490Mb at the on the peak; - other metrics take about 2Kb - 6 Mb
Thanks, Andrey
2018-01-12 5:13 GMT-05:00 Olle E. Johansson oej@edvina.net:
Andrey, Can you please run “kamcmd tm.stats” and check the values. I have a similar problem and see clearly a lot of transactions not being freed, eating up memory and ending with out of memory messages in the log. Have an open issue about it in the bug tracker.
/O
On 12 Jan 2018, at 11:10, Daniel-Constantin Mierla miconda@gmail.com wrote:
Hello,
if you run with 512MB, is the shm free getting to 1.8MB as well for same figures of registrations and calls?
Cheers, Daniel
On 12.01.18 09:19, Andrey Deykunov wrote:
Hi,
We use kamailio as a router in our PBX server. The test below causes significant decreasing of free shared memory and many "out of memory" errors in kamailio log:
Preconditions: kamailio server with 256Mb of shared memory allocated.
Test actions: run two load testing scripts at the same time:
- 10000 register operations;
- 20000 calls (about 300 per sec);
Results: 1) memory consumption in peak values:
- shmem.free_size: 1.8Mb
- core: 120Mb:
- build_req_buf_from_sip_req: 12.5Mb
- msg_lump_cloner: 23.6Mb
- sip_msg_shm_clone: 84Mb
- tm module: 118Mb 2) shmem.free_size parameter back to normal after the test, so it
could be concluded that we don't have any memory leaks.
Is it normal behavior or it's possible to do something to increase performance?
PS: the same behaviour occurs for various values of shared memory defined at the start of kamailio server (128Mb, 256Mb, 512Mb etc.).
Thank you, Andrey
Kamailio (SER) - Users Mailing Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - March 5-7, 2018, Berlin - www.asipto.com Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
My understanding is that used memory goes back to normal after the test, not something that stays high forever, so it doesn't look at all with what you refer to.
Cheers, Daniel
On 12.01.18 11:13, Olle E. Johansson wrote:
Andrey, Can you please run “kamcmd tm.stats” and check the values. I have a similar problem and see clearly a lot of transactions not being freed, eating up memory and ending with out of memory messages in the log. Have an open issue about it in the bug tracker.
/O
On 12 Jan 2018, at 11:10, Daniel-Constantin Mierla <miconda@gmail.com mailto:miconda@gmail.com> wrote:
Hello,
if you run with 512MB, is the shm free getting to 1.8MB as well for same figures of registrations and calls?
Cheers, Daniel
On 12.01.18 09:19, Andrey Deykunov wrote:
Hi,
We use kamailio as a router in our PBX server. The test below causes significant decreasing of free shared memory and many "out of memory" errors in kamailio log:
Preconditions: kamailio server with 256Mb of shared memory allocated.
Test actions: run two load testing scripts at the same time: 1) 10000 register operations; 2) 20000 calls (about 300 per sec);
Results: 1) memory consumption in peak values: - shmem.free_size: 1.8Mb - core: 120Mb: - build_req_buf_from_sip_req: 12.5Mb - msg_lump_cloner: 23.6Mb - sip_msg_shm_clone: 84Mb - tm module: 118Mb 2) shmem.free_size parameter back to normal after the test, so it could be concluded that we don't have any memory leaks.
Is it normal behavior or it's possible to do something to increase performance?
PS: the same behaviour occurs for various values of shared memory defined at the start of kamailio server (128Mb, 256Mb, 512Mb etc.).
Thank you, Andrey
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - March 5-7, 2018, Berlin - www.asipto.com Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org mailto:sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
I've increased shared memory to 2Gb (-M 16 -m 2048). The free_size parameter was not less than 793Mb during the test. It seems that 2Gb is an optimal value for my setting.
Daniel, Yes, you're right. That was not a memory leak, I think that this is about amount of memory required by kamailio for the specific test case.
Thanks, Andrey
2018-01-12 7:42 GMT-05:00 Daniel-Constantin Mierla miconda@gmail.com:
My understanding is that used memory goes back to normal after the test, not something that stays high forever, so it doesn't look at all with what you refer to.
Cheers, Daniel
On 12.01.18 11:13, Olle E. Johansson wrote:
Andrey, Can you please run “kamcmd tm.stats” and check the values. I have a similar problem and see clearly a lot of transactions not being freed, eating up memory and ending with out of memory messages in the log. Have an open issue about it in the bug tracker.
/O
On 12 Jan 2018, at 11:10, Daniel-Constantin Mierla miconda@gmail.com wrote:
Hello,
if you run with 512MB, is the shm free getting to 1.8MB as well for same figures of registrations and calls?
Cheers, Daniel
On 12.01.18 09:19, Andrey Deykunov wrote:
Hi,
We use kamailio as a router in our PBX server. The test below causes significant decreasing of free shared memory and many "out of memory" errors in kamailio log:
Preconditions: kamailio server with 256Mb of shared memory allocated.
Test actions: run two load testing scripts at the same time:
- 10000 register operations;
- 20000 calls (about 300 per sec);
Results: 1) memory consumption in peak values:
- shmem.free_size: 1.8Mb
- core: 120Mb:
- build_req_buf_from_sip_req: 12.5Mb
- msg_lump_cloner: 23.6Mb
- sip_msg_shm_clone: 84Mb
- tm module: 118Mb 2) shmem.free_size parameter back to normal after the test, so it
could be concluded that we don't have any memory leaks.
Is it normal behavior or it's possible to do something to increase performance?
PS: the same behaviour occurs for various values of shared memory defined at the start of kamailio server (128Mb, 256Mb, 512Mb etc.).
Thank you, Andrey
Kamailio (SER) - Users Mailing Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - March 5-7, 2018, Berlin - www.asipto.com Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - March 5-7, 2018, Berlin - www.asipto.com Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com