<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 08/06/2014 03:47 PM, Andrig Miller
wrote:<br>
</div>
<blockquote
cite="mid:25320436.672.1407336470565.JavaMail.andrig@worklaptop.miller.org"
type="cite">
<pre wrap="">
----- Original Message -----
</pre>
<blockquote type="cite">
<pre wrap="">From: "Bill Burke" <a class="moz-txt-link-rfc2396E" href="mailto:bburke@redhat.com"><bburke@redhat.com></a>
To: "Andrig Miller" <a class="moz-txt-link-rfc2396E" href="mailto:anmiller@redhat.com"><anmiller@redhat.com></a>
Cc: <a class="moz-txt-link-abbreviated" href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a>, "Jason Greene" <a class="moz-txt-link-rfc2396E" href="mailto:jason.greene@redhat.com"><jason.greene@redhat.com></a>
Sent: Tuesday, August 5, 2014 4:36:11 PM
Subject: Re: [wildfly-dev] Pooling EJB Session Beans per default
On 8/5/2014 3:54 PM, Andrig Miller wrote:
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">Its a horrible theory. :) How many EJB instances of a give type
are
created per request? Generally only 1. 1 instance of one object
of
one
type! My $5 bet is that if you went into EJB code and started
counting
how many object allocations were made per request, you'd lose
count
very
quickly. Better yet, run a single remote EJB request through a
perf
tool and let it count the number of allocations for you. It will
be
greater than 1. :)
Maybe the StrictMaxPool has an effect on performance because it
creates
a global synchronization bottleneck. Throughput is less and you
end
up
having less concurrent per-request objects being allocated and
GC'd.
</pre>
</blockquote>
<pre wrap="">
The number per request, while relevant is only part of the story.
The number of concurrent requests happening in the server
dictates the object allocation rate. Given enough concurrency,
even a very small number of object allocations per request can
create an object allocation rate that can no longer be sustained.
</pre>
</blockquote>
<pre wrap="">
I'm saying that the number of concurrent requests might not dictate
object allocation rate. There are probably a number of allocations
that
happen after the EJB instance is obtained. i.e. interception chains,
contexts, etc. If StrictMaxPool blocks until a new instance is
available, then there would be less allocations per request as
blocking
threads would be serialized.
Whoever is investigating StrictMaxPool, or EJB pooling in general
should
stop. Its pointless.
</pre>
</blockquote>
<pre wrap="">
Ah, no its not pointless. We have a new non-blocking implementation of StrictMaxPool, and its upstream in Wildfly 9, and will be in EAP 6.4. It has helped us increase our throughput, and reduce response times alot!
Andy</pre>
</blockquote>
Some contextual numbers around what Andy is describing. These are
results from one of our benchmarks;<br>
<b><br>
</b>
<table border="1" cellpadding="2" cellspacing="2" width="100%">
<tbody>
<tr>
<td valign="top"><b>Average response times (28600 concurrent
users)</b><br>
</td>
<td valign="top"><b>Pooled</b><br>
</td>
<td valign="top"><b>Non-pooled</b><br>
</td>
</tr>
<tr>
<td valign="top">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<span style="color: rgb(0, 0, 0); font-family: Verdana,
sans-serif; font-size: medium; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: auto; text-align:
left; text-indent: 0px; text-transform: none; white-space:
normal; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; display: inline
!important; float: none; background-color: rgb(255, 255,
255);">Remote EJB invocations<br>
</span></td>
<td valign="top">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<span style="color: rgb(0, 0, 0); font-family: Verdana,
sans-serif; font-size: medium; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: auto; text-align:
center; text-indent: 0px; text-transform: none;
white-space: normal; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; display: inline
!important; float: none; background-color: rgb(255, 255,
255);">0.114s</span></td>
<td valign="top">2.094s<br>
</td>
</tr>
<tr>
<td valign="top">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<span style="color: rgb(0, 0, 0); font-family: Verdana,
sans-serif; font-size: medium; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: auto; text-align:
left; text-indent: 0px; text-transform: none; white-space:
normal; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; display: inline
!important; float: none; background-color: rgb(241, 245,
249);">WS invocations<br>
</span></td>
<td valign="top">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<span style="color: rgb(0, 0, 0); font-family: Verdana,
sans-serif; font-size: medium; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: auto; text-align:
center; text-indent: 0px; text-transform: none;
white-space: normal; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; display: inline
!important; float: none; background-color: rgb(241, 245,
249);">0.105s</span></td>
<td valign="top">0.332s<br>
</td>
</tr>
<tr>
<td valign="top">HTTP web app invocations<br>
</td>
<td valign="top"><br>
</td>
<td valign="top"><br>
</td>
</tr>
<tr>
<td valign="top">HttpCallTypeA<br>
</td>
<td valign="top">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<span style="color: rgb(0, 0, 0); font-family: Verdana,
sans-serif; font-size: medium; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: auto; text-align:
center; text-indent: 0px; text-transform: none;
white-space: normal; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; display: inline
!important; float: none; background-color: rgb(255, 255,
255);">0.090s</span></td>
<td valign="top">5.589s<br>
</td>
</tr>
<tr>
<td valign="top">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
HttpCallTypeB</td>
<td valign="top">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<span style="color: rgb(0, 0, 0); font-family: Verdana,
sans-serif; font-size: medium; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: auto; text-align:
center; text-indent: 0px; text-transform: none;
white-space: normal; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; display: inline
!important; float: none; background-color: rgb(241, 245,
249);">0.042s</span></td>
<td valign="top">2.510s<br>
</td>
</tr>
<tr>
<td valign="top">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
HttpCallTypeC</td>
<td valign="top">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<span style="color: rgb(0, 0, 0); font-family: Verdana,
sans-serif; font-size: medium; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: auto; text-align:
center; text-indent: 0px; text-transform: none;
white-space: normal; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; display: inline
!important; float: none; background-color: rgb(255, 255,
255);">0.116s</span></td>
<td valign="top">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<span style="color: rgb(0, 0, 0); font-family: Verdana,
sans-serif; font-size: medium; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: auto; text-align:
center; text-indent: 0px; text-transform: none;
white-space: normal; widows: auto; word-spacing: 0px;
-webkit-text-stroke-width: 0px; display: inline
!important; float: none; background-color: rgb(255, 255,
255);">7.267S</span></td>
</tr>
</tbody>
</table>
<br>
The only difference between these two sets of numbers is EJB pooling.<br>
<blockquote
cite="mid:25320436.672.1407336470565.JavaMail.andrig@worklaptop.miller.org"
type="cite">
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap="">--
Bill Burke
JBoss, a division of Red Hat
<a class="moz-txt-link-freetext" href="http://bill.burkecentral.com">http://bill.burkecentral.com</a>
</pre>
</blockquote>
<pre wrap="">_______________________________________________
wildfly-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:wildfly-dev@lists.jboss.org">wildfly-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/wildfly-dev">https://lists.jboss.org/mailman/listinfo/wildfly-dev</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
John O'Hara
<a class="moz-txt-link-abbreviated" href="mailto:johara@redhat.com">johara@redhat.com</a>
JBoss, by Red Hat
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom.
Registered in UK and Wales under Company Registration No. 3798903 Directors: Michael Cunningham (USA), Charlie Peters (USA), Matt Parsons (USA) and Michael O'Neill (Ireland).
</pre>
</body>
</html>