Optimize Performance and Scalability with Parallelism and Concurrency

A session at PyCon US 2012

Thursday 8th March, 2012

9:00am to 12:20pm (PST)

From how the operating system handles your requests through design principles on how to use concurrency and parallelism to optimize your program's performance and scalability. We will cover processes, threads, generators, coroutines, non-blocking IO, and the gevent library.

How processes, threads, coroutines, and non-blocking IO work from the operating system through code implementation and design principles to optimize Python programs. The difference between parallelism and concurrency and when to use each.

The premise is that to make an informed decision you need to know what is happening under the hood. Once you understand the low level functionality, you can make the correct decision in the design phase.

The emphasis is on practical application to solve real world problems.


  • How the operating system handles traps and interrupts
  • Scheduling
  • Processes
  • Threads
  • The GIL
  • Generators
  • What is a coroutine?
  • What is a Python coroutine?
  • Blocking/Non-blocking I/O.
  • Parallelism versus Concurrency
  • How do these work with CPython, Pypy, and Stackless
  • Greenlets and libevent (gevent)
  • Design principles
  • Example networked application
  • Performance results
  • What are other the other options?

About the speaker

This person is speaking at this event.
Robert Hancock

Next session in F2

1:20pm DevOps for Python: Doing More With Less by Noah Kantrowitz

Coverage of this session

Sign in to add slides, notes or videos to this session

Tell your friends!


Time 9:00am12:20pm PST

Date Thu 8th March 2012

Short URL


Official session page


View the schedule



See something wrong?

Report an issue with this session