does commands.getoutput() use nice()?

G

Garry Hodgson

a friend is trying to track down the source of a mysterious
slowdown that's happening in a webware app he's doing.

he's got an external precompiled application that he invokes
from python using commands.getoutput(). usually it runs quickly
(1-2 secs), but sometimes it take much longer (80-90 secs).
he's instrumented the program to verify that it's the query invocation
that's spending all the time. he's run the query in a test rig outside
of python, and it seems to run normally all the time. but when run
from python, via webware, he gets this wide performance variations.

his current hypothesis is that when python runs his command, it
"nices" it down in priority, so it's more susceptible to other load
on the machine. i searched the python source, and don't see anyplace
that appears to do this. but i thought i'd check here anyway.

can anyone support or reject his theory?

thanks
 
S

Steve Holden

Garry said:
a friend is trying to track down the source of a mysterious
slowdown that's happening in a webware app he's doing.

he's got an external precompiled application that he invokes
from python using commands.getoutput(). usually it runs quickly
(1-2 secs), but sometimes it take much longer (80-90 secs).
he's instrumented the program to verify that it's the query invocation
that's spending all the time. he's run the query in a test rig outside
of python, and it seems to run normally all the time. but when run
from python, via webware, he gets this wide performance variations.

his current hypothesis is that when python runs his command, it
"nices" it down in priority, so it's more susceptible to other load
on the machine. i searched the python source, and don't see anyplace
that appears to do this. but i thought i'd check here anyway.

can anyone support or reject his theory?

thanks
Define "sometimes".

It may be webware session cleanup that's hitting him, or some other
phenomenon that only occurs when teh server is relatively heavily loaded.

regards
Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top