Re: [PATCH] trace-cruncher: Add API to set tracing CPU affinity

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 11 Jan 2022 16:38:01 +0200
Yordan Karadzhov <y.karadz@xxxxxxxxx> wrote:

> Hmm, I am not 100% sure, but I still think this is the case.
> In your link, if you go down a bit you have
> 
> "If you’re not sure if you want to use Python threading, asyncio, or multiprocessing, then you can check out Speed Up 
> Your Python Program With Concurrency."
> 
> where " Speed Up Your Python Program With Concurrency" is a link to here:
> https://realpython.com/python-concurrency/
> 
> and here if you scroll down to the first table, you will see that multiprocessing is the only real way to run Python on 
> multiple CPUs.
> 
> You can have a look also here
> https://docs.python.org/3/library/threading.html
> 
> "In CPython, due to the Global Interpreter Lock, only one thread can execute Python code at once (even though certain 
> performance-oriented libraries might overcome this limitation). If you want your application to make better use of the 
> computational resources of multi-core machines, you are advised to use multiprocessing or 
> concurrent.futures.ProcessPoolExecutor. However, threading is still an appropriate model if you want to run multiple 
> I/O-bound tasks simultaneously."

Well, it doesn't affect the API so we can always change it in the future.

-- Steve



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux