On 04/16/2012 04:49 PM, Yarden Sachs wrote:
Sure,

I experienced unknown performance issues(slow responses) when high
traffic would hit that site.
>
so, started to test what happens if i hit the web site with a big
calculation, like len function on an 9k objects. when i try to do it
from client, it takes 0.7 secs to come back with response, if try to
do it from 10 parralel client, it takes 15 secs for one http
response!

If you're using MyISAM tables, that's a big performance killer. Every new or expired session is going to get an exclusive table lock on the session table. That will block reads for everyone else until the new row is inserted. In the meantime, Apache is either forking and spawning new threads, and you're creating more MySQL connections, which in turn is consuming more RAM. Eventually, you'll run out of RAM and start hitting swap/virtual memory. That only makes things worse. You have a contrived, long-running query that only exacerbates the problem because while that query is running, inserts or updates have to wait. All you've proved is that you can create a cascade effect, which is hardly surprising.

my team member, tried to find out the problem, and his conclusion is
- python+django is not fast. and i DONT like that. its not right!

I don't see how you can jump to that conclusion based on the evidence you presented. Django powers some very busy sites on quite modest hardware comparatively speaking but Django isn't going to make inefficient code or poor architectural choices, like MyISAM tables, magically better. You need to do some real profiling, not some contrived test that proves that running slow queries is, well... slow.
--
Regards,

Clifford Ilkay
Dinamis
1419-3230 Yonge St.
Toronto, ON
Canada  M4N 3P6

<http://dinamis.com>
+1 416-410-3326

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to