[python-win32] Pythonservice.exe running at 100%

David Rock David Rock <david@rock.homelinux.com>
Tue, 19 Mar 2002 23:03:48 -0600


On Wed, Mar 20, 2002 at 11:08:02AM +1100, Mark Hammond wrote:
> [David]
> > 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.
> 
> I guess there are 2 possibilities:
> * Something else is also hogging the CPU.
> * There is issue when running under the service account.
> 
> If you debug your service (ie, yourservice.py --debug) do you see the same
> behaviour?

When I debug the service, it behaves like the standalone app does;
actually, it behaves better. The system resources spike to 100% but
don't stay there, and the number of loops per second is similar to the
standalone version.

So what does this mean? I don't see any indication that anything is
hogging the CPU while in debug mode. Should I create a test account to
try running the service under to see if that makes a difference?

I did notice that python.exe is running while in debug mode as well as
pythonservice.exe. I assume this is because it's actually calling the
console version of python?

-- 
David Rock
david@rock.homelinux.com