[TriZPUG] Slow networking to localhost

Josh Johnson josh_johnson at unc.edu
Fri Jul 30 18:52:03 CEST 2010


If you could post the config files, and routing setup that would help a lot.
Maybe you're just missing something simple in the config/routing that
somebody else might catch.

JJ  

-----Original Message-----
From: trizpug-bounces+josh_johnson=unc.edu at python.org
[mailto:trizpug-bounces+josh_johnson=unc.edu at python.org] On Behalf Of Joseph
Tate
Sent: Friday, July 30, 2010 12:44 PM
To: Triangle (North Carolina) Zope and Python Users Group
Subject: Re: [TriZPUG] Slow networking to localhost

It's a wsgi app using pylons.  The app, and the customization module
are both installed in a single virtenv, but the customized version has
a different config file, slightly different routing and different
data.  The main app is made up of about 10 namespaced modules, the
customized version isn't monkey patching anything, but rather adds on
an additional module, has its own middleware setup and so forth.  I
diffed the config and middleware and I didn't see anything that made
sense.  All the packages are installed via setup.py develop.

What I profiled was the paster process, so you may be right on select
being a red herring (multiple threads waiting on a socket, etc.)  The
really confusing part though is it's the request round trip that's
slower, not (just) the data lookups.  Each static file is served 5
times slower in the customized config than was happening with the base
config.  As far as I can tell, the middleware and static file serving
is configured the same for both apps.  The only thing I can think of
would be if we're somehow double stacking the middleware.

On Fri, Jul 30, 2010 at 8:10 AM, Josh Johnson <josh_johnson at unc.edu> wrote:
> It's hard to tell what might be going on without any real information
about
> what the web app is, what it does, what modules it uses, any frameworks,
> etc.
>
> Are you talking about installing the two versions of the web app (I'm
> assuming it's an egg? If not how is it installed?) in the same virtualenv,
> or two different virtualenvs that you think are set up the same way?
>
> Also, when you say "customized install" what does that mean? Is the
> installation customized, or is the web app customized?
>
> More information would really help, but my approach to an issue like this
is
> to focus on the differences. A simple diff of the code might make the
> problem stand out. The cProfiler result may be a red herring, but you may
> want to check for any known bugs in python or your OS relating to it,
given
> the nature of the select module.
>
> JJ
>
> -----Original Message-----
> From: trizpug-bounces+josh_johnson=unc.edu at python.org
> [mailto:trizpug-bounces+josh_johnson=unc.edu at python.org] On Behalf Of
Joseph
> Tate
> Sent: Friday, July 30, 2010 2:04 AM
> To: Triangle (North Carolina) Zope and Python Users Group
> Subject: [TriZPUG] Slow networking to localhost
>
> I'm running into a weird networking issue with one of my web apps.  We
> have a baseline install and a customized install.  The customized
> install takes about 5 times longer to load a page than the base
> install does when running from the same virtualenv on the same
> hardware and using the same browser to the app running on localhost.
> According to cProfiler, for the slow install, 91.56% of the time is
> being spent in "select.select".  Strace shows that the select method
> is timing out multiple times, as if the traffic between the browser
> and my app is stalling.  Any ideas on what to check next?
>
> --
> Joseph Tate
> Personal e-mail: jtate AT dragonstrider DOT com
> Web: http://www.dragonstrider.com
> _______________________________________________
> TriZPUG mailing list
> TriZPUG at python.org
> http://mail.python.org/mailman/listinfo/trizpug
> http://trizpug.org is the Triangle Zope and Python Users Group
>
>
> _______________________________________________
> TriZPUG mailing list
> TriZPUG at python.org
> http://mail.python.org/mailman/listinfo/trizpug
> http://trizpug.org is the Triangle Zope and Python Users Group
>



-- 
Joseph Tate
Personal e-mail: jtate AT dragonstrider DOT com
Web: http://www.dragonstrider.com
_______________________________________________
TriZPUG mailing list
TriZPUG at python.org
http://mail.python.org/mailman/listinfo/trizpug
http://trizpug.org is the Triangle Zope and Python Users Group




More information about the TriZPUG mailing list