[ 
https://issues.apache.org/jira/browse/MESOS-7876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16127588#comment-16127588
 ] 

Benno Evers commented on MESOS-7876:
------------------------------------

Spot-checking some of the mesos benchmarks using jemalloc vs. system malloc, I 
can observe a small but consistent speedup from 1% to 6% using jemalloc over 
glibc. There certainly is no indication that switching to jemalloc would lead 
to performance regressions.

With jemalloc:
{code}
[       OK ] 
SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test.DeclineOffers/1 
(575213 ms)
[       OK ] 
SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test.Metrics/1 (1963 ms)
[       OK ] 
SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test.Metrics/10 (18756 
ms)
[       OK ] 
SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test.Metrics/11 (37044 
ms)
[       OK ] 
SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test.Metrics/12 (97298 
ms)
[       OK ] Tasks/SchedulerReconcileTasks_BENCHMARK_Test.SchedulerLibrary/0 
(302 ms)
[       OK ] Tasks/SchedulerReconcileTasks_BENCHMARK_Test.SchedulerLibrary/1 
(2311 ms)
[       OK ] Tasks/SchedulerReconcileTasks_BENCHMARK_Test.SchedulerLibrary/2 
(12104 ms)
{code}

With default malloc:
{code}
[       OK ] 
SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test.DeclineOffers/1 
(610002 ms)
[       OK ] 
SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test.Metrics/1 (2065 ms)
[       OK ] 
SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test.Metrics/10 (20207 
ms)
[       OK ] 
SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test.Metrics/11 (38086 
ms)
[       OK ] 
SlaveAndFrameworkCount/HierarchicalAllocator_BENCHMARK_Test.Metrics/12 (98475 
ms)
[       OK ] Tasks/SchedulerReconcileTasks_BENCHMARK_Test.SchedulerLibrary/0 
(281 ms)
[       OK ] Tasks/SchedulerReconcileTasks_BENCHMARK_Test.SchedulerLibrary/1 
(2448 ms)
[       OK ] Tasks/SchedulerReconcileTasks_BENCHMARK_Test.SchedulerLibrary/2 
(12673 ms)
{code}

> Investigate alternative malloc implementations for mesos
> --------------------------------------------------------
>
>                 Key: MESOS-7876
>                 URL: https://issues.apache.org/jira/browse/MESOS-7876
>             Project: Mesos
>          Issue Type: Improvement
>            Reporter: Benno Evers
>            Assignee: Benno Evers
>         Attachments: jemalloc_benchmark_raw.txt, malloc.cpp, noprof.png, 
> prof.png
>
>
> It is currently very hard to debug memory issues, in particular memory leaks, 
> in mesos.
> An alluring way to improve the situation would be to change the default 
> malloc to jemalloc, which has built-in heap-tracking capabilities.
> However, some care needs to be taken when considering to change such a 
> fundamental part of mesos:
>   * Would such a switch have any adverse impact on performance?
>   * Is it available and will it compile on all our target platforms?
>   * Is the jemalloc-licensing compatible with bundling as third-party library?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to