View Full Version : spring-data-keyvalue jedis performance metrics
ccoco
May 23rd, 2011, 06:32 PM
Are there any published performance metrics on how well the spring-data-keyvalue library performs under load, specifically when configured to use a Jedis connection factory?
We are potentially seeing write throttling in the spring-data-keyvalue library when doing a lot of writes to a redis server (version 2.2.4). It would be great to see any performance data that is available for the library to compare as a baseline.
Thanks.
Costin Leau
Jun 15th, 2011, 03:01 AM
There isn't any (that I'm aware of). Have you tried doing any profiling? As there are multiple "parties" involved in your stack, w/o any actual results in your environment is hard to figure out what the problem is (it's more like guessing). From the Spring Redis side I can tell you that there's no pooling or object sharing so in case of a load, there's no throttling that should occur (in read or write scenario). In your case it might be that you might either have to increase the connection pool (in Jedis) since you might have too many clients waiting to write to the Redis server.
ccoco
Jun 15th, 2011, 11:12 AM
Thanks for the info. We ran profiling and found a couple of things:
1. Updating counters in 1.0.0.M3 under load just seems to constantly fail. We get NullPointerException consistently. I saw that this might be address in the next milestone release. Unfortunately, trying to build from the source in github has proven difficult as all the necessary dependencies are hard to track down.
2. We needed to tune the number of client connections available on the redis server which was not obvious given that we had configured spring-data to use a jedis pool which we thought would cap the connections to the size of the pool. Perhaps we're just doing something plain wrong here. To that point, I could not seem to find a way to increase the connection pool in Jedis when configuring the redis template. Any information or example you could provide would be great.
Costin Leau
Jun 15th, 2011, 12:47 PM
1. What do you mean by tracking down the dependencies? The project uses Maven so you just do a 'mvn clean install' and all the dependencies get downloaded. Did you receive any errors?
2. The client (Jedis/Jredis/RJC) gets configured outside the RedisTemplate. See http://j.mp/meuLHf , specifically setPoolConfig (http://static.springsource.org/spring-data/data-keyvalue/docs/current/api/org/springframework/data/keyvalue/redis/connection/jedis/JedisConnectionFactory.html#setPoolConfig%28redis. clients.jedis.JedisPoolConfig%29)
ccoco
Jun 15th, 2011, 01:05 PM
1. Yep, I'm very familiar with maven. When trying to build there are several dependencies that do not seem to be available in any public repositories, nor is it documented what if any repositories you need to add specifically to be able to download them. After spending some time trying to download them manually from various spring sources, I gave up. The biggest block is trying to track down the bundlor project (and all of its dependencies):
[INFO] Unable to find resource 'com.springsource.bundlor:com.springsource.bundlor .maven:pom:1.0.0.RELEASE' in repository spockframework (http://m2repo.spockframework.org/snapshots)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: com.springsource.bundlor:com.springsource.bundlor. maven
Reason: POM 'com.springsource.bundlor:com.springsource.bundlor .maven' not found in repository: Unable to download the artifact from any repository
com.springsource.bundlor:com.springsource.bundlor. maven:pom:1.0.0.RELEASE
The build fails right away without this.
2. Thanks for the info.
Powered by vBulletin® Version 4.2.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.