-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redis client performance issue #313
Comments
@pmlopes ? |
I've been trying to reproduce this issue in master, I've been increasing the values until it crashes, but on my side it seems to happen at REDIS side: @Test
// @Ignore
public void perfRegression(TestContext should) {
final Async test = should.async();
int iterations = 500;
int instances = 100;
AtomicInteger count = new AtomicInteger();
AtomicBoolean done = new AtomicBoolean();
rule.vertx()
.deployVerticle(() -> new AbstractVerticle() {
@Override
public void start(Promise<Void> onStart) {
Redis redisClient = Redis.createClient(rule.vertx(), new RedisOptions()
.setConnectionString("redis://" + redis.getContainerIpAddress() + ":" + redis.getFirstMappedPort() + "/0")
.setMaxWaitingHandlers(iterations + 10)
.setMaxPoolSize(100)
.setMaxPoolWaiting(500));
rule.vertx().eventBus()
.consumer("test.redis.load")
.handler(m -> {
redisClient
.send(cmd(SET).arg("foo").arg("bar"))
.onSuccess(res -> {
if (count.incrementAndGet() == iterations * instances) {
if (done.compareAndSet(false, true)) {
rule.vertx()
.setTimer(2000L, v -> test.complete());
}
}
})
.onFailure(err -> {
should.fail(err);
});
});
onStart.complete();
}
}, new DeploymentOptions().setInstances(instances).setWorker(true))
.onComplete(res -> {
for (int i = 0; i < iterations; i++) {
rule.vertx().eventBus().publish("test.redis.load", i);
}
});
} The first failure happens with:
So we've reached the maximum allowed client connections from redis. If I reduce to 100, 100 like in the OP and avoid thread pools by not making the verticles workers, the test passes on my side. |
The test is failed in my side in versions 4.2.0-SNAPSHOT and 4.1.2 (mac and centos 7 x64) |
version 4.1.2
The performance of Redis client in Load is very pure. Lot of errors:
Following test:
The text was updated successfully, but these errors were encountered: