MongoDB on FreeBSD?

298 views
Skip to first unread message

Philip Southam

unread,
Jan 4, 2011, 4:22:09 PM1/4/11
to mongod...@googlegroups.com
Does anyone here have any experience with running MongoDB in
production on FreeBSD? Any big differences in performance,
reliability, etc... when compared to running on Linux or any gotchas I
should be aware of? We're doing a hardware upgrade and thinking about
deploying mongo on FreeBSD for server environment consistency and I
want to make sure this isn't going to cause problems for us down the
road.

Thanks,

--
Philip Southam
VP Engineering, MOVIECLIPS.com
phi...@movieclips.com
http://j.mp/7Qo6Kh

Eliot Horowitz

unread,
Jan 4, 2011, 6:07:43 PM1/4/11
to mongod...@googlegroups.com
There are some performance issues with freebsd and memory mapped files.

Beyond that, the biggest concern is just that there are very few
freebsd deployments, so there may be issues on the edge.

> --
> You received this message because you are subscribed to the Google Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
>
>

Philip Southam

unread,
Jan 5, 2011, 3:21:45 PM1/5/11
to mongod...@googlegroups.com
Thanks for the feedback. I'm trying to find a way to benchmark the differences and I came across this site http://www.feyrer.de/NetBSD/gmcgarry/ (scroll down to the memory-mapped section). Would this tool (i believe used in the benchmark) ftp://ftp.netbsd.org/pub/NetBSD/misc/gmcgarry/bench/memspeed.c be an accurate way to test the differences between our current linux setup and our proposed freebsd setup?

I ran just one instance of it in both freebsd and linux and am trying to figure out the performance differences and how the results may relate to how mongodb interacts with the OS.

LINUX
*** MEMORY WRITE PERFORMANCE (256 MB LOOP) ***
size =        64 bytes: 6400.000 MB/s
size =       128 bytes: 12800.000 MB/s
size =       256 bytes: 25600.000 MB/s
size =       512 bytes: 25600.000 MB/s
size =      1024 bytes: 6400.000 MB/s
size =      2048 bytes: 12800.000 MB/s
size =      4096 bytes: 25600.000 MB/s
size =      8192 bytes: 8533.333 MB/s
size =     16384 bytes: 25600.000 MB/s
size =     32768 bytes: 12800.000 MB/s
size =     65536 bytes: 12800.000 MB/s
size =    131072 bytes: 8533.333 MB/s
size =    262144 bytes: 5120.000 MB/s
size =    524288 bytes: 12800.000 MB/s
size =   1048576 bytes: 6400.000 MB/s
size =   2097152 bytes: 6400.000 MB/s
size =   4194304 bytes: 3657.143 MB/s
size =   8388608 bytes: 1505.882 MB/s
*** MEMORY READ PERFORMANCE (256 MB LOOP) ***
size =        64 bytes: 6400.000 MB/s
size =       128 bytes: 25600.000 MB/s
size =       256 bytes: 8533.333 MB/s
size =       512 bytes: 25600.000 MB/s
size =      1024 bytes: 12800.000 MB/s
size =      2048 bytes: 25600.000 MB/s
size =      4096 bytes: 25600.000 MB/s
size =      8192 bytes: 12800.000 MB/s
size =     16384 bytes: 8533.333 MB/s
size =     32768 bytes: 25600.000 MB/s
size =     65536 bytes: 12800.000 MB/s
size =    131072 bytes: 6400.000 MB/s
size =    262144 bytes: 8533.333 MB/s
size =    524288 bytes: 25600.000 MB/s
size =   1048576 bytes: 6400.000 MB/s
size =   2097152 bytes: 12800.000 MB/s
size =   4194304 bytes: 8533.333 MB/s
size =   8388608 bytes: 2133.333 MB/s



