Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Client thread safety, memory leaks?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Maarten Koopmans  
View profile  
 More options Apr 4 2012, 10:57 am
From: Maarten Koopmans <maarten.koopm...@gmail.com>
Date: Wed, 4 Apr 2012 16:57:52 +0200
Local: Wed, Apr 4 2012 10:57 am
Subject: Client thread safety, memory leaks?
Hi,

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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Carlos Tasada  
View profile  
 More options Apr 4 2012, 11:23 am
From: Carlos Tasada <ctas...@gmail.com>
Date: Wed, 4 Apr 2012 17:23:56 +0200
Local: Wed, Apr 4 2012 11:23 am
Subject: Re: [project-voldemort] Client thread safety, memory leaks?

Hi Maarten,

Answering your questions:

1) AFAIK it's safe. At least I'm running a multithread server and I've not
seen any problem.

2) As you already commented in another thread of the group, I've already
found and fixed some memory and socked leaks. You can find the proposed
patch in  https://github.com/voldemort/voldemort/pull/70

3) I also needed to increase my ulimit to avoid "Too Many Open File"
errors, but the previous patch seems to be solving the issues

I hope it helps.

Carlos

On Wed, Apr 4, 2012 at 4:57 PM, Maarten Koopmans <maarten.koopm...@gmail.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Maarten Koopmans  
View profile  
 More options Apr 4 2012, 1:03 pm
From: Maarten Koopmans <maarten.koopm...@gmail.com>
Date: Wed, 4 Apr 2012 19:03:28 +0200
Local: Wed, Apr 4 2012 1:03 pm
Subject: Re: Client thread safety, memory leaks?

Hi Carlos,

Many thanks, I thought it was me. Did you apply the patch against 0.90.1 or
do I need to build against the current master branch?

Thanks again, I'll report my findings tomorrow or early next week ( I am in
GMT+1).

And I hope the core team will be a bit more responsive, if only to
incorporate patches and make releases....

Thanks again,

Maarten


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Carlos Tasada  
View profile  
 More options Apr 4 2012, 1:41 pm
From: Carlos Tasada <ctas...@gmail.com>
Date: Wed, 4 Apr 2012 19:41:01 +0200
Local: Wed, Apr 4 2012 1:41 pm
Subject: Re: [project-voldemort] Re: Client thread safety, memory leaks?

Hi Marteen,

Even when the patch is for the master branch, you can apply it to 0.90.1
easily. In fact I've it applied there in my production code.

AFAIK there are no other leaks in the connection code, but I known there're
some points that could be improved (some of them are already modified in
the master branch)

Regards,
Carlos

On Wed, Apr 4, 2012 at 7:03 PM, Maarten Koopmans <maarten.koopm...@gmail.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Maarten Koopmans  
View profile  
 More options Apr 28 2012, 4:11 am
From: Maarten Koopmans <maarten.koopm...@gmail.com>
Date: Sat, 28 Apr 2012 10:11:22 +0200
Local: Sat, Apr 28 2012 4:11 am
Subject: Re: [project-voldemort] Re: Client thread safety, memory leaks?
Hi!

Late reply, but the patch worked. With a subtle memory leak caused by
the Scala compiler in my software all runs smoothly. Only thing that I
find slightly worrisome is that the community seems to slowly get to a
halt.

Sure Voldemort largely just works, but if nobody asks questions then
that suggest not many new users - the lack of roadmap for releases
etc. is also not helping. Or is this a quiet period in the US in terms
of holidays or so?

Best regards, Maarten


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Carlos Tasada  
View profile  
 More options Apr 28 2012, 7:38 am
From: Carlos Tasada <ctas...@gmail.com>
Date: Sat, 28 Apr 2012 13:38:18 +0200
Local: Sat, Apr 28 2012 7:38 am
Subject: Re: [project-voldemort] Re: Client thread safety, memory leaks?

Hi Maarten,

I'm happy to heard the patch worked. Those fixes will be available in the
next Voldemort version.

As you say the newsgroup is really quiet, but if you check in the project
github page, there is some activity there. Seems that version 0.95 is
already in the oven ;)

And regarding the roadmap, I think it's also a problem related with the
maintenance of the opened issues. The impression is that the project is not
really transparent with the community, or at least that's my impression. A
different thing is the feedback from the developers that so far has been
great, at least in my personal experience.

Regards,
Carlos.

On Sat, Apr 28, 2012 at 10:11 AM, Maarten Koopmans <


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chinmay Soman  
View profile  
 More options Apr 29 2012, 8:38 pm
From: Chinmay Soman <chinmay.cere...@gmail.com>
Date: Sun, 29 Apr 2012 17:38:12 -0700 (PDT)
Local: Sun, Apr 29 2012 8:38 pm
Subject: Re: Client thread safety, memory leaks?
Thanks Carlos for helping out with the patch and for the knowledge
sharing.

@ Maarten : I can understand the general frustration regarding late
replies in the Voldemort community. There would be a release out soon
including the patch submitted by Carlos. And yes, we will also try to
better communicate with respect to releases.

The reality is that there are a lot of open issues in the LinkedIn
world keeping the few devs busy. FYI: we're now aggressively looking
into the pending pull requests on github (since that is of higher
priority). In time, we hope to catch up with the Google group
questions as well.

On Apr 28, 4:38 am, Carlos Tasada <ctas...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Maarten Koopmans  
View profile  
 More options May 14 2012, 2:50 pm
From: Maarten Koopmans <maarten.koopm...@gmail.com>
Date: Mon, 14 May 2012 20:50:47 +0200
Local: Mon, May 14 2012 2:50 pm
Subject: Re: Client thread safety, memory leaks?

Good to read, catching up.... Voldemort is such an exceptional tedhnology,
that it would be painful to watch it go out. I'm happy that's not happening!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic