[python-win32] Pythonservice.exe running at 100%
David Rock
David Rock <david@rock.homelinux.com>
Tue, 19 Mar 2002 13:52:53 -0600
On Tue, Mar 19, 2002 at 11:10:36AM -0700, Jim Vickroy wrote:
> David, have you tried running your application as a process (not a MS Windows
> Service)? Specifically, have you "unit tested" the "run_test" and "send_results"
> methods to see if they exhibit the same behavior in isolation?
>
> I have many (more than 10) MS Windows Services (implemented in Python) running in
> parallel and have never observed this behavior either.
>
I have a standalone version of the script that does the same thing. It
seems to be the run_test module that is in question. This module creates
a temp file and rewrites data to the file loop number of times. If I use
the script version of it, loop=1000 takes about 1 second to complete If
I use the service version of it loop=25 takes about 1 second. In either
case, if the loop value is large enough (to see it in the task manager),
the process still pegs the cpu at 100% when it is running.
So to answer your question, running it standalone has the same cpu
problem as running it as a service does. However, this brings up another
question of why running as a service is so much slower than running it
standalone?
Thanks.
--
David Rock
david@rock.homelinux.com