Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i am curious about how mongodb will perform in a limited vps. specifically, i'll deploy this configuration on 32-bit ubuntu 9.04 server with 128Mb memory (UPDATE: now i'm considering 360mb too).

  • nginx and redis
  • three instances of tornado apps (one is for mobile site; limited app, not my primary audience); has around 8 Collections. social webapp for my community.
  • mongodb

all beside mongodb seems to have small footprint. memory-mapping-wise, i dont know how mongodb will behave.

i know it's a little bit a stretch to use this kind of config on a tiny vps, but that's what i can afford for now. i expect to have.. hmm.. maybe ~50 15rps. i did my homework doing a lot of frontend optimizations and yslow says grade A 91 (ruleset V2) :-)

anyone willing to share experiences? eg. how big the data set size when mongo hit the ceiling, performance when mongo do a lot of disk IO, etc. thanks.

UPDATE: this is my pet project. i'll get back to you when i have next spare time to do same httperf in a vbox with exact spec. suggestion how to do stress testing welcomed. i'm new to this kind of stuff.

share|improve this question
MongoDB? In norwegian that directly translates down Downs Syndrom DB. I'm feeling a bit guilty smiling here. – pauska May 26 '10 at 7:12

Yeah, I don't think that's going to work. A mongoDB I've got running at the moment is using 560MB VIRT, 205MB RES. I don't know how that maps to data set size, but I suspect you're going to have problems. Only one way to know for sure, though -- try it and see. If you can't upgrade your VPS (how cheap are you getting a 128MB VPS for that you can't afford a 360MB Linode?), then try it and if it doesn't work, roll out of MongoDB and use something else.

share|improve this answer
yeah, i suspect that too :(. 20$/month (128 is ~8$/m) is quite a lot for a jobless me here in id_ID. like you said, i wanted to know how big data set size can be grown. thx. – apito Nov 19 '09 at 8:34
note that mongoDB mmap()'s the whole dataset, so if you have 300MB of data, then it's in fact only 260VIRT+300MBmmap. – Javier Nov 19 '09 at 14:12
Doesn't change the fact that 205MB of resident memory is going to totally blow that VPS into the ground. Good to know about the mmap, though. – womble Nov 19 '09 at 14:43
up vote 1 down vote accepted

I run ~ above config (+supervisor +errorlogger script -redis) in a VirtualBox vm. I loaded 5000 docs resulting in a ~60Mb data size (db.mycollection.totalSize()).

In this test, /articles run two queries for paging and 15 queries to fetch relational doc.

$httperf --hog  --num-conn 1000 --timeout 5 --server peduli.vps --uri /articles

# 360Mb box
Connection rate: 7.6 conn/s (131.4 ms/conn, <=1 concurrent connections)
Connection time [ms]: min 118.7 avg 131.4 max 300.0 median 128.5 stddev 12.2
Reply rate [replies/s]: min 6.8 avg 7.6 max 8.0 stddev 0.3 (26 samples)
Reply time [ms]: response 128.8 transfer 2.2

# 128Mb box
Reply rate [replies/s]: min 4.2 avg 6.3 max 7.2 stddev 0.7 (31 samples)
Reply time [ms]: response 154.5 transfer 4.2

$httperf --hog  --num-conn 100 --ra 10 --timeout 5 --server peduli.vps --uri /articles
Connection rate: 7.8 conn/s (127.9 ms/conn, <=34 concurrent connections)
Connection time [ms]: min 181.4 avg 2267.7 max 4889.5 median 2421.5 stddev 1209.6

This is the snapshot of 'top' inside 128Mb 'vps' box

Mem:    121528k total,   117532k used,     3996k free,     2732k buffers
Swap:   409616k total,     8244k used,   401372k free,    56904k cached

My conclusion? i dont know, need to compare config with mongodb replaced with mysql.. perhaps, good enough?

share|improve this answer

you know that mongodb uses mmap and will just allocate all the ram it gets its sticky fingers on...

share|improve this answer

Assuming the 128mb is 32bit, please remember you are limited to 1.8gb of data

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.