FREEBSD
*** MEMORY WRITE PERFORMANCE (256 MB LOOP) ***
size =        64 bytes: 8192.000 MB/s
size =       128 bytes: 16384.000 MB/s
size =       256 bytes: 16384.000 MB/s
size =       512 bytes: 16384.000 MB/s
size =      1024 bytes: 16384.000 MB/s
size =      2048 bytes: 16384.000 MB/s
size =      4096 bytes: 16384.000 MB/s
size =      8192 bytes: 16384.000 MB/s
size =     16384 bytes: 16384.000 MB/s
size =     32768 bytes: 16384.000 MB/s
size =     65536 bytes: 10922.667 MB/s
size =    131072 bytes: 10922.667 MB/s
size =    262144 bytes: 10922.667 MB/s
size =    524288 bytes: 10922.667 MB/s
size =   1048576 bytes: 10922.667 MB/s
size =   2097152 bytes: 3276.800 MB/s
size =   4194304 bytes: 2048.000 MB/s
size =   8388608 bytes: 2184.533 MB/s
*** MEMORY READ PERFORMANCE (256 MB LOOP) ***
size =        64 bytes: 8192.000 MB/s
size =       128 bytes: 16384.000 MB/s
size =       256 bytes: 32768.000 MB/s
size =       512 bytes: 16384.000 MB/s
size =      1024 bytes: 16384.000 MB/s
size =      2048 bytes: 16384.000 MB/s
size =      4096 bytes: 16384.000 MB/s
size =      8192 bytes: 16384.000 MB/s
size =     16384 bytes: 32768.000 MB/s
size =     32768 bytes: 16384.000 MB/s
size =     65536 bytes: 10922.667 MB/s
size =    131072 bytes: 10922.667 MB/s
size =    262144 bytes: 16384.000 MB/s
size =    524288 bytes: 10922.667 MB/s
size =   1048576 bytes: 8192.000 MB/s
size =   2097152 bytes: 4681.143 MB/s
size =   4194304 bytes: 4096.000 MB/s
size =   8388608 bytes: 4096.000 MB/s




Thanks and sorry if this is off topic.

Almad

unread,
Jan 16, 2011, 5:48:25 PM1/16/11
to mongodb-user
On 4 led, 22:22, Philip Southam <phi...@movieclips.com> wrote:
> Does anyone here have any experience with running MongoDB in
> production on FreeBSD?

I would be interested in NetBSD, it's the reason I'm not using Mongo
on my deployments yet.

Almad

Dwight Merriman

unread,
Jan 16, 2011, 8:53:07 PM1/16/11
to mongod...@googlegroups.com
the best test would be to run mongod on both and run some sort of benchmark that is relevant for your use case.  then if mongodb does something that is not common case, it would be measured in the benchmark.

it would be great if there were more usage of mongo on BSD in the future.

Juan Ignacio Borda

unread,
Jan 18, 2011, 10:50:45 AM1/18/11
to mongod...@googlegroups.com
Hi there i have a collection like this:

{
    "_id" : ObjectId("4d2c7b528ead0e8b0c152200"),
    "beneficios" : [
        {
            "CreFis-2009" : {
                "monto" : 13000,
                "IP" : "0366/2009"
            }
        },
        {
            "CreFis-2009" : {
                "monto" : 2225,
                "IP" : "0988/2009"
            }
        }
    ]
}

I need help in writing a map/reduce pair functions for sum all monto for each _id
Tanks in advance
Juan

juanignacioborda.vcf

Eliot Horowitz

unread,
Jan 19, 2011, 12:02:41 AM1/19/11
to mongod...@googlegroups.com
That's a pretty simple case where map reduce might be overkill.
Could you just pull it down client side? You could only pull down the
"monto" field.
You could do map/reduce like:
map = function(){ var sum=0; for ( var i=0; i<this.benficios.length;
i++ ) sum += his.beneficios[i]["CreFix-2009"].monto; emit( this._id ,
sum ); }
reduce = function(k,v){ return v[0]; }

Juan Ignacio Borda

unread,
Jan 20, 2011, 10:30:08 AM1/20/11
to mongod...@googlegroups.com
I did it client side, thanks!
juanignacioborda.vcf
Reply all
Reply to author
Forward
0 new messages