--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Install Django debug toolbar and have a look at what's wrong with your application.
My numbers are very different from yours.
I just ran some tests and I am around 350 req/s with 4 sql queries.
I'm a on dual core (4 virtual cores), using gunicorn/mysql with debug turned off, 4 workers processes
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 (be patient)
Completed 500 requests
Completed 1000 requests
Completed 1500 requests
Completed 2000 requests
Completed 2500 requests
Completed 3000 requests
Completed 3500 requests
Completed 4000 requests
Completed 4500 requests
Completed 5000 requests
Finished 5000 requests
Server Software: gunicorn/0.12.2
Server Hostname: 127.0.0.1
Server Port: 8088
Document Path: /project/1/
Document Length: 4327 bytes
Concurrency Level: 4
Time taken for tests: 14.041 seconds
Complete requests: 5000
Failed requests: 0
Write errors: 0
Total transferred: 22405000 bytes
HTML transferred: 21635000 bytes
Requests per second: 356.10 [#/sec] (mean)
Time per request: 11.233 [ms] (mean)
Time per request: 2.808 [ms] (mean, across all concurrent requests)
Transfer rate: 1558.29 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 1
Processing: 10 11 3.5 11 73
Waiting: 10 11 3.5 10 73
Total: 10 11 3.5 11 73
Percentage of the requests served within a certain time (ms)
50% 11
66% 11
75% 11
80% 11
90% 11
95% 12
98% 14
99% 23
100% 73 (longest request)
Maybe there's something wrong with the queries you perform. Django's ORM is know for it's 'hidden execution' of queries. Some more insight in your querying code might be useful.
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to django-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
>
Jonas Geiregat
jo...@geiregat.org
Is there anyway you can upload the project to bitbucket or github ?
Regards,
Xavier.
or like the facebook guys write C in php.
--
regards
KG
http://lawgon.livejournal.com
Coimbatore LUG rox
http://ilugcbe.techstud.org/
I would choose the framework, that you like. You can optimize later. And
this would be the same for all frameworks: You need a good cache strategy.
Are you expecting several hundred requests per minute?
I guess there is something wrong with your benchmark. I don't think django/python
is much slower.
Thomas
On 06.07.2011 01:31, drakkan wrote:
> Hi,
>
> thanks for your comments, I installed django-debug toolbar and I can
> confirm I'm doing similar queries from both django and play. The query
> I do with hibernate in play should be slower since I'm doing a left
> outer join while django do an inner join, since the field on which I
> join cannot be null.
--
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de
Please send the link. Just because you can't see anything wrong with
the code, doesn't mean there isn't anything wrong with it. Likely, you
are doing something wrong which eats up the performance but without
seeing the source, one can only speculate on what that may be. Your
"simple" app aren't as simple as you think it is.
There are dozens of similar threads created on the python related
mailing lists each year. In some cases python is slower than language
X, in other cases it is faster (because much of the core is
implemented in C, for example) other times it does not matter because
the task is IO bound anyway.
--
mvh/best regards Björn Lindqvist
http://www.footballexperts.net/
The best way to check where your performance problems come from is
using profiling.
In my experience, the most likely things to cause you performance
problems in Django are database queries and template rendering. If
template rendering is a problem for you, try Jinja2. Depending on the
complexness of your template this can give you up to 10x performance
gains. Jinja2 template language is almost like Django's. There are
minor differences which can be annoying if you use both template
engines at the same time.
On 06.07.2011 15:33, drakkan wrote:
> On 6 Lug, 14:03, akaariai <akaar...@gmail.com> wrote:
>> On Jul 5, 10:54 pm, drakkan <drakkan1...@gmail.com> wrote:
...
> using pgpool I get a 2,5x performance improvement thanks! I'll try on
> intel atom again to see if there I have more improvements
Hi,
I am interessted in the result. Please post them to the list.
Thomas
--
Thomas Guettler, http://www.thomas-guettler.de/
Trying jinja2 in your project is hard - you are using some template
tags, and you would need to port them to jinja2. Then you would need
to rewrite your templates so that they work under jinja2. This would
take some time for sure.
What you could do is check out the profiler suggested in this thread.
Jinja2 is generally somewhere from 5x to 10x faster that Django
templates. So if you can see that half of your time is spent in
template rendering, then you could probably almost double the speed of
your application using Jinja2. If you don't want to do that, you can
check how fast your code is without any template rendering: just
return HttpResponse("") from your view. But remember to evaluate your
queries, querysets are evaluated only on access. This will give you
some clue how much Jinja2 would benefit you.