How CPU Efficient is your App?

Sdílet
Vložit
  • čas přidán 19. 05. 2024
  • Identifying whether an application is CPU or IO bound is important for scaling, we explore this using the top command in Linux in this video.
    0:00 Intro
    2:30 us sy wa id
    10:00 CPU Bound
    12:20 Pressure Stall Information
    14:45 IO Disk Bound
    Discovering Backend Bottlenecks: Unlocking Peak Performance
    performance.husseinnasser.com
    Fundamentals of Backend Engineering Design patterns udemy course (link redirects to udemy with coupon)
    backend.husseinnasser.com
    Fundamentals of Networking for Effective Backends udemy course (link redirects to udemy with coupon)
    network.husseinnasser.com
    Fundamentals of Database Engineering udemy course (link redirects to udemy with coupon)
    database.husseinnasser.com
    Follow me on Medium
    / membership
    Introduction to NGINX (link redirects to udemy with coupon)
    nginx.husseinnasser.com
    Python on the Backend (link redirects to udemy with coupon)
    python.husseinnasser.com
    Become a Member on CZcams
    / @hnasr
    Buy me a coffee if you liked this
    www.buymeacoffee.com/hnasr
    Arabic Software Engineering Channel
    / @husseinnasser
    🔥 Members Only Content
    • Members-only videos
    🏭 Backend Engineering Videos in Order
    backend.husseinnasser.com
    💾 Database Engineering Videos
    • Database Engineering
    🎙️Listen to the Backend Engineering Podcast
    husseinnasser.com/podcast
    Gears and tools used on the Channel (affiliates)
    🖼️ Slides and Thumbnail Design
    Canva
    partner.canva.com/c/2766475/6...
    Stay Awesome,
    Hussein
  • Věda a technologie

Komentáře • 23

  • @hnasr
    @hnasr  Před 6 dny

    Fundamentals of Operating Systems course oscourse.win

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

    Explained beautifully and technically.. hats off to you Hussein

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

    Thank you Hussein for sharing this valuable information

  • @UrvishShah03
    @UrvishShah03 Před 9 měsíci +5

    Thanks!

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

    Oh my god. What I've been looking for recently! 😮

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

    This is amazing... I think even databases like Oracle and Spark track this very well for optimization!

  • @secretsanta3029
    @secretsanta3029 Před 9 měsíci +7

    This also applies to mobile apps, battery drain isn’t looked after in most apps. In my experience JS based mobile apps like cordova, ionic, RN suck battery at crazy rates if not done correctly

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

    Great explanation !! Thanks Hussein.
    One question - As you mentioned "wa" being higher can indicate CPU waiting on disk IO. Is there a similar metric in top or any other standard linux command which can indicate CPU waiting on network?

  • @user-gq9lr7ue2g
    @user-gq9lr7ue2g Před 9 měsíci

    Brilliant !

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

    IO bound vs CPU Bound? considering socket creation & all things that go into making a round trip n/w call like e.g. serialization, copying data from disk to some share mem pool, then to the NIC pool etc...

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

    Thanks 👍🏼

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

    I have to optimize one of our application page which currently use 100% of CPU when only 200 users are on it at the same time. Never done it before 😅 great opportunity to learn about CPU optimizations

  • @MaulikParmar210
    @MaulikParmar210 Před 9 měsíci +4

    Real world apps usually are never starving CPU unless they are computational intensive.
    A lot of data processing software will wait for IO, and as IO speeds up, so do the lower level caches and CPUs that essentially eliminate this scenario.
    If you're churning numbers like in opencl or in image processing pipeline, you're likely to be CPU bound.
    Ideally there's no way to squeeze out 100% cpu in most apps except the compute ones as you will always be waiting for IO, and the system can't do anything about it as whole process is serial operation.
    The closest you get is having an event loop with parallel processing, but implementations are not always ideal for the task. For speeding up compute you will always make compromises with fetching and retiring data which has it's own complexities. With this case, you're better off with spawning lightweight processes and have architectural benefits of higher level stack rather than doing it at a lower level. Again it always depends on context and contexts are not always simple that's why OS scheduler makes sure it uses miltiple strategies and code paths to schedule threads so none gets starved including the one running this scheduler ( even in single core system )

  • @user-ok4fx3kl6f
    @user-ok4fx3kl6f Před 9 měsíci

    How can I check wa metric on mac ? The top command over there does not give all details.Checked activity monitor , it simply shows high CPU load when i do I/O intensive task.

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

    ❤❤❤❤

  • @hnasr
    @hnasr  Před 9 měsíci +2

    My Backend course backend.win

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

      Hehe. Dot win are cheap. Hey. Could you do a review to members about their website or infraestructure? I want somebody with knowldage to tell me what i fucked up in my first website.

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

    Hello bro I am from Pakistan. I am starting new tech career like development I choose to domain iOS and backend which one is good .

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

      Whatever interests you the most. For me it’s backend.

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

      for iOS you need a mac computer with 16 GB ram and 500+ GB storage, I would choose web and backend

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

      Stay with backend, more jobs.

  • @yes-ni1od
    @yes-ni1od Před 9 měsíci +1

    you may aswell just be an AI you just regurgitate information