Problem with changing writing concern

189 views
Skip to first unread message

Luka Blažecki

unread,
May 20, 2013, 6:40:06 AM5/20/13
to mongoo...@googlegroups.com
Hi

I am trying to change writing concern when creating connection : 
 var connPush = mongoose.createConnection(uri,{db:{fsync:false,j:false,w:0,wtimeout:10000}});

But when I test it results are same as when I set options to {db:{fsync:true,j:true,w:1,wtimeout:10000}}.
The results are around 500 inputs/second

When I changed connection driver to node-mongodb-native, it's working on 10000 input/second (when I set this options on top)

What I am doing wrong on setting this options ? 
I am using mongoose v3.3.1

Aaron Heckmann

unread,
May 20, 2013, 5:02:18 PM5/20/13
to mongoo...@googlegroups.com
So you're saying that mongoose is slower than the driver? If so, yes that is expected _but_ 500/sec vs 10000/sec seems extreme.

Please post the benchmark.


--
Documentation - http://mongoosejs.com/
Plugins - http://plugins.mongoosejs.com/
Bug Reports - http://github.com/learnboost/mongoose
Production Examples - http://mongoosejs.tumblr.com/
StackOverflow - http://stackoverflow.com/questions/tagged/mongoose
Google Groups - https://groups.google.com/forum/?fromgroups#!forum/mongoose-orm
Twitter - https://twitter.com/mongoosejs
IRC - #mongoosejs
---
You received this message because you are subscribed to the Google Groups "Mongoose Node.JS ODM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongoose-orm...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Aaron


Aaron Heckmann

unread,
May 22, 2013, 12:06:10 PM5/22/13
to mongoo...@googlegroups.com
The options are set correctly. Depending on the benchmark, the bottleneck may be mongoose itself vs a slower write concern setting.

On Wednesday, May 22, 2013, Luka Blažecki wrote:
The problem is that I can't change write concern.
Can you post what is the correct way to change it (I want to disable write concern to write to journal and fsync)?


--
Aaron



Aaron Heckmann

unread,
May 23, 2013, 5:32:02 PM5/23/13
to mongoo...@googlegroups.com
What does "doesn't work" mean? What do you expect to occur? What are you observing?

BTW latest mongoose is 3.5.11 and uses an updated driver. Please test with this version.


On Thu, May 23, 2013 at 3:10 AM, Luka Blažecki <blaz...@gmail.com> wrote:
It's not that.
I found today that on Linux this command  
     var connPush = mongoose.createConnection(uri,{db:{fsync:false,j:false,w:0,wtimeout:10000}});
where uri is replica works but on Windows where uri is just one DB doesn't work.
Reply all
Reply to author
Forward
0 new messages