[Python] Do Multiple Python Programs Use Different Cpu Cores?

Discussão em 'Python' iniciado por Stack, Fevereiro 22, 2025.

  1. Stack

    Stack Membro Participativo

    I have a question regarding Python and load balancing. Consider a virtual machine with 16 virtual cpu cores and single Python Rest-Service wrapped in Docker. I suppose it only is going to use one virtual core instead of the 16 when run.

    Now consider 8 duplicates of the Python Rest-Service run in a docker compose parallel behind a load balancer (upstream). Do they use 8 of the 16 cores? And if so how do they know which one to use?

    Also do the virtual cores make any difference, what about a real system with real 16 cores?

    If anyone has any experience or knowledge I would be happy if you could share it.

    Thank you!

    Continue reading...

Compartilhe esta Página