Disabling Garbage Collection helped Instagram save money and get better performance

Sdílet
Vložit
  • čas přidán 7. 09. 2024
  • System Design for SDE-2 and above: arpitbhayani.m...
    System Design for Beginners: arpitbhayani.m...
    Redis Internals: arpitbhayani.m...
    Build Your Own Redis / DNS / BitTorrent / SQLite - with CodeCrafters.
    Sign up and get 40% off - app.codecrafte...
    In this video, we delved into Instagram's 2017 blog post discussing their optimization strategy of dismissing Python garbage collection. By disabling this feature, they achieved a 10% efficiency boost, translating to significant cost savings at scale. The blog highlighted Instagram's use of Django in a multiprocess mode to maximize hardware utilization, alongside techniques like "copy on write" and memory management strategies. However, their initial theory regarding ref counts on code objects was debunked through practical experimentation, emphasizing the importance of validating assumptions before implementation.
    Recommended videos and playlists
    If you liked this video, you will find the following videos and playlists helpful
    System Design: • PostgreSQL connection ...
    Designing Microservices: • Advantages of adopting...
    Database Engineering: • How nested loop, hash,...
    Concurrency In-depth: • How to write efficient...
    Research paper dissections: • The Google File System...
    Outage Dissections: • Dissecting GitHub Outa...
    Hash Table Internals: • Internal Structure of ...
    Bittorrent Internals: • Introduction to BitTor...
    Things you will find amusing
    Knowledge Base: arpitbhayani.m...
    Bookshelf: arpitbhayani.m...
    Papershelf: arpitbhayani.m...
    Other socials
    I keep writing and sharing my practical experience and learnings every day, so if you resonate then follow along. I keep it no fluff.
    LinkedIn: / arpitbhayani
    Twitter: / arpit_bhayani
    Weekly Newsletter: arpit.substack...
    Thank you for watching and supporting! it means a ton.
    I am on a mission to bring out the best engineering stories from around the world and make you all fall in
    love with engineering. If you resonate with this then follow along, I always keep it no-fluff.

Komentáře • 28

  • @amitrastogi1405
    @amitrastogi1405 Před 10 měsíci +6

    Awesome blog and step by step approach for solving the problem. Thanks for covering this Arpit!

  • @LeoLeo-nx5gi
    @LeoLeo-nx5gi Před 10 měsíci +3

    This is truly amazing, and trust me if I was to read this blog alone would have just stopped it after few paras but when you explained man!!! things were so so clear.
    Thank you so much!!

  • @NabajyotiBorah-x7p
    @NabajyotiBorah-x7p Před 2 měsíci +1

    to all those managers and clients who think for just two lines of code why you need this much time and money, look here it is about the experience of the person you pay for, not code lines, because they know the internals after working for so many years how the code works

  • @user-xf7yg5ci3t
    @user-xf7yg5ci3t Před 10 měsíci +2

    Awesome! It was thriller movie with a lot of twists and turns! Thank you so much for the explanation!

  • @ankit-jangid
    @ankit-jangid Před 4 měsíci

    there are really good blogs are out there. But Arpit you put efforts to explain and do deeper with all the details and in very simple way that really helps alot to engage and generate interest in engineering. as real engineering is figuring out the solutions and improvements which you deliver at best. thank you for your efforts !!

  • @achyuthreddyi
    @achyuthreddyi Před 10 měsíci +1

    amazing !!!. Thank you for this series and this giving us a lot of curiosity to dig deeper into the internals

  • @trendinginsaan1285
    @trendinginsaan1285 Před 8 měsíci

    In just a couple of minutes, my brain is filled with dopamine.
    really respected video

  • @chinmayagrawal
    @chinmayagrawal Před 10 měsíci +1

    37:32 I believe sandybridge processors are the intel 2nd gen processors which were built on 32nm microarchitecture(launched in 2011)
    If in case anyone thinks Instagram using 12 years old CPU, then this blog is written in jan 2017, so at that time that cpus are just 6 years old

  • @sharinganuser1539
    @sharinganuser1539 Před 4 měsíci

    Now it makes sense...thanks a ton...I have been trying to understand that ...

  • @NabajyotiBorah-x7p
    @NabajyotiBorah-x7p Před 2 měsíci

    Ok, for the f***k sake I have been working in python for 3 years and today I came to know that it only runs on a single thread, fkkkk
    That's why I watch your system design videos to get in in-depth understanding of the language , I hope you create more about python in future

  • @aniketmahangare8333
    @aniketmahangare8333 Před 9 měsíci

    Thank you so much for covering this Arpit.

  • @sum1t_gupta
    @sum1t_gupta Před 6 měsíci

    Thanks for great work man , phenomenal explanation

  • @itsonmylist1247
    @itsonmylist1247 Před 10 měsíci

    Great video would love to see a video on abstraction for writing better and maintainable code

  • @kumarjivi1697
    @kumarjivi1697 Před měsícem

    Maybe it is a naive questions but how did Arpit infer that Instagram must be built around a monolith as soon as he saw that they use Django? Is it only because most startups use django/Python as it is quick to develop with and they end up with a monolith?

  • @zombiebaloon9166
    @zombiebaloon9166 Před 10 měsíci

    Beautifully explained buddy

  • @sanskaragarwal582
    @sanskaragarwal582 Před 3 měsíci

    Brilliant!

  • @AshishKumar-qe4hq
    @AshishKumar-qe4hq Před 10 měsíci

    Best video ever, thanks Arpit

  • @dinakarullas4856
    @dinakarullas4856 Před 5 měsíci

    Loved it!!!

  • @farhanishaq7
    @farhanishaq7 Před 4 měsíci

    Is it possible to recover deleted insta chats bro?

  • @daegu_1
    @daegu_1 Před 10 měsíci

    amazing. thanks for explanating

  • @soniamathew250
    @soniamathew250 Před 6 měsíci

    which mic are you using? if you are fine sharing.

  • @user-zs6bp4qu8j
    @user-zs6bp4qu8j Před 10 měsíci

    Awesome !

  • @AmitSharma-yb9vc
    @AmitSharma-yb9vc Před 9 měsíci

    Thanks for the video, I started binge watching your youtube videos.
    One request, Please don't use subtitles like this, I found them pretty disturbing.

    • @AsliEngineering
      @AsliEngineering  Před 9 měsíci +1

      I have been experimenting lately and seeing what works and what doesn't.