river-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Thompson <br...@systap.com>
Subject Re: Trunk merge and thread pools
Date Thu, 03 Dec 2015 01:48:12 GMT
Great!

----
Bryan Thompson
Chief Scientist & Founder
SYSTAP, LLC
4501 Tower Road
Greensboro, NC 27410
bryan@systap.com
http://blazegraph.com
http://blog.blazegraph.com

Blazegraphâ„¢ <http://www.blazegraph.com/> is our ultra high-performance
graph database that supports both RDF/SPARQL and Tinkerpop/Blueprints
APIs.  Blazegraph is now available with GPU acceleration using our disruptive
technology to accelerate data-parallel graph analytics and graph query.

CONFIDENTIALITY NOTICE:  This email and its contents and attachments are
for the sole use of the intended recipient(s) and are confidential or
proprietary to SYSTAP. Any unauthorized review, use, disclosure,
dissemination or copying of this email or its contents or attachments is
prohibited. If you have received this communication in error, please notify
the sender by reply email and permanently delete all copies of the email
and its contents and attachments.

On Wed, Dec 2, 2015 at 7:26 PM, Peter <jini@zeus.net.au> wrote:

> Just tried wrapping an Executors.newCachedThreadPool with a thread factory
> that creates threads as per the original
> org.apache.river.thread.NewThreadAction.
>
> Performance is much improved, the hotspot is gone.
>
> There are regression tests with sun bug Id's, which cause oome.  I thought
> this might
> prevent the executor from running,  but to my surprise both tests pass.
> These tests failed when I didn't pool threads and just let them be gc'd.
> These tests created over 11000 threads with waiting tasks.  In practise I
> wouldn't expect that to happen as an IOException should be thrown.  However
> there are sun bug id's 6313626 and 6304782 for these regression tests, if
> anyone has a record of these bugs or any information they can share, it
> would be much appreciated.
>
> It's worth noting that the jvm memory options should be tuned properly to
> avoid oome in any case.
>
> Lesson here is, creating threads and gc'ing them is much faster than
> thread pooling if your thread pool is not well optimised.
>
> It's worth noting that ObjectInputStream is now the hotspot for the test,
> the tested code's hotspots are DatagramSocket and SocketInputStream.
>
> ClassLoading is thread confined, there's a lot of class loading going on,
> but because it is uncontended, it only consumes 0.2% cpu, about the same as
> our security architecture overhead (non encrypted).
>
> Regards,
>
> Peter.
>
> Sent from my Samsung device.
>   Include original message
> ---- Original message ----
> From: Bryan Thompson <bryan@systap.com>
> Sent: 02/12/2015 11:25:03 pm
> To: <dev@river.apache.org> <dev@river.apache.org>
> Subject: Re: Trunk merge and thread pools
>
> Ah. I did not realize that we were discussing a river specific ThreadPool
> vs a Java Concurrency classes ThreadPoolExecutor.  I assume that it would
> be difficult to just substitute in one of the standard executors?
>
> Bryan
>
> On Wed, Dec 2, 2015 at 8:18 AM, Peter <jini@zeus.net.au> wrote:
>
> > First it's worth considering we have a very suboptimal threadpool.  There
> > are qa and jtreg tests that limit our ability to do much with ThreadPool.
> >
> > There are only two instances of ThreadPool, shared by various jeri
> > endpoint implementations, and other components.
> >
> > The implementation is allowed to create numerous threads, only limited by
> > available memory and oome.  At least two tests cause it to create over
> > 11000 threads.
> >
> > Also, it previously used a LinkedList queue,  but now uses a
> > BlockingQueue,  however the queue still uses poll, not take.
> >
> > The limitation seems to be the concern by the original developers that
> > there may be interdependencies between tasks.  Most tasks are method
> > invocations from incoming and outgoing remote calls.
> >
> > It probably warrants further investigation to see if there's a suitable
> > replacement.
> >
> > Regards,
> >
> > Peter.
> >
> > Sent from my Samsung device.
> >   Include original message
> > ---- Original message ----
> > From: Bryan Thompson <bryan@systap.com>
> > Sent: 02/12/2015 09:46:13 am
> > To: <dev@river.apache.org> <dev@river.apache.org>
> > Subject: Re: Trunk merge and thread pools
> >
> > Peter,
> >
>
> > It might be worth taking this observation about the thread pool behavior to
> > the java concurrency list.  See what feedback you get.  I would certainly
> > be interested in what people there have to say about this.
> >
> > Bryan
> > ​
> >
> >
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message