TCMalloc and freeswitch
Hello, Is there a way to switch to TCMalloc without recompiling freeswitch? Can someone please point me to (or provide) some instructions? (Preferably for Centos 6) Thanks, Ali Pey
The webpage for TCMalloc states: You can use tcmalloc in applications you didn't compile yourself, by using LD_PRELOAD: $ LD_PRELOAD="/usr/lib/libtcmalloc.so" blahblah On Wed, Feb 18, 2015 at 9:59 AM, Ali Pey <alipey@gmail.com> wrote:
Hello,
Is there a way to switch to TCMalloc without recompiling freeswitch?
Can someone please point me to (or provide) some instructions? (Preferably for Centos 6)
Thanks, Ali Pey
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- *Brian West* brian@freeswitch.org *Twitter: @FreeSWITCH , @briankwest* http://www.freeswitchbook.com http://www.freeswitchcookbook.com *T:*+19184209001 | *F:*+19184209002 | *M:*+1918424WEST (9378) *iNUM:*+883 5100 1420 9001 | *ISN:*410*543 | *Skype:*briankwest
Great idea. Do you have any evidence whether other malloc libs (tcmalloc, jemalloc) gives better performance over glibc ones? T. On Wed, Feb 18, 2015 at 5:13 PM, Brian West <brian@freeswitch.org> wrote:
The webpage for TCMalloc states:
You can use tcmalloc in applications you didn't compile yourself, by using LD_PRELOAD:
$ LD_PRELOAD="/usr/lib/libtcmalloc.so" blahblah
On Wed, Feb 18, 2015 at 9:59 AM, Ali Pey <alipey@gmail.com> wrote:
Hello,
Is there a way to switch to TCMalloc without recompiling freeswitch?
Can someone please point me to (or provide) some instructions? (Preferably for Centos 6)
Thanks, Ali Pey
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
--
*Brian West* brian@freeswitch.org
*Twitter: @FreeSWITCH , @briankwest* http://www.freeswitchbook.com http://www.freeswitchcookbook.com
*T:*+19184209001 | *F:*+19184209002 | *M:*+1918424WEST (9378) *iNUM:*+883 5100 1420 9001 | *ISN:*410*543 | *Skype:*briankwest
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
We make fairly heavy use of memory pools, which probably reduce malloc. I suspect that using them is of little benefit but would be interested to hear to the contrary.
On Feb 24, 2015, at 2:15 PM, Tamas Jalsovszky <jalsot@gmail.com> wrote:
Great idea. Do you have any evidence whether other malloc libs (tcmalloc, jemalloc) gives better performance over glibc ones?
T.
On Wed, Feb 18, 2015 at 5:13 PM, Brian West <brian@freeswitch.org <mailto:brian@freeswitch.org>> wrote: The webpage for TCMalloc states:
You can use tcmalloc in applications you didn't compile yourself, by using LD_PRELOAD:
$ LD_PRELOAD="/usr/lib/libtcmalloc.so" blahblah
On Wed, Feb 18, 2015 at 9:59 AM, Ali Pey <alipey@gmail.com <mailto:alipey@gmail.com>> wrote: Hello,
Is there a way to switch to TCMalloc without recompiling freeswitch?
Can someone please point me to (or provide) some instructions? (Preferably for Centos 6)
We haven't measured the effect in Production yet, but in the lab, it made a big difference. The main problem that tcmalloc fixed for us was the threads locking on malloc and calloc and killing the CPU. I strongly recommend tcmalloc. In low traffic, it won't make a big difference, but in high traffic, you definitely need tcmalloc. I will provide an update when I have better measurement from our production servers. Regards, Ali Pey On Wed, Feb 25, 2015 at 11:25 AM, Michael Jerris <mike@jerris.com> wrote:
We make fairly heavy use of memory pools, which probably reduce malloc. I suspect that using them is of little benefit but would be interested to hear to the contrary.
On Feb 24, 2015, at 2:15 PM, Tamas Jalsovszky <jalsot@gmail.com> wrote:
Great idea. Do you have any evidence whether other malloc libs (tcmalloc, jemalloc) gives better performance over glibc ones?
T.
On Wed, Feb 18, 2015 at 5:13 PM, Brian West <brian@freeswitch.org> wrote:
The webpage for TCMalloc states:
You can use tcmalloc in applications you didn't compile yourself, by using LD_PRELOAD:
$ LD_PRELOAD="/usr/lib/libtcmalloc.so" blahblah
On Wed, Feb 18, 2015 at 9:59 AM, Ali Pey <alipey@gmail.com> wrote:
Hello,
Is there a way to switch to TCMalloc without recompiling freeswitch?
Can someone please point me to (or provide) some instructions? (Preferably for Centos 6)
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Where are you running on where malloc and calloc were locking up a thread and killing the CPU? On Wed, Feb 25, 2015 at 2:49 PM, Ali Pey <alipey@gmail.com> wrote:
We haven't measured the effect in Production yet, but in the lab, it made a big difference.
The main problem that tcmalloc fixed for us was the threads locking on malloc and calloc and killing the CPU. I strongly recommend tcmalloc. In low traffic, it won't make a big difference, but in high traffic, you definitely need tcmalloc.
I will provide an update when I have better measurement from our production servers.
Regards, Ali Pey
On Wed, Feb 25, 2015 at 11:25 AM, Michael Jerris <mike@jerris.com> wrote:
We make fairly heavy use of memory pools, which probably reduce malloc. I suspect that using them is of little benefit but would be interested to hear to the contrary.
On Feb 24, 2015, at 2:15 PM, Tamas Jalsovszky <jalsot@gmail.com> wrote:
Great idea. Do you have any evidence whether other malloc libs (tcmalloc, jemalloc) gives better performance over glibc ones?
T.
On Wed, Feb 18, 2015 at 5:13 PM, Brian West <brian@freeswitch.org> wrote:
The webpage for TCMalloc states:
You can use tcmalloc in applications you didn't compile yourself, by using LD_PRELOAD:
$ LD_PRELOAD="/usr/lib/libtcmalloc.so" blahblah
On Wed, Feb 18, 2015 at 9:59 AM, Ali Pey <alipey@gmail.com> wrote:
Hello,
Is there a way to switch to TCMalloc without recompiling freeswitch?
Can someone please point me to (or provide) some instructions? (Preferably for Centos 6)
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- *Brian West* brian@freeswitch.org *Twitter: @FreeSWITCH , @briankwest* http://www.freeswitchbook.com http://www.freeswitchcookbook.com *T:*+19184209001 | *F:*+19184209002 | *M:*+1918424WEST (9378) *iNUM:*+883 5100 1420 9001 | *ISN:*410*543 | *Skype:*briankwest
Brian, We use lots of Perl code and many Perl session in our environment. That's where malloc and calloc were getting locking the thread and would stay there forever until we restarted the freeswitch. On Wed, Feb 25, 2015 at 7:30 PM, Brian West <brian@freeswitch.org> wrote:
Where are you running on where malloc and calloc were locking up a thread and killing the CPU?
On Wed, Feb 25, 2015 at 2:49 PM, Ali Pey <alipey@gmail.com> wrote:
We haven't measured the effect in Production yet, but in the lab, it made a big difference.
The main problem that tcmalloc fixed for us was the threads locking on malloc and calloc and killing the CPU. I strongly recommend tcmalloc. In low traffic, it won't make a big difference, but in high traffic, you definitely need tcmalloc.
I will provide an update when I have better measurement from our production servers.
Regards, Ali Pey
On Wed, Feb 25, 2015 at 11:25 AM, Michael Jerris <mike@jerris.com> wrote:
We make fairly heavy use of memory pools, which probably reduce malloc. I suspect that using them is of little benefit but would be interested to hear to the contrary.
On Feb 24, 2015, at 2:15 PM, Tamas Jalsovszky <jalsot@gmail.com> wrote:
Great idea. Do you have any evidence whether other malloc libs (tcmalloc, jemalloc) gives better performance over glibc ones?
T.
On Wed, Feb 18, 2015 at 5:13 PM, Brian West <brian@freeswitch.org> wrote:
The webpage for TCMalloc states:
You can use tcmalloc in applications you didn't compile yourself, by using LD_PRELOAD:
$ LD_PRELOAD="/usr/lib/libtcmalloc.so" blahblah
On Wed, Feb 18, 2015 at 9:59 AM, Ali Pey <alipey@gmail.com> wrote:
Hello,
Is there a way to switch to TCMalloc without recompiling freeswitch?
Can someone please point me to (or provide) some instructions? (Preferably for Centos 6)
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com <https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=a3119e75-a1a7-443b-a5c9-25359ded6a4d&cm_destination=http://www.freeswitchsolutions.com>
Official FreeSWITCH Sites
<https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=66ed4d09-d7b2-4794-8876-406982ba3dee&cm_destination=http://www.freeswitch.org> http://www.freeswitch.org <https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=1987b5ca-5b20-4f25-8d58-6a6511dc3179&cm_destination=http://www.freeswitch.org> http://confluence.freeswitch.org <https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=da4370d8-e100-4e6e-b9e9-b66549254209&cm_destination=http://confluence.freeswitch.org>
<https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=81dd8dd0-3b29-4d0a-ae7d-3664ec721366&cm_destination=http://www.cluecon.com> http://www.cluecon.com <https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=39f863ad-0043-47e1-8114-64b351a84d4a&cm_destination=http://www.cluecon.com>
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users <https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=129631b9-db2c-43d0-8601-adc10d491893&cm_destination=http://lists.freeswitch.org/mailman/listinfo/freeswitch-users> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users <https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=5f630567-a7d0-4188-96ac-a445a042cfd6&cm_destination=http://lists.freeswitch.org/mailman/options/freeswitch-users>
<https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=a5c9b5df-0abb-4e28-b3b0-71dca9bb36d3&cm_destination=http://www.freeswitch.org> http://www.freeswitch.org <https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=509d0d9f-4cc2-4233-a650-ad8f73b7b1b3&cm_destination=http://www.freeswitch.org>
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com <https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=3996ef0e-1a9e-4a76-b143-dcf4556597d5&cm_destination=http://www.freeswitchsolutions.com>
Official FreeSWITCH Sites
<https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=f018f288-0897-43f7-a9d5-cbaac19b6a46&cm_destination=http://www.freeswitch.org> http://www.freeswitch.org <https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=40340954-2ae9-4455-be6a-96d06c6c0d81&cm_destination=http://www.freeswitch.org> http://confluence.freeswitch.org <https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=b7909780-b663-4a29-ac7f-30514d11098b&cm_destination=http://confluence.freeswitch.org>
<https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=3dcbd381-d749-47f7-97c4-6eea9865fc30&cm_destination=http://www.cluecon.com> http://www.cluecon.com <https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=efd94a0e-4cc5-41f6-afee-4ed23039e753&cm_destination=http://www.cluecon.com>
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users <https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=1fd39132-a0f0-4cf2-8701-99efdbc90674&cm_destination=http://lists.freeswitch.org/mailman/listinfo/freeswitch-users> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users <https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=a751420e-ecd6-472d-9403-aa2eafe16a98&cm_destination=http://lists.freeswitch.org/mailman/options/freeswitch-users>
<https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=fa1d3afe-ae91-4df8-b110-b6c38b8beacb&cm_destination=http://www.freeswitch.org> http://www.freeswitch.org <https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=b99f8833-4f63-45f1-88fc-f801a573802a&cm_destination=http://www.freeswitch.org>
--
*Brian West* brian@freeswitch.org
*Twitter: @FreeSWITCH , @briankwest*
<https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=ffe90a76-16d0-4f0b-8785-d2c339839078&cm_destination=http://www.freeswitchbook.com> http://www.freeswitchbook.com <https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=c845113a-70b1-4120-a6ce-f95dfef87f2e&cm_destination=http://www.freeswitchbook.com> http://www.freeswitchcookbook.com <https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=76507101-9e35-4946-814f-cc54a15eaa82&cm_destination=http://www.freeswitchcookbook.com>
*T:*+19184209001 | *F:*+19184209002 | *M:*+1918424WEST (9378) *iNUM:*+883 5100 1420 9001 | *ISN:*410*543 | *Skype:*briankwest
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com <https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=3a341221-b281-402a-8695-53955058e0b1&cm_destination=http://www.freeswitchsolutions.com>
Official FreeSWITCH Sites
<https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=ee80da07-f61c-4a2f-bb5a-83102f12ee79&cm_destination=http://www.freeswitch.org> http://www.freeswitch.org <https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=b92b5efb-19e1-4d64-ad43-8c332578cbb8&cm_destination=http://www.freeswitch.org> http://confluence.freeswitch.org <https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=d649a237-2f5a-4305-b84f-a2d443cb01a7&cm_destination=http://confluence.freeswitch.org>
<https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=7cd1109e-be37-4da8-87fa-1799d6ef15fb&cm_destination=http://www.cluecon.com> http://www.cluecon.com <https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=c4bed819-9b08-406c-b561-a7a3b3ff648f&cm_destination=http://www.cluecon.com>
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users <https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=34d0865a-ca8b-409d-9595-43a0e1b70f5a&cm_destination=http://lists.freeswitch.org/mailman/listinfo/freeswitch-users> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users <https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=7cf6b859-392a-42c9-8f7c-bd43e2ff8503&cm_destination=http://lists.freeswitch.org/mailman/options/freeswitch-users>
<https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=b2d360bb-68b0-446d-ad18-0fcb670a27a7&cm_destination=http://www.freeswitch.org> http://www.freeswitch.org <https://contactmonkey.com/api/v1/tracker?cm_session=4878e607-23bf-4d16-91f2-d04e6e6dcf22&cm_type=link&cm_link=dd8c2c99-c313-4455-b93d-5783a837253e&cm_destination=http://www.freeswitch.org>
participants (4)
-
Ali Pey
-
Brian West
-
Michael Jerris
-
Tamas Jalsovszky