[Twisted-Python] Spawning processes and multiple CPU's.
I'm using reactor.spawnProcess to perform some inherently-blocking code (imagemagick scripts). I'm curious if multiple CPU's would help me out. I know that a single python (and therefore a single reactor) cannot benefit from multiple CPU's, but since the spawn process is a kernel call, will it be sent to both processors? Thanks.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The invocation of an imagemagick process is certainly a candidate for the kernel to put on a different CPU. Indeed, that's one of the biggest advantages of using spawnProcess instead of (well, lots of other things). C Matt Feifarek wrote: | I'm using reactor.spawnProcess to perform some inherently-blocking | code (imagemagick scripts). | | I'm curious if multiple CPU's would help me out. I know that a single | python (and therefore a single reactor) cannot benefit from multiple | CPU's, but since the spawn process is a kernel call, will it be sent | to both processors? | | Thanks. | | _______________________________________________ | Twisted-Python mailing list | Twisted-Python@twistedmatrix.com | http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBNhgD3A5SrXAiHQcRAjWgAJ0R0rgaMRMGMKXKwUgjdS+dYKUozwCgho1c aKEAcIv0yCee3dv/2IzHvPo= =K95F -----END PGP SIGNATURE-----
Yes, I agree that it's a candidate. Does it work that way?
Does spawnProcess take advantage of multiple CPU's?
On Wed, 01 Sep 2004 11:42:11 -0700, Cory Dodt
The invocation of an imagemagick process is certainly a candidate for the kernel to put on a different CPU. Indeed, that's one of the biggest advantages of using spawnProcess instead of (well, lots of other things).
C
Matt Feifarek wrote:
| I'm using reactor.spawnProcess to perform some inherently-blocking
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Basically, Twisted can't guarantee that the kernel will use both CPU's. But
if the CPU would normally put the process on the other CPU, then it will.
That you're using spawnProcess to start the process doesn't make any difference.
C
Matt Feifarek wrote:
| Yes, I agree that it's a candidate. Does it work that way?
|
| Does spawnProcess take advantage of multiple CPU's?
|
| On Wed, 01 Sep 2004 11:42:11 -0700, Cory Dodt
|
participants (2)
-
Cory Dodt
-
Matt Feifarek