Is containerization of software applications eco-friendly?


This question was a side-effect of an interesting conversation with my friend.


I got a call from my friend who asked me to help him find a light but spacious suitcase to carry some essential luggage for a vacation.


I got curious and asked him what he wanted to carry. He replied he wanted to take some packs of diapers, some bags of crisps, a bottle of honey, a small wi-fi router, etc. The annoyance is that the suitcase he has right now is much heavier than the total weight of all the items. There is no point in carrying such a heavy suitcase for such a light payload, especially when the airline charges for the luggage.


My immediate but sarcastic response was, "Why that baggage? Why can't you buy all the stuff at the destination? The things that you want to pack are available everywhere. The Wi-fi router is as unnecessary as the other things! I get that these things give convenience and comfort, but won't travel without baggage be more comfortable?"


A moment later, I asked myself, "Should I have responded with the same sarcasm to the Tech lead who had been loudly touting containerization as the de-facto solution for the future since his return from the cloud guys conference?"


Is software application containerization any different from packing baggage in a stylish suitcase?


Can software containerization be harmful to the environment just the way unnecessary baggage is?


Now that I have this burning question, I wanted to find out the answer through an experiment on some of the top container technologies!


The results of my test were astonishing. I used a laptop computer with 16GB of memory and 4 CPU cores for these experiments -?

  1. Multi-threaded program Vs. Multiple instances of containers
  2. Micro-services with regular load balancer and router Vs. Containerized micro-services with ingress controllers and side-car pattern
  3. Multiple web application stacks with the plain old chroot command Vs. Multiple applications in containers


The laptop could run several thousands of threads of a program silently, but for barely ten containers, it heated up like an iron box and sounded like a vacuum cleaner!


I could test 100 microservices when configured with regular routing, service discovery and load balancer. The popular container tool with the side-car and ingress controller made the laptop touch 100% CPU utilization for only four microservices.


With the plain old chroot command, I could spin up fifteen full-fledged web applications, each with its database and little noise from the CPU fan. However, the container software could manage to run only two applications before the laptop became unbearably hot and eerily noisy!


Though it is undeniable that the container software tools provided convenience, the experiments made me wonder if containerization is indeed the bright future.


The tech leads who vociferously advocate containers might have concluded with this sequence of questions -??

  1. Is the container tool trending?
  2. Is the technology being promoted by a giant company?
  3. Is the selection offering convenience in deployment to the cloud?
  4. Is the recommendation solving the problem efficiently?
  5. Is the proposed solution the most eco-friendly option to achieve the desired goal?

Reversing the sequence of these questions may lead to a different conclusion.


Containerization is undoubtedly better than virtual machines or physical hardware units. It offers a lightweight suitcase for carrying the dependencies and configuration required by the software application.


A lightweight suitcase is more convenient than a heavier one.

But why baggage?

Tushar Kapila

Software Architect

2 年

containers are also good to deploy code without having side affects of a secific env. meaing it works on my ubuntu 20.04 but not in 22.04 ... but if there is big over head of power, i would look in to just making sure that use the correct iamge and run many services on that. i prefer a combinaiton of microservices and smaller webapps to solve problems. i see the great uses of microservices but they have their headaches too. so a middle ground is best, with good processes like reviews and such

回复
SRINIVAS SOMASI

administrator at ignou

2 年

Though per se I have no expertise to comment on the discourse, but this thought provoking one examplified in the easy to understand words, I feel should give rise to many young kindled minds explore very future technology towards not only eco-friendly but making Globe much Smaller in terms of ease and pace of information flow and utilisation. Great thoughts Dear Srinivas Gopinath

Yatin Kulkarni

Enabling Digital Transformation across the enterprise via process and technology disruptions.

2 年

Excellent points Srinivas! Having grown up meticulously managing memory allocation on the heap using malloc and dealloc and using semaphores to manage concurrency, I must admit that containers feel like an overkill to guard against poor programming practices. But you seem to have missed out on the need for declarative security that containers have to offer. So while your code might not have any malicious intent, you need to guard against other pieces of code being executed on the same compute resource. This is where the overhead of the container runtime is an acceptable compromise. Maybe, overtime the OS will be codified in to the hardware (in the form of a SoC) and container based virtualisation will be as efficient as the hyper visor running on bare metal. Until then please do keep your laptop adequately cooled!

要查看或添加评论,请登录

Srinivas Gopinath Parimi的更多文章

  • Enterprise Architecture - Clear, Concise and Correct Definition

    Enterprise Architecture - Clear, Concise and Correct Definition

    “Facts are only of value when those are clear, concise, and correct,” says Sherlock Holmes in The Hound of the…

    6 条评论
  • The Fox and the Furious: A Tale of Tenacity, Technology, and Divine Intervention

    The Fox and the Furious: A Tale of Tenacity, Technology, and Divine Intervention

    For the third time in three months, my sleek car had reported the same repeat issue of "ABS malfunction". "It must be a…

    2 条评论
  • Creating Music with AI: A Journey of Creativity and Discovery

    Creating Music with AI: A Journey of Creativity and Discovery

    "Can my flute playing inspire AI to create a new tune?" This idea sparked my experiment of training an AI model to…

  • What next for containers?

    What next for containers?

    It is interesting to see the recent shift away from the idea of 'cloud native containers as the ultimate nirvana for…

    2 条评论
  • Let us Rust!

    Let us Rust!

    The programming language to consider exploring in the year-end holidays Java, Javascript (aka Typescript) and Python…

  • Java 21 Virtual Threads

    Java 21 Virtual Threads

    An introduction using a real-life analogy A clever new way of multi-threading called 'virtual threads' was introduced…

  • Generative AI: How intellectual is it?

    Generative AI: How intellectual is it?

    While a fellow who does not demonstrate the expected level of intelligence is considered stupid, what can be said of AI…

    10 条评论
  • Is containerization of software applications eco-friendly?

    Is containerization of software applications eco-friendly?

    This question was a side-effect of an interesting conversation with my friend. I got a call from my friend who asked me…

    1 条评论
  • Certifications are not Life Lessons!

    Certifications are not Life Lessons!

    It was the summer of 2001. I was the topper of Computer Science & Engineering degree from a prestigious university.

    8 条评论

社区洞察

其他会员也浏览了