I’m building a scientific application in Python and considering using Amazon EC2 to run the process on.
My application is both memory and CPU hungry and would benefit from any resources given to it.
An Extra Large Instance of EC2 gives about 15GB of memory, along with 8 compute units.
My question is, can a single Python script (when run on EC2) take advantage of all 8 compute units? Or must I run 8 independent processes in order to fully take advantage of the 8 compute units?
Note: in case it matters, I plan on using a Linux instance on EC2.
The 8 “compute units” run across 4 physical processors, so a straightforward script would only be able to use 25% of the available power. However, the Python multiprocessing module allows you to write a single script using multiple processes, potentially taking advantage of all of the “compute units”.