-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Sours, Kevin wrote:
Four: the idea is to split up the processes so that their threads make best use of the available CPUs. Python's global interpreter lock makes using more than one CPU within a single process problematic.
In the multiprocess setup, is it better to run a single thread per process or multiple threads? Seems like multiple threads would still prevent long running requests from tying up a processor, but the overhead may not be worth it. I haven't had a change to do any testing, so I was wondering if there was a concensus.
I would still go with multiple threads, for the cases where the application *does* release the GIL (e.g., making a call to a relational database, etc.) The tradeoff is that you hit the ceiling on RAM faster with more threads, so if your system is RAM-constrained, you should perhaps consider reducing the number of threads. Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIKx3h+gerLs4ltQ4RAmiNAJ98AhMS8+pyi3p0xOjOVMVczxQGeACguaIE NdL21l8nX3Y3NsKyNZevJxU= =Z6LP -----END PGP SIGNATURE-----