write concern in connection string URI

208 views
Skip to first unread message

Yuquan Shan

unread,
May 27, 2017, 6:35:34 PM5/27/17
to mongodb-user
Dear all,

I'm currently using YCSB to test MongoDB performance. And I found something peculiar in the write concern options of connection string URI.

According to the doc (https://docs.mongodb.com/manual/reference/connection-string/), to set journal option in write concern to true/false, we need to let "journal=true/false". So I did the following two experiments (the test data are already loaded a priori):

./bin/ycsb run  mongodb -s -P workloads/<my_workloads> -p mongodb.url="mongodb://<ip1>,<ip2>,<ip3>/?replicaSet=rs0&w=1&journal=true"

./bin/ycsb run  mongodb -s -P workloads/<my_workloads> -p mongodb.url="mongodb://<ip1>,<ip2>,<ip3>/?replicaSet=rs0&w=1&journal=false"

I expected to observe the different results from these two test cases, however, they had almost the same throughput. It appeared to me that the journal option in write concern wasn't enabled with "journal=true".

Today I "desperately" changed journal=true/false to j=true/false, then I started to observe the significant throughput drop when j=true.

So I'm wondering if there is some wrong in the doc: instead of using "journal", we should use "j" to config the write concern in the connection string URI.

Any suggestion would be appreciated.

Thanks,
Yuquan

Dinei André Rockenbach

unread,
May 28, 2017, 10:01:40 AM5/28/17
to mongodb-user
Hello Yuquan Shan,

I'm also encountering strange behaviour with the journal option, and had just opened an issue on YCSB's github, referencing this thread.

You can follow and/or contribute to it in https://github.com/brianfrankcooper/YCSB/issues/973

Regards.

Yuquan Shan

unread,
May 30, 2017, 2:17:06 PM5/30/17
to mongodb-user
Thanks, Dinei. I will keep following up.

Asya Kamsky

unread,
May 30, 2017, 7:03:59 PM5/30/17
to mongodb-user
What version of MongoDB server and what version of Java driver are you using?



--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/3662f4f6-eae8-4f95-b915-681b2b033213%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Asya Kamsky
Lead Product Manager
MongoDB
Download MongoDB - mongodb.org/downloads
We're Hiring! - https://www.mongodb.com/careers

Dinei André Rockenbach

unread,
May 30, 2017, 7:15:45 PM5/30/17
to mongod...@googlegroups.com
I'm using MongoDB v3.4 Community, YCSB 0.12.0 and Java 8 OpenJDK (the latest, from apt-get install default-jdk).

You received this message because you are subscribed to a topic in the Google Groups "mongodb-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mongodb-user/c36_Rxie5Ak/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mongodb-user+unsubscribe@googlegroups.com.

To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.

For more options, visit https://groups.google.com/d/optout.



--
Atenciosamente,
Dinei André Rockenbach
Técnico em Informática - SETREM
Acadêmico de Sistemas de Informação - SETREM
Técnico Judiciário no Tribunal Regional do Trabalho da 4ª Região

Yuquan Shan

unread,
Jun 1, 2017, 12:40:05 PM6/1/17
to mongodb-user
Hi Asya,

My MongoDB is v3.4.4, and YCSB is using mongo-java-driver-3.0.3.jar as its dependency.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.

To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.

Wan Bachtiar

unread,
Jun 21, 2017, 12:52:09 AM6/21/17
to mongodb-user

So I’m wondering if there is some wrong in the doc: instead of using “journal”, we should use “j” to config the write concern in the connection string URI.

Hi Yuquan,

Since currently YCSB is using MongoDB Java driver v3.0.3 the correct journal option to use is j. Starting from MongoDB Java driver v3.1.x however, the driver supports the journal URI param. The j option is continued to be supported to avoid breaking existing usage, but should be superseded by journal. See also JAVA-1890.

If you’re using MongoDB v3.4.4, I would suggest updating the MongoDB Java driver version in the YCSB pom.xml to use MongoDB Java driver v3.4.x. See also MongoDB Java Driver Compatibility Chart for guidelines on which driver to use for a specific version of MongoDB.

Regards,

Wan.

Yuquan Shan

unread,
Jun 22, 2017, 11:57:40 PM6/22/17
to mongodb-user
Good to know. Thanks, Wan!
Reply all
Reply to author
Forward
0 new messages