The list is a bit quiet - I hope somebody can shine light on this -
even if I'm totally off track here.
I have a multi-threaded server that acts as a client to Voldemort, The
threads are more like actors/processes, in that they share nothing
except the Voldemort clients. These are obtained from a singleton, and
are shared across threads.
1) Is it safe to do so (i.e. is Voldemort's client thread safe)? I
read and assumed it was.
2) I am seeing small memory leaks on the server, while all my "server"
threads are cleaned up nicely according to my profiler. Is there a
known leak/issue here with the Voldemort clients in 0.90.1? Or should
I give every thread its own client instance from a factory object (but
how do I close them explicitly then)?
3) Of course the behavior differs across JDKs: OS X seems to have
almost no problems, Linux with OpenJDK6 is the worst, Sun JDK6 on
Linux also has the problem, but the leak is smaller per request. Just
to make life easier.... But the leak exists. The difference between OS
X and Linux is striking in the sense that I've also had to up ulimit
for processes on Linux (not OS X) to a high value ( I chose 51200,
just to get rid of out of file descriptors).
FWIW, I create the SocketStoreClientFactory with this client config
(in Scala) - clueless why, but these settings seem to work:
clientconfig = new ClientConfig()
clientconfig.setBootstrapUrls(bootlist)
clientconfig.setMaxBootstrapRetries(1)
clientconfig.setMaxThreads(512)
clientconfig.setMaxQueuedRequests(5000)
//clientconfig.setMaxTotalConnections(25000)
//clientconfig.setMaxConnectionsPerNode(9000)
clientconfig.setSelectors(512)
And a typical factory method for the singleton looks like this:
var requestCounterClient: VMClient[String,Long] = null
def getRequestMeterer() = {
if (requestCounterClient == null) {
debug("Getting VM request client")
val tmp: StoreClient[String,Long]= factory getStoreClient("requests")
requestCounterClient = new VMClient[String,Long](tmp)
}
debug("requestCounterClient - null?" + (requestCounterClient == null))
requestCounterClient
}
VMClient is a scala wrapper around LazyStoreClient, and the
requestCounterClient is null until the first request comes in.
If I should take a different approach or am missing something .... any
help/insights/advice greatly appreciated.
Thanks,
Maarten
--
You received this message because you are subscribed to the Google Groups "project-voldemort" group.
To post to this group, send email to project-...@googlegroups.com.
To unsubscribe from this group, send email to project-voldem...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/project-voldemort?hl=en.