Intermittant slow startup

M

Michael Mossey

Runnng python 2.2 on HP-UX, I get intermittant slow startup.
Sometimes python starts up in a small fraction of a second, and
sometimes takes 3-5 seconds. This applies to any script I run, or
just typing 'python' at the prompt.

I also observed something similar on Linux.

Any ideas what would cause *intermittant* slow startup?

-Mike
 
E

Erik Max Francis

Michael said:
Runnng python 2.2 on HP-UX, I get intermittant slow startup.
Sometimes python starts up in a small fraction of a second, and
sometimes takes 3-5 seconds. This applies to any script I run, or
just typing 'python' at the prompt.

I also observed something similar on Linux.

Any ideas what would cause *intermittant* slow startup?

Caching? Is it a long time between invocations that it takes a long
time to start up?
 
M

Michael Mossey

Erik Max Francis said:
Caching? Is it a long time between invocations that it takes a long
time to start up?

It is quite intermittant without much of a pattern I can see. One
thing that is definitely true is that if I start up python several
times in a row one right after the other, some can be slow and some
fast. I just observed it start fast twice, then start slow. I don't
remember if it ever does the other way around but I think it does.

-Mike
 
A

Andrew MacIntyre

It is quite intermittant without much of a pattern I can see. One
thing that is definitely true is that if I start up python several
times in a row one right after the other, some can be slow and some
fast. I just observed it start fast twice, then start slow. I don't
remember if it ever does the other way around but I think it does.

is any resource coming from an NFS mount? or other network source?
 
M

Michael Mossey

Andrew MacIntyre said:
is any resource coming from an NFS mount? or other network source?

I double-checked that and asked the sysadmin to check if the python
build was using any network source. I do have AFS and NFS drives
mounted on this machine, but I'm not reading any python code from them
as nearly as I can tell. PYTHONPATH points only to local disk.

-Mike
 
A

Andrew MacIntyre

I double-checked that and asked the sysadmin to check if the python
build was using any network source. I do have AFS and NFS drives
mounted on this machine, but I'm not reading any python code from them
as nearly as I can tell. PYTHONPATH points only to local disk.

All I can think of is to try using "python -v" and see where in the
startup process the delay appears to be occurring. If the same module is
involved in every stumble, then at least you have a module to investigate.
 
M

Michael Hudson

It is quite intermittant without much of a pattern I can see. One
thing that is definitely true is that if I start up python several
times in a row one right after the other, some can be slow and some
fast. I just observed it start fast twice, then start slow. I don't
remember if it ever does the other way around but I think it does.

Does HP-UX have a version of strace/truss/ktrace?

Cheers,
mwh
 
M

Michael Mossey

Andrew MacIntyre said:
All I can think of is to try using "python -v" and see where in the
startup process the delay appears to be occurring. If the same module is
involved in every stumble, then at least you have a module to investigate.

python -v reveals that the hang is coming before it prints anything. So
what is python doing then? Or is the OS having a problem in loading the
python executable and getting it going? This doesn't seem to happen with
other utilities installed in /usr/local/bin.

-Mike
 
M

Michael Mossey

Yes, it has strace. What do I do with that?

-Mike


Okay, the thousands of people who have dropped everything to work on
this for me, you can go back to what you were doing. ;) My shared
library load path included an AFS directory that wasn't necessary.
When I took that out, it worked fine.

Thanks everyone,
Mike
 

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,755
Messages
2,569,536
Members
45,010
Latest member
MerrillEic

Latest Threads

Top