Introduction to CPU Scaling
Explore how to scale Python applications by leveraging CPU concurrency techniques like threading and multiprocessing. Understand the challenges and benefits of distributing workloads across multiple CPUs to increase application throughput and performance.
We'll cover the following...
Why CPU scaling?
As CPUs are not getting infinitely faster, using multiple CPUs is the best path towards scalability. That means introducing concurrency and parallelism into your program. This is not an easy task. However, once correctly done, it really does increase the total throughput.
CPU scaling in Python
Python offers two options for spreading your workload across multiple local CPUs: threads or processes. They both come with challenges - some that are not specifically tied to Python, and some that are only relevant to its main implementation, i.e., CPython.