CPU Usage Windows
Duncan Booth
duncan at NOSPAMrcp.co.uk
Wed Jun 19 06:56:59 EDT 2002
zaka07 at hotmail.com (Rad) wrote in
news:ad381f5b.0206190233.4fa1bf58 at posting.google.com:
> Hi,
>
> I've noticed that when I run Python script on
> Windows 2k Pro
> Dual Intel Xeon (2.2GHz)
> CPU Usage for pythonw.exe is only 50%?!
<snip>
> Is it something to do with python not being able to use the power of
> both processors?
Yes, although if your scripts are suitably threaded, and some time is
being spent outside of Python (reading files/querying databases) I think
you should be able to get some usage above 50%.
If you can run two of your programs at the same time then CPU usage should
go up to about 100%. Running 3 will probably be able to soak up any idle
time still left waiting for disc or network responses. The single processor
limitation only applies within each process.
--
Duncan Booth duncan at rcp.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?
More information about the Python-list
mailing list