Acquire Thread Lock takes 50% of response time

1,650 views
Skip to first unread message

Austin

unread,
Apr 22, 2012, 1:45:58 PM4/22/12
to Google App Engine
Hi,

I'm using python27 on GAE, and with threadsafe either false or true,
"{method 'acquire' of 'thread.lock' objects}" takes up to 50% of my
response time. Obviously 40s is too long for a web app so I'm trying
to cut it down, and this acquiring of thread locks is the biggest
culprit according to cProfile. (The 1.6M function calls also seems
high but I can't find where they're coming from either...)

Any thoughts you can provide on what I might be doing wrong is
appreciated. I also wonder if it is related to some of the Python 2.7
performance issues at the end of last year (that I thought were
resolved):
* https://code.google.com/p/googleappengine/issues/detail?id=6323
* http://stackoverflow.com/questions/8341112/appengine-performance-degradation-with-python27
* https://groups.google.com/forum/?fromgroups#!topic/google-appengine/jMah6aWfZWg

cProfile Output:

Profile data:
1662549 function calls (1652247 primitive calls) in 39.545
seconds

Ordered by: cumulative time

ncalls tottime percall cumtime percall
filename:lineno(function)
[lines removed]
10816 19.245 0.002 19.245 0.002 {method 'acquire' of
'thread.lock' objects}
[lines removed]

Brian Quinlan

unread,
Apr 23, 2012, 8:36:10 PM4/23/12
to google-a...@googlegroups.com
Hi Austin,

Could you include all of the profile results?

Cheers,
Brian

> --
> You received this message because you are subscribed to the Google Groups "Google App Engine" group.
> To post to this group, send email to google-a...@googlegroups.com.
> To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
>

Reply all
Reply to author
Forward
0 new messages