WebFaction
Community site: login faq

Hi, I have a single Django-project on standard webfaction plan. The average loading time of my website is about 4 seconds. I configured most of the performance tweaks regarding Django (caching, compression, ...). So I'm only interested in improvements of the Apache configuration. Is 4 sec loading time on a website with 200kb of data, needing about 15 request to load, the limit with webfaction or can I improve this significantly? This is what my httpd.conf looks like right now:

ServerRoot "/home/XXXXXX/webapps/XXXXXX/apache2"

LoadModule dir_module        modules/mod_dir.so
LoadModule env_module        modules/mod_env.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module       modules/mod_mime.so
LoadModule rewrite_module    modules/mod_rewrite.so
LoadModule setenvif_module   modules/mod_setenvif.so
LoadModule wsgi_module       modules/mod_wsgi.so
#LoadModule headers_module       modules/mod_headers.so

LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
KeepAlive Off
Listen 28010
MaxSpareThreads 3
MinSpareThreads 1
ServerLimit 1
SetEnvIf X-Forwarded-SSL on HTTPS=1
ThreadsPerChild 15
WSGIDaemonProcess XXXX processes=15 python-path=/.../lib/python2.6 threads=8
WSGIPythonPath /home/XXXX/webapps/XXXXX:/home/XXXX/webapps/XXXXXX/lib/python2.6
WSGIScriptAlias / /home/XXXXXX/webapps/XXXXXX/XXXXXX.wsgi

Thanks in advance Jacques

asked 15 Jan '12, 11:09

jacques
111
accept rate: 0%


Your configuration seems fine and light and I've doubt that you are reaching any limits.

The first suggestion we usually give is to serve your static files from our frontend nginx server (It's also Django's creator first tip!). It gives a significant performance boost and you can follow the instructions here, if you haven't done it already.

You could also try ditching Apache and use Gunicorn. You could find some discussions about it, if you search the site.

permanent link

answered 15 Jan '12, 11:45

iliasr ♦♦
2.1k14
accept rate: 36%

edited 15 Jan '12, 19:06

thanks for your answer. i am already serving the static files on an external server, but i am using apache to gzip the static files with the .htaccess. I was wondering if i can change anything in the httpd.conf like KeepAlive On, add more threads or somethng like this to increase performance. i tried to read the apache docs, but i couldnt really figure it out.

best, jacques

(15 Jan '12, 13:09) jacques

Do you have access to the httpd.conf on this external server? If yes, then increasing the number of processes can help.

On our servers, the static-only apps that are served from our Nginx server already gzip the content.

(15 Jan '12, 22:00) neeravk
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×908
×225
×28
×26

question asked: 15 Jan '12, 11:09

question was seen: 3,443 times

last updated: 15 Jan '12, 22:00

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM