Recently, I run a benchmark to compare the performance of a django-cms vs drupal installation. The results were pretty interesting. Let me start by pointing you first to this article I found online, which was the most comprehensive comparison between drupal and django I've seen overall.
I'll summarize here the points of that article, but I'd strongly recommend you to read it, to get the big picture. There are eight different sections in which the author of that article focuses and these are:
- Templating system
- OOP
- MVC/MTV
- ORM
- Learning Curve
- Community Resources
- Security
- Performance
Lets take a look at each one briefly.
Templating system
Django is using a clean inheritance-based templating system which makes it easy to nest templates within templates, use different templates for different parts of the site and to completely eliminate redundancy in template code. In contrast, with Drupal it can be difficult to customize templates.
OOP
Python, by its nature, is an object oriented language and thus is django. PHP in general is not object oriented.
MVC/MTV
Django is using the model-view-controller architecture (which is know as MTV within the django community). MVC is the most widely accepted architecture to build webapps. Drupal follows the PAC (Presentation-Abstraction-Control) model rather than MVC.
ORM
In Django, you have to define your data models that describe the site. All models have datatypes and those are interdependent. From defined data model, database tables are auto-generated, and the system becomes internally “aware” of data relationships. To query your db you use Object Relational Mapper
(ORM). So, rather than writing SQL queries, for django one has to write “querysets” like:
customPage = CustomPages.objects.filter(author='foo')
This way we avoid long error prone SQL queries (both security and development effort advantages). Drupal does not have an ORM.
In this case I'll have to also note that using ORM is not always ideal. Keep in mind that when we use ORM based query, we are not aware of the actual SQL queries that run behind the scenes. So in simple, flat queries ORM is fine, although moving towards more complicated queries, ORM may become a performance headache.
Learning Curve / Language
Drupal is often accused for having a steep learning curve. I would argue that learning django/python is way easier, but probably I am biased towards python, since I am familiar with this language.
Security
It’s true that Drupal has a history of security issues, whereas similar issues in django are extremely rare.
Performance
In this section the article was kind of falling short. So I tried to clear out which is the winner in this case and below are the results of what I found.
Performance Comparison
I run a benchmark of a django-cms vs drupal installation on my laptop. Benchmark used is FunkLoad. Results on the following table are after testing on my laptop, which has 8 cores (2GHz Intel i7), 8G memory. For these tests mod_wsgi is configured to spawn 20 processes. Be aware: by default mod_wsgi is using just one process. Both drupal and django pages tested are pretty simple html pages with minimal content (one 12K css file, no js). Have to note here that the django-cms page included one plugin, which was loading a news item.
Installation | Concurrent Users | RPS (Requests per second) | Response Time |
---|---|---|---|
Django-cms | 50 | 99 | 0.25 |
Drupal | 50 | 111 | 0.23 |
Below you can find more detailed graphs.
Drupal
Concurrent Users
Requests per sec
Django-cms
Concurrent Users
Requests per sec
Results
As you can see from the results, the difference in the performance between those two installations is negligible. Django-cms loads the page with 0.02sec delay, although this is probably related to the fact that the django-cms page included one plugin and on the other hand drupal's page was pretty much empty ("plugin free"). Bottom line is that there is no major difference between the two frameworks performance-wise. So at the end of the day its up to the developer/decision-maker to pick the language of his/her preference and build a CMS with one of the two frameworks. Performance shouldn't be a concern.
References
Drupal works fast on fresh install only. It's impossible to run production site with configured users, content types and modules without advanced caching solutions.
ReplyDeleteWhat about joomla v 1.6 or 1.7? I don't ask about 1.5 because it really sucks...But I still don't know about the performance of the latest versions...
ReplyDeleteNice blog post!
ReplyDeleteUnless I am misreading the graphs, it seems that django suffers from increased response time variance under heavier loads. I would suggest increasing the load to test out that theory but it looks like both configurations peak relatively early (assuming no network or disk I/O) with only ~100 reqs/sec. IMHO that is indicative of some external bottleneck on the system. Are all your cores maxed out during the test? Maybe you are running out of memory and paging too much?
@papercruncher I used loads of 20/40/50 users which is not linear. Thats why graph may look like its slowing down. I could test with more reqs/sec as you suggest and see what happens. Still though testing the limits of each framework wasn't my goal. I just wanted to compare the response times of those two frameworks in "same environments".
ReplyDeleteYour post is a very innovative and good explanation. This details surely will help me and thanks for your sharing with us.
ReplyDeletePega Training in Chennai
Pega Course in Chennai
Linux Training in Chennai
Tableau Training in Chennai
Spark Training in Chennai
Primavera Training in Chennai
Excel Training in Chennai
Corporate Training in Chennai
I wondered upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon.
ReplyDeleteWeb Designing Course in chennai
Web Designing training in chennai
Angularjs Training in Chennai
Selenium Training in Chennai
German Language Course in Chennai
AWS Training in Chennai
Big Data Analytics Courses in Chennai
German Classes in Chennai
Web designing Training in Velachery
Thank you for the informative post. It was thoroughly helpful to me. Keep posting more such articles and enlighten us.
ReplyDeleteWeb Designing Course Training in Chennai | Web Designing Course Training in annanagar | Web Designing Course Training in omr | Web Designing Course Training in porur | Web Designing Course Training in tambaram | Web Designing Course Training in velachery
I know, it is not an easy task to write such a big article in one day, I've tried that and I've failed. But, here you are, trying the big task and finishing it off and getting good comments.
ReplyDeleteIELTS Coaching in chennai
German Classes in Chennai
GRE Coaching Classes in Chennai
TOEFL Coaching in Chennai
spoken english classes in chennai | Communication training
Nice post, I like to read this blog. It is very interesting to read.
ReplyDeletefibonacci series
multilevel inheritance in python
hybrid inheritance in python
palindrome examples
digital marketing executive interview questions and answers for freshers
I read this blog, a Nice article...Thanks for sharing and waiting for the next...
ReplyDeleteSoftware Testing Training in Chennai
Software Testing Course in Chennai
Thanks for sharing this blog. It was so informative.
ReplyDeleteHow to face interview for freshers
How to face interview for fresher
Thanks for sharing this blog. It was so informative.
ReplyDeleteGerman Classes in Chennai
German Language Classes in Chennai
Nice blog! Thanks for sharing this valuable information
ReplyDeleteAWS Training in Bangalore
AWS Course in Bangalore
Nice informative content. Thanks for sharing the valuable information.
ReplyDeleteRPA Training in Chennai
RPA Training Online
RPA Training In Bangalore
The minimal payout share is 70%, with pubs often setting the payout at round 78%. "Skill stop" buttons had been added to some slot machines by Zacharias Anthony within the early Nineteen Seventies. These enabled the participant to stop each reel, allowing a degree of "talent" in order to fulfill the New Jersey gaming laws of the day which required that players had been able to 1xbet to} control the sport in some way.
ReplyDelete