Improve performance under FreeBSD

138 views
Skip to first unread message

Andrey Zonov

unread,
Dec 15, 2011, 2:16:21 PM12/15/11
to mongodb-user
Hi,

Does anyone use mongodb under FreeBSD? Can you try this patch [1] and
send me feedback? Just put it in /usr/ports/databases/mongodb/files/
and rebuild mongodb port. It should significanly increase
performance.

Discussion about the problem you can find here [2].

[1] http://zonov.org/mongodb/patch-util-mmap_posix.cpp
[2] http://lists.freebsd.org/pipermail/freebsd-stable/2011-December/064844.html

Scott Hernandez

unread,
Dec 15, 2011, 8:58:14 PM12/15/11
to mongod...@googlegroups.com
If anyone tries this please let use know. I've updated the issue in
jira for freebsd slowness mentioned in the discussion.

> --
> 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.
>

Scott Sandler

unread,
Apr 20, 2012, 3:09:30 PM4/20/12
to mongod...@googlegroups.com
We have done a lot of load testing with and without this patch on mongo 2.0.2, freebsd 8.2. We've found that without the patch, the global lock queue gets into the thousands very quickly at a concurrency of a few hundred users per second on a 3-shard cluster (with 1 replica set for each shard). The load test we have been using does a combination of inserts and reads (no updates or deletes), all on the same database and collection.

With the patch, we can significantly increase that concurrency into the thousands of users until, eventually, the global lock still becomes the bottleneck (even when disk/memory/CPU metrics are fine). Unfortunately when that global lock queue starts building up it doesn't really degrade gracefully, it pretty much becomes unusable until we can shed load and give it some time to catch up. I'm not sure if this is the behavior  you see with mongo on linux systems. Adding more mongod processes/shards may help with the global lock queueing though (adding more global locks), that's next on our list to try.


On Thursday, December 15, 2011 8:58:14 PM UTC-5, Scott Hernandez wrote:
If anyone tries this please let use know. I've updated the issue in
jira for freebsd slowness mentioned in the discussion.

On Thu, Dec 15, 2011 at 7:16 PM, Andrey Zonov <andrey...@gmail.com> wrote:
> Hi,
>
> Does anyone use mongodb under FreeBSD?  Can you try this patch [1] and
> send me feedback?  Just put it in /usr/ports/databases/mongodb/files/
> and rebuild mongodb port.  It should significanly increase
> performance.
>
> Discussion about the problem you can find here [2].
>
> [1] http://zonov.org/mongodb/patch-util-mmap_posix.cpp
> [2] http://lists.freebsd.org/pipermail/freebsd-stable/2011-December/064844.html
>
> --
> 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+unsubscribe@googlegroups.com.

Scott Hernandez

unread,
Apr 20, 2012, 3:40:38 PM4/20/12
to mongod...@googlegroups.com
Great to hear.

The upcoming 2.1.1 dev/unstable release, due next week
(https://jira.mongodb.org/browse/SERVER/fixforversion/10893), will
include db level locking so it might be worth testing with that as
well if you have more than one database. Once it is released patching
master should be what you want to test with.

Please add these comments to the issue here :
https://jira.mongodb.org/browse/SERVER-663
Please also indicate if you are testing with journaling on, or off.

>> > mongodb-user...@googlegroups.com.


>> > For more options, visit this group at
>> > http://groups.google.com/group/mongodb-user?hl=en.
>> >
>

> --
> You received this message because you are subscribed to the Google Groups
> "mongodb-user" group.

> To view this discussion on the web visit
> https://groups.google.com/d/msg/mongodb-user/-/2E1BI6KORiQJ.


>
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to

> mongodb-user...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages