Sridhar Vembu, CEO of Zoho corporation, is a great inspiration for several engineers and entrepreneurs. Starting from a humble beginning, how he has built one of the largest SaaS businesses is an eye-opening journey for all of us. I was pleasantly surprised to read his interesting tweet on garbage collection, since optimizing automatic Garbage Collection impacts is a journey that I have been pursuing all these years through our GC tuning product GCeasy. Below is his tweet:

Shridhar Vembu’s tweet about Automatic Garbage Collection


Sridhar Vembu, cites that avoiding automatic garbage collection would save at least $5 billion/year in his conservative estimate. We totally agree with his point of view. Why does he say it? Why does removing garbage collection result in so much savings? Let’s explore it.

Why is money wasted due to garbage collection?

Application’s memory is a finite space. You can allocate 5gb or 50gb or even 500gb memory to your application. Still, it’s a finite space. When a new request comes to your application, to service that request, objects are created in the memory. Once the request is serviced, objects that were created in the memory to service the request will become garbage. Since there are no longer active references to these objects. They must be evicted from the memory to make room to service the new incoming requests. 3, 4 decades back this eviction of unreferenced objects was done programmatically by the developers. However, in all the modern programming languages, it’s done by automatic garbage collection algorithms that are present in the language runtime environment. 

To reclaim these unreferenced objects, automatic Garbage Collection algorithms pause your application, so that it will know what the active objects are and who aren’t. When the garbage collection algorithm pauses the application, no customer transactions are processed during that period. These pause times are typically in a few hundred milliseconds or few seconds. However, in a 24-hour day, an active application might pause thousands of times to reclaim the unreferenced objects. These pause times will quickly add up to a huge sum of inactive windows. These pause times cause poor response time and unnecessary cloud hosting bills. Here is a blog post that I posted back in 2021, highlighting how many millions of dollars each enterprise are wasting due to automatic garbage collection.

Uber reducing computing cost

Uber, the largest car sharing application, achieved a huge cost saving in their cloud computing performance, by tuning their Garbage Collection performance. They were able to save 70K Cores CPU across 30 Mission-Critical Services by doing Go GC Tuning. More details about this success story can be found here.

Automobile company improves response time

By optimizing your GC performance, you are not only reducing computing costs, your application’s overall response time also significantly improves. Here is a case study of a very large automobile manufacturer, who was able to improve its middleware’s response time by Garbage Collection tuning.

How to tune GC performance?

Tuning GC Performance is not rocket science. It’s mostly common sense. It can be achieved without making risky code refactoring, invasive architectural changes, or expensive infrastructural changes. GC tuning involves only changing a few arguments to your application. It’s the least risky strategy to improve your overall application’s performance and reduce cloud computing costs. Here is an easy introduction video on GC tuning. You may enroll in this online JVM performance & troubleshooting master class to learn more about GC tuning.