Jemalloc on Gramine #1825
ila
started this conversation in
Performance discussions
Replies: 1 comment 9 replies
-
Could you try running it under a profiler and compare the traces with jemalloc and without? See https://gramine.readthedocs.io/en/latest/performance.html#profiling-with-perf. |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, we finally managed to obtain good OLAP performance on SGX2 with Gramine. I am happy to announce that we get maximum 2x overhead with medium-sized, memory-intensive workloads (TPC-H): this is thanks to careful configuration of Gramine and our application, NUMA pinning and hardware-optimized instructions.
However, there is one last thing we cannot explain fully: the performance of jemalloc (https://jemalloc.net/) in Gramine is terrible (16x overhead), we had to remove it. We are working under the condition that
data size < enclave size < EPC size
, to minimize page swapping. So, we can (probably?) exclude spilling.What could the cause be? As far as I can tell, jemalloc is specifically designed to avoid fragmentation (one of the enemies of SGX too). Yet, we see the opposite behaviour. Is this because Gramine does not implement its own jemalloc? Could it be that malloc is more optimized in Gramine? Or do you have any other idea? Logs aren't much useful here. Any input would be appreciated!
Beta Was this translation helpful? Give feedback.
All reactions