At Glo, we're always on the lookout for practical ways to make Odoo better, faster, more efficient, and more enjoyable to use.
One recent experiment we’ve been quietly excited about involves something called mimalloc, a modern memory allocator developed by Microsoft.
Don’t worry if that sounds technical - it is - but the benefits are clear and surprisingly tangible.
What is a memory allocator and why mimalloc?
When a program runs, it frequently needs to request and release chunks of memory from the operating system. A memory allocator is the component responsible for managing these requests - deciding where in the computer's RAM each piece of data should go, and cleaning up when that data is no longer needed.
Python comes with it's own memory allocators. And whilst perfectly functional, these defaults may not be optimised for every workload.
mimalloc is a modern, high-performance alternative developed by Microsoft Research with a focus on:
- Speed: mimalloc is built for fast allocation and release of memory, which can reduce latency spikes when your application is under load.
- Low Overhead: It tends to use less overhead for bookkeeping, freeing up more memory for your actual data.
- Fragmentation Reduction: mimalloc’s algorithms help minimize memory fragmentation, so your memory use stays flatter and more predictable over time.
Is it any wonder that we were interested?
(While newer versions of Python include mimalloc as an non-default option at time of writing, we always prioritise stability - so we typically run Odoo using the stable version of Python that was current when that Odoo version was released, avoiding problems like odoo/odoo#59456.)
The results so far
It's very early days; we’re still gathering a lot of data and running this setup on our own systems before rolling it out to customers.
But provisionally, we’re very excited about what this could mean for running Odoo in leaner, more cost-effective environments.
In our internal tests, we’ve seen Odoo use 20-40% less memory over several days (depending on installation and load), with fewer spikes and dips, without any percievable impact so far.
This helps keep things running smoothly under pressure and even gives Odoo a slightly snappier feel - pages load with less delay (ingress latency (the time it takes to respond to a request) is a little lower), helping keep the user experience consistent.
Just swapping out the memory allocator is absolutely not a silver bullet, and may actually decrease performance under some workloads - but in our internal tests it is working for us.
Why does this matter? Hardware is cheap!
RAM is cheap, but it's not really about RAM. Although if you've seen our Azure bill you might disagree (more on that in a future episode).
As far as we know, no one else in the Odoo space is experimenting with mimalloc in this way. It’s a small example of how we like to dig a little deeper - exploring the technical foundations to find smart improvements that can have a big impact.
If we can do any small thing to improve the responsiveness of Odoo, and reduce our carbon footprint, then we're interested.
If your business has complex or demanding Odoo requirements, it helps to have a partner who not only understands Odoo, but the infrastructure it depends on.
That’s where Glo shines.