Installing Django on VPS with 128mb ram

188 views
Skip to first unread message

walterbyrd

unread,
Dec 4, 2007, 8:35:36 AM12/4/07
to Django users
I am new to VPS hosting. I just signed up with an account that gives
me 128mb/ram.

My immediate needs are very modest. But 128mb seems kinda wimpy.

I am wondering if I should use apache or lighttpd, or something else.
I am little more familiar with apache, but if there is a big
difference in resource usage between apache, and another webserver, I
can always learn something else.

On the other hand, I am just learning django, I have some concerns
with taking on too much all once: django, vps, lighttpd, etc.

I may also install drupal on the same site, so I'll probably go with
mysql. I don't know if that matters.

Farcaller

unread,
Dec 4, 2007, 8:40:03 AM12/4/07
to Django users
You'd better use lighttpd. It's not that easy to fit apache in such
RAM (counting other services).

In fact your enemy is not a webserver but a django application itself.
If you have VPS without burstable mem based on something like OpenVZ
then you'll find python process using 70-80Mb of your precious RAM. I
haven't yet found any solution to this (I'm hosting several django
apps on a VPS too).

For small loads you'd also better use sqlite over mysql.

Kenneth Gonsalves

unread,
Dec 4, 2007, 9:12:06 AM12/4/07
to django...@googlegroups.com

On 04-Dec-07, at 7:05 PM, walterbyrd wrote:

> I am new to VPS hosting. I just signed up with an account that gives
> me 128mb/ram.

not a problem - I hope you have a VPS with a hard limit on memory and
swap


>
> My immediate needs are very modest. But 128mb seems kinda wimpy.
>
> I am wondering if I should use apache or lighttpd, or something else.
> I am little more familiar with apache, but if there is a big
> difference in resource usage between apache, and another webserver, I
> can always learn something else.

apache is fine - I have a VPS with 256 mb, hardlimit and run 4 django
sites on it.


>
> On the other hand, I am just learning django, I have some concerns
> with taking on too much all once: django, vps, lighttpd, etc.

stick with apache


>
> I may also install drupal on the same site, so I'll probably go with
> mysql. I don't know if that matters.

yikes

--

regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/
Foss Conference for the common man: http://registration.fossconf.in/web/


walterbyrd

unread,
Dec 4, 2007, 11:06:04 AM12/4/07
to Django users


On Dec 4, 7:12 am, Kenneth Gonsalves <law...@thenilgiris.com> wrote:
> On 04-Dec-07, at 7:05 PM, walterbyrd wrote:

> > I may also install drupal on the same site, so I'll probably go with
> > mysql. I don't know if that matters.
>
> yikes
>

Seriously? Am I trying to do to much with too little?

None of these are critical sites. Maybe I should keep this all django
and use sqlite?

This was a total cheapo VPS - 3 months for $12 (betterhost.ca).
Everything is experimental at this stage. Maybe I should see about
getting another slice for drupal? I know that drupal does not really
work with sqlite.

Kenneth Gonsalves

unread,
Dec 4, 2007, 11:31:51 AM12/4/07
to django...@googlegroups.com

On 04-Dec-07, at 9:36 PM, walterbyrd wrote:

>>> I may also install drupal on the same site, so I'll probably go with
>>> mysql. I don't know if that matters.
>>
>> yikes
>>
>
> Seriously? Am I trying to do to much with too little?
>
> None of these are critical sites. Maybe I should keep this all django
> and use sqlite?
>
> This was a total cheapo VPS - 3 months for $12 (betterhost.ca).

too cheap - at least $20 a month, otherwise the guy is not going to
be in business long enough to service you. You can pack a lot into a
vps with hard memory limit, especially if the sites are not critical.
And you can have a lot of fun - just think of the vps as the box on
the table in front of you. You can always wipe out everything and
reinstall if you screw up. And, re mysql/php - that is just my
personal allergy, don't take it seriously

Graham Dumpleton

unread,
Dec 4, 2007, 5:07:05 PM12/4/07
to Django users
On Dec 5, 3:06 am, walterbyrd <walterb...@iname.com> wrote:
> On Dec 4, 7:12 am, Kenneth Gonsalves <law...@thenilgiris.com> wrote:
>
> > On 04-Dec-07, at 7:05 PM, walterbyrd wrote:
> > > I may also install drupal on the same site, so I'll probably go with
> > > mysql. I don't know if that matters.
>
> > yikes
>
> Seriously? Am I trying to do to much with too little?

As you have moved around the various mailing lists and Google groups
this year asking people again and again about hosting options, you
have been told various times that your expectations as to what you
wanted to host in really cheap commodity web hosting environments and
VPS systems were unrealistic, so you shouldn't be surprised. I really
don't understand why you keep asking this even though people have told
you that you should just pay more money and get a better system. :-)

That said, it is possible to run Python web applications in
conjunction with Apache in memory constrained VPS systems, but you
have to take the time to understand how Apache works and set it up
properly, as well as understand what your own application does and
where necessary impose constraints in your application to avoid
scenarios which can result in memory usage spiking. Unless you know
what you are doing, you are better off just paying more money and
getting a VPS which provides more memory.

Graham

walterbyrd

unread,
Dec 4, 2007, 10:48:12 PM12/4/07
to Django users
For me, it's all about the learning experience.

Here is one thing I've learned: MySQL *devourers* memory. Just running
my basic VPS: debian, ssh, lighttpd, uses about 12mb or ram. If I run
- or rather try to run - mysql, memory usuage shoots up to 130mb and
the system becomes nearly unusable. I could not even do a "mysql stop"
I had to kill the process.

Unless I can find a way to serious reduce the amount of memory that
mysql uses, I doubt I'll be able to use drupal. The msql process only
takes about 11mb. I guess it's the cache, or buffers, or something.

Chris Moffitt

unread,
Dec 4, 2007, 10:53:31 PM12/4/07
to django...@googlegroups.com
On my blog post here - http://www.satchmoproject.com/blog/2007/sep/25/optimizing-django-vps-setup/

I wrote some of my tips for configuring MySQL to use less memory.  I also have some general thoughts on vps setup for django apps.

HTH,
Chris

walterbyrd

unread,
Dec 5, 2007, 9:23:09 AM12/5/07
to Django users


On Dec 4, 8:53 pm, "Chris Moffitt" <ch...@moffitts.net> wrote:
> On my blog post here -http://www.satchmoproject.com/blog/2007/sep/25/optimizing-django-vps-...
>
> I wrote some of my tips for configuring MySQL to use less memory. I also
> have some general thoughts on vps setup for django apps.
>
> HTH,
> Chris

Thanks Chris, I will have to give that a try.
Reply all
Reply to author
Forward
0 new messages