Home / Companies / Zapier / Blog / Post Details
Content Deep Dive

Decreasing RAM Usage by 40% Using jemalloc with Python & Celery

Blog post from Zapier

Post Details
Company
Date Published
Author
Bryan Helmig
Word Count
331
Company Posts That Month
18
Language
English
Hacker News Points
-
Summary

At Zapier, the team faced challenges with high RAM usage and swap memory when running hundreds of Python and Celery instances to handle extensive tasks, which impeded hardware upgrades due to the lack of faster instance store support over EBS. The memory issue, suspected to be caused by fragmentation, led them to experiment with jemalloc, a memory allocator known for handling fragmentation effectively, as seen in Redis. After implementing jemalloc versions 3.5.1 and 5.0.1, they observed a significant reduction in RAM usage, with a 30% decrease using jemalloc 3.5.1 and a 40% decrease using jemalloc 5.0.1, compared to the original setup. Although the precise reasons for this improvement are unclear, the results suggest that jemalloc's ability to reclaim fragmented memory contributed to the enhanced efficiency of their systems.

Trends Found in this Post

No tracked trend matches for this post yet.