Polled Unsuccessfully for ReplicateTo.ONE
Hi,
I am evaluating Couchbase as a caching layer for our web. and I just deploy couchbase at Two Centos 6.1 with iptabes off and selinux off
I tried to run the Sample "beer-sample" with JavaSDK 1.1.2 on JDK 1.7. It is good when I run it directly. But once I updated to
1. using a random integer as the ID instead of the beer-sample AND
2. apply ReplicateTo.ONE instead of default ReplicateTO.ZERO
SourceCode as following
KEY = String.valueOf(_ran.nextInt(10000));
OperationFuture setOp = client.set(KEY, EXP_TIME, VALUE, ReplicateTo.ONE);
It printed out the error for polling for some of the ID, not all. Some of set operation is done successfully
"Set failed: Observe Timeout - Polled Unsuccessfully for at least 40 seconds."
My questions are:
1. What is happening? why does this error prompt up?
2. How to resolve it?
3. and the performance is extremely poor for ReplicateTo turn on. How to resolve it if it is required?
Thanks a lot,
Tony
Thanks Michael,
The time out problem is gone with 1.1.3 version. But the performance of set with ReplicateTo.ONE is pretty low when compare with the ReplicateTo.ZERO.
I can reached over 40K operations per second with ReplicateTo.ZERO.
But I only got below 200 operations per second with ReplicateTo.ONE.
Is it expected? or there is another problem around? and any how I can address the bottleneck with log or something?
and how to do the performance tuning? any hint to me
Thanks a lot,
BTW I am using 1Gbs back to back
Tony Li
Hi Tony,
well this is kind of expected, depending on the network you're on and type of machines you're using.
ReplicateTo.ONE means that you'll only get back the control when the document has been replicated to at least one replica. Network IO may be slow in your case, its hard to measure without actually knowing all the details. While you may have an 1Gbs IF, I don't know how many traffic is going over it and other factors also come into play.
I recommend you to use those options when you really need them, not all the time. And if you really need them, you need to make a tradeoff between data safety and performance! I also dont know the type of workload you're running.
Glad that the bug went away!
Hi tony,
thanks for trying Couchbase!
Before getting into the details, can you please get the 1.1.3 version and try it again with it? We had some bugfixed regarding persist/replicate to in there.
Let me know if it doesn't work for you and we'll start investigating further!
Thanks,
Michael