Hi,
I am using the performance tool as if it were a load generator (for the moment it just performs read). For this purpose I modified voldemort.performance.benchmark.VoldemortWrapper.java to spawn a new thread which takes care of the read operations asynchronously.
Note: I inserted a sleep(time) just before the spawning in order to be able to set the number of operations.
The point is that, doing so, I receive a lot of these messages on the client:
[15:59:07,599 voldemort.store.socket.clientrequest.ClientRequestExecutor] WARN Client request associated with Socket[addr=/192.168.0.9,port=6666,localport=59117] timed out. Start time(ns) 168755944268398 allowed time(ns) 4979608367 elapsed time(ns) 5145758141 [voldemort-niosocket-client-6]
and the following exceptions:
Exception in thread "Thread-4676" voldemort.store.InsufficientOperationalNodesException: 1 gets required, but only 0 succeeded Original replication set
:[0] Known failed nodes before operation :[] Estimated live nodes in preference list :[0] New failed nodes during operation :[0]
at voldemort.store.routed.action.PerformSerialRequests.execute(PerformSerialRequests.java:142)
at voldemort.store.routed.Pipeline.execute(Pipeline.java:212)
at voldemort.store.routed.PipelineRoutedStore.get(PipelineRoutedStore.java:352)
at voldemort.store.routed.PipelineRoutedStore.get(PipelineRoutedStore.java:258)
at voldemort.store.routed.PipelineRoutedStore.get(PipelineRoutedStore.java:81)
at voldemort.store.logging.LoggingStore.get(LoggingStore.java:106)
at voldemort.store.DelegatingStore.get(DelegatingStore.java:65)
at voldemort.store.stats.StatTrackingStore.get(StatTrackingStore.java:87)
at voldemort.store.stats.StatTrackingStore.get(StatTrackingStore.java:40)
at voldemort.store.serialized.SerializingStore.get(SerializingStore.java:107)
at voldemort.store.DelegatingStore.get(DelegatingStore.java:65)
at voldemort.store.versioned.InconsistencyResolvingStore.get(InconsistencyResolvingStore.java:51)
at voldemort.client.DefaultStoreClient.get(DefaultStoreClient.java:157)
at voldemort.client.DefaultStoreClient.get(DefaultStoreClient.java:314)
at voldemort.client.LazyStoreClient.get(LazyStoreClient.java:103)
at voldemort.performance.benchmark.VoldemortWrapper$1.run(VoldemortWrapper.java:118)
at java.lang.Thread.run(Thread.java:745)
Caused by: voldemort.store.UnreachableStoreException: Failure in get: Protocol negotation timed out for socket Socket[addr=/
192.168.0.9,port=6666,local
at voldemort.store.socket.clientrequest.ClientRequestExecutorPool$AsyncSocketDestinationRequest.handleException(ClientRequestExecutorPool.java:
at voldemort.utils.pool.QueuedKeyedResourcePool.registerResourceRequest(QueuedKeyedResourcePool.java:108)
at voldemort.store.socket.clientrequest.ClientRequestExecutorPool.submitAsync(ClientRequestExecutorPool.java:273)
at voldemort.store.socket.SocketStore.requestAsync(SocketStore.java:371)
at voldemort.store.socket.SocketStore.submitGetRequest(SocketStore.java:122)
at voldemort.store.routed.action.PerformParallelRequests.execute(PerformParallelRequests.java:159)
Caused by: java.util.concurrent.TimeoutException: Protocol negotation timed out for socket Socket[addr=/
192.168.0.9,port=6666,localport=60958]
at voldemort.store.socket.clientrequest.ClientRequestExecutorFactory.create(ClientRequestExecutorFactory.java:212)
at voldemort.store.socket.clientrequest.ClientRequestExecutorFactory.create(ClientRequestExecutorFactory.java:51)
at voldemort.utils.pool.KeyedResourcePool$Pool.attemptGrow(KeyedResourcePool.java:455)
at voldemort.utils.pool.KeyedResourcePool.attemptNonBlockingCheckout(KeyedResourcePool.java:177)
at voldemort.utils.pool.QueuedKeyedResourcePool.registerResourceRequest(QueuedKeyedResourcePool.java:104)
On the server instead, I can see a stream of these messages:
[16:09:06,720 voldemort.server.niosocket.AsyncRequestHandler] INFO Protocol negotiated for Socket[addr=/
192.168.0.6,port=32862,localport=6666]: voldemort-native-v3 [voldemort-niosocket-server74]
spaced by a lot of these messages:
[16:09:06,725 voldemort.server.niosocket.AsyncRequestHandler] INFO Connection reset from Socket[addr=/
192.168.0.6,port=60448,localport=6666] with message - Connection reset by peer [voldemort-niosocket-server428]
What am I doing wrong? Please, how can I work it out?
Thanks in advance.
In the following part of the post, I attached info about the systems and the settings. Let me know if you need more info.
Performance Tool
Some parameters of ./voldemort-performance-tool.sh:
--num-connections-per-node 999999
--percent-cached 0 -r 100
--record-selection uniform
--threads 1
--lambda 200
with the parameter lambda that I inserted, I can control statistically the number of operations done per second. I have tested it with the default configuration (that is, without spawning a new thread for each read operation) and it works correctly.
Moreover I added this in the bin/voldemort-perfomance-tool.sh:
export VOLD_OPTS=" -server -Xms32684m -Xmx32684m -XX:NewSize=8048m -XX:MaxNewSize=20048m -XX:+UseG1GC -XX:SurvivorRatio=2 -XX:+AlwaysPreTouch -XX:+UseCompressedOops -XX:+PrintTenuringDistribution -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:gc.log -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime "
Here my VoldemortWrapper.java:
public void read(final Object key,final Object expectedValue,final Object transforms) {
long startNs = System.nanoTime();
// Here I actually insert an exponential distributed sleep to tune the load generator.
// By tuning the sleeping time, I can decide how many operations (i.e. connections ) per second should be done.
new Thread(new Runnable() {
Versioned<Object> returnedValue = voldemortStore.get(key, transforms);
long endNs = System.nanoTime();
measurement.recordLatency(Operations.Read.getOpString(), ((endNs - startNs) / Time.NS_PER_MS));
ReturnCode res = ReturnCode.Ok;
// if (returnedValue == null && !this.ignoreNulls) {
// res = ReturnCode.Error;
// if (verifyReads && !expectedValue.equals(returnedValue.getValue())) {
// res = ReturnCode.Error;
measurement.recordReturnCode(Operations.Read.getOpString(), res.ordinal());
Server
I run the following command:
sudo bin/voldemort-prod-server.sh config/prod_single_node_cluster
I modified the voldemort-prod-server.sh raising the memory parameters:
export VOLD_OPTS=" -server -Xms32684m -Xmx32684m -XX:NewSize=2048m -XX:MaxNewSize=20048m -XX:+UseG1GC -XX:SurvivorRatio=2 -XX:+AlwaysPreTouch -XX:+UseCompressedOops -XX:+PrintTenuringDistribution -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:gc.log -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime "
here the server.properties (I put in bold what I have added):
# The ID of *this* particular cluster node
bdb.checkpointer.off.batch.writes=true
bdb.cleaner.interval.bytes=15728640
bdb.cleaner.lazy.migration=false
bdb.cleaner.min.file.utilization=0
bdb.expose.space.utilization=true
bdb.minimize.scan.impact=true
bdb.one.env.per.store=true
enable.server.routing=false
enable.verbose.logging=false
nio.connector.selectors=500
client.max.queued.requests=10000
restore.data.timeout.sec=1314000
storage.configs=voldemort.store.bdb.BdbStorageConfiguration, voldemort.store.readonly.ReadOnlyStorageConfiguration
stream.read.byte.per.sec=209715200
stream.write.byte.per.sec=78643200
here the cluster.xml
<cluster>
<name>myprodcluster</name>
<server>
<id>0</id>
<host>localhost</host>
<http-port>8081</http-port>
<socket-port>6666</socket-port>
<admin-port>7777</admin-port>
<partitions>0, 1</partitions>
</server>
</cluster>
and the store.xml (that is actually named just "test"):
<persistence>bdb</persistence>
<description>Test store</description>
<routing-strategy>consistent-routing</routing-strategy>
<routing>client</routing>
<replication-factor>1</replication-factor>
<required-reads>1</required-reads>
<required-writes>1</required-writes>
Hardware
The machines have 64 GB RAM, two 12-core AMD Opteron processors, a 500 GB hard disk and a 1 Gb network controller. They run Ubuntu 12.04 LTS.