You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by binhnt22 <Bi...@viettel.com.vn> on 2012/08/20 12:02:43 UTC
Tuscany SCA 2.0 web application performance is terrible
Hi all,
I have a web application that uses Tuscany SCA 2.0 running on Tomcat 7
-(Xms128m -Xmx512m -XX:MaxPermSize=512m)
So far everything seems to be ok until I tried to carry on a performance
test.
Using Jmeter 2.7, request directly to the servlet that call SCA service.
With 10 and 20 requests were ramed in 1 sec, the performance look promising.
But with 50 requests in 1 sec, the response time was so terrible, not
mention 100 or 200 request in 1 sec.
Did anyone face that problem? Any suggestion or solutions will be
appreciated.
Thasnk & Best regards,
RE: Tuscany SCA 2.0 web application performance is terrible
Posted by binhnt22 <Bi...@viettel.com.vn>.
@AllowsPassByReference look very useful here. But @Scope("COMPOSITE") need
to be rethink.
Because I call the first service from a servlet which carry on a
transaction, If there is only one instance, it'll hard to be manage the
database connection for each transaction.
Because it's a web application, I need each person (who logged on) have a
distinct session.
Here is my Servlet which invoke the SCA service
Best regards
From: Raymond Feng [mailto:enjoyjava@gmail.com]
Sent: Tuesday, August 21, 2012 11:29 AM
To: user@tuscany.apache.org
Cc: Binhbm@viettel.com.vn
Subject: Re: Tuscany SCA 2.0 web application performance is terrible
For each of the implementation class, can you add the following annotations
and try again?
import org.oasisopen.sca.annotation.AllowsPassByReference;
import org.oasisopen.sca.annotation.Scope;
@AllowsPassByReference // 1
@Scope("COMPOSITE") // 2
public class ...
1 is used to avoid copy of data between service calls
2 only creates one instance per composite
BTW,did you invoke the first service as SOAP web service? Are you open to
other lighter protocols such JSONRPC or REST?
Thanks,
Raymond
On Aug 20, 2012, at 8:56 PM, binhnt22 wrote:
Certainly, please take a look at it.
Thanks & Best regards
From: Raymond Feng [mailto:enjoyjava@gmail.com]
Sent: Tuesday, August 21, 2012 10:30 AM
To: user@tuscany.apache.org
Cc: user@tuscany.apache.org
Subject: Re: Tuscany SCA 2.0 web application performance is terrible
Can you share the sca java impl?
Raymond Feng
Sent from my iPhone
On Aug 20, 2012, at 7:43 PM, binhnt22 <Bi...@viettel.com.vn> wrote:
Hi Luciano,
I kept the @Scope default (@Scope was not present, so I think it's
STATELESS).
My aim is building a SOA based system, so I want to use binding.ws for BPM
easy to use.
All the SCA service are in the same app, how can I expose them as web
services but SCA service call each other by local call.
P/S: I attached my composite file for further information.
Thanks you & Best regards
From: Luciano Resende [mailto:luckbr1975@gmail.com]
Sent: Tuesday, August 21, 2012 8:59 AM
To: user@tuscany.apache.org
Subject: Re: Tuscany SCA 2.0 web application performance is terrible
On Mon, Aug 20, 2012 at 6:46 PM, binhnt22 <Bi...@viettel.com.vn> wrote:
Hi Raymond,
Thank you for your concern. Here is the information:
I'm building a demo just to test performance among SCA, BPM and our legacy
code. In order to decide to use SCA or not for our next-gen enterprise
system.
1. I have a Stock Transfer web application which does the following
things:
- Subtract the quantity of products from the source stock (Stock
table)
- Add the quantity of products into the target stock (Stock table)
- Create an importing product order if the product in the source
stock is too low (StockOrder table)
- Change the sale quota of the show that manages the target stock.
(ShopQuota table)
- Generate a stock transfer transaction (StockTrans table)
The legacy code(java), SCA service (2.0) and JBpm (5.1) process is a part of
the web application (struts2 + tiles). The database is Oracle 10g. The web
server is apache-tomcat-7.0.27
a) The legacy code is very simple, uses hibernate + c3p0, call all the
work in a sequence order.
b) The SCA: the web application has only one web.composite, contains 4
Component for each work (work 1st and 2nd is the same)
Each component was implemented by a java class which call the correlative
legacy code.
Each one expose a web service for JBpm through binding.ws
c) The BPM: create 4 handlers to manipulate 4 web service above, the
handlers use HttpClient (apache common-httpclient) to acquire the fastest
way when call web service
2. Except the database server, the web server and test environment are
on one PC. The database server is in the same Local network with the PC.
3. I kept the default Tomcat configuration. (CATALINA_OPTS="-Xms128m
-Xmx512m -XX:MaxPermSize=256m"
I know placing both Web server and Test environment in a PC is not ok. But
at least the SCA should be as good as the legacy code (slower 15-30%), but
it took 2-4 times.
Concurrent request
10
20
50
Web
Min (ms)
215
215
537
Max (ms)
283
1880
3972
Avg (ms)
259
753
2486
Error (%)
0%
0%
0%
SCA
Min
356
528
1940
Max
870
3726
15136
Avg
656
2932
8520
Error (%)
0%
0%
0%
BPM
Min
529
724
2694
Max
1954
3268
11889
Avg
1304
2509
10229
Error (%)
0%
0%
0%
Could you please share one of your system architecture which use Tuscany
heavily without performance issues? That would be a great help.
.
Best regards
Is your component defined as @Scope composite (a.k.a. singleton)
What if you try a different binding (e.g. REST, JSON-RPC or RMI) ?
--
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/
<web.composite>
<StockTransScaImpl.zip>
RE: Tuscany SCA 2.0 web application performance is terrible
Posted by binhnt22 <Bi...@viettel.com.vn>.
Hi,
I've tried Tomcat 6.0.26 and Tomcat 7.0.27 on different server, also tried
to deployed on Jboss AS 7.0.1 Final
It still had some "delay" when "return" a SCA service. And Tuscany SCA 2.0
seemed to be stuck in the 2nd service when having stress.
Check the attached Jboss logs, those were generated when I ran 10 concurrent
thread at the same time.
In server1.log, you can see the biggest elapsed time in in Add Stock Service
(the 2nd service called)
System.out.println("SCA "+ transactionId.toString() +" -
Start Subtract stock service: " + DateTimeUtils.getSysDateTime());
stockService.addStock(transactionId,
form.getShopSourceId(), form.getProductId(), form.getQuantity());
System.out.println("SCA "+ transactionId.toString() +" -
Start Add stock service: " + DateTimeUtils.getSysDateTime());
addStockService.addStock(transactionId,
form.getShopTargetId(), form.getProductId(), form.getQuantity());
System.out.println("SCA "+ transactionId.toString() +" -
Start quota service: " + DateTimeUtils.getSysDateTime());
quotaService.resetSaleQuota(transactionId,
form.getShopTargetId(), form.getProductId());
System.out.println("SCA "+ transactionId.toString() +" -
Start order service: " + DateTimeUtils.getSysDateTime());
orderService.createOrder(transactionId,
form.getShopSourceId(), form.getProductId());
System.out.println("SCA "+ transactionId.toString() +" -
Start trans service: " + DateTimeUtils.getSysDateTime());
When I comment this line : addStockService.addStock(transactionId,
form.getShopTargetId(), form.getProductId(), form.getQuantity());
And get the server2.log, the biggest elapsed time change to quotaService
Please let me know if you find out something.
Thanks & Best regards
From: binhnt22 [mailto:binhnt22@viettel.com.vn]
Sent: Wednesday, August 22, 2012 9:49 AM
To: 'user@tuscany.apache.org'
Cc: 'Binhbm@viettel.com.vn'
Subject: RE: Tuscany SCA 2.0 web application performance is terrible
Hi Raymond,
After removing some unnecessary files and librarys, also removed completely
web-related files, only keep 2 servlets for calling sca and bpm.
I attached my test-performance project (maven), please do some following
works before you run.
- Create table and some small data to your own database with the
file "tables.sql" in project folder
- Point the JNDI datasource to your database
- Change IP:Port in webapp/web.composite
- Change IP:Port in urlWsdl of
com.viettel.bccs2.jbpm.workitem.StockTransFullServiceHandler (only if you
want to test bpm+sca J )
- Fix your build path with the "exclusive.jar" in WEB-INF/lib
- Deploy on Tomcat 7.x
- The test instruction will be showed in my welcome file, I also
attached the jmeter test plan for it (should change server ip and port)
Please attention:
- The "delay phenomenon" only appear when Tomcat is not placed in
development environment (In eclipse), only appear in independent Tomcat
(both in my PC or server)
- Let test with 10, 20, 50 concurrent thread send request in 1
second.
After deploying, you'll have my clone test performance project to check.
Thank you & Best regards
From: Raymond Feng [mailto:enjoyjava@gmail.com]
Sent: Wednesday, August 22, 2012 5:59 AM
To: user@tuscany.apache.org
Cc: Binhbm@viettel.com.vn
Subject: Re: Tuscany SCA 2.0 web application performance is terrible
Hi,
It's weird to see the overhead for these calls. I did a similar test this
morning and the cost only happens for the 1st call (26 ms to enter the
call). Which Tuscany version are you testing? Would it be possible to share
the application by mocking up the service impl?
Thanks,
Raymond
getService: 6 --> service lookup
Enter: 26 --> the overhead between calling the proxy and entering the impl
Exit: 0 --> the overhead between returning from the impl and going back to
the caller
Total: 32 --> The total round-trip
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 2
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 1
getService: 0
Enter: 15
Exit: 0
Total: 18
getService: 1
Enter: 1
Exit: 0
Total: 1
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 1
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 6
Exit: 0
Total: 6
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 1
Enter: 0
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 2
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 21
Exit: 0
Total: 21
getService: 0
Enter: 0
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 1
Enter: 10
Exit: 0
Total: 10
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 22
Exit: 0
Total: 22
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 0
Exit: 0
Total: 4
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 1
Total: 1
getService: 0
Enter: 7
Exit: 0
Total: 7
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 4
Exit: 0
Total: 4
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 5
Exit: 0
Total: 6
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
Aug 21, 2012 3:53:49 PM org.apache.tuscany.sca.node.impl.NodeImpl stop
INFO: Stopping node: http://tuscany.apache.org/sca/1.1/nodes/default0
Aug 21, 2012 3:53:49 PM
org.apache.tuscany.sca.core.assembly.impl.DomainRegistryImpl removeEndpoint
INFO: Remove endpoint - binding.sca - HelloComponent/Hello
Aug 21, 2012 3:53:49 PM
org.apache.tuscany.sca.core.assembly.impl.DomainRegistryImpl removeEndpoint
INFO: Remove endpoint - binding.sca - DateComponent/DateService
On Aug 21, 2012, at 4:20 AM, binhnt22 wrote:
After a lot of investigating work (I moved tomcat to a real server), I got a
few below thing
@AllowsPassByReference : nothing change, maybe because I used primitive
parameters.
@Scope("COMPOSITE"): connection closed, not good for many concurrent web
transactions.
I placed many time logs in the source code. Here's an interesting result.
The code block
System.out.println("SCA - Start stock1 service: " +
DateTimeUtils.getSysDateTime());
stockService.addStock(form.getShopSourceId(), form.getProductId(),
-form.getQuantity());
System.out.println("SCA - Start stock2 service: " +
DateTimeUtils.getSysDateTime());
stockService.addStock(form.getShopTargetId(), form.getProductId(),
form.getQuantity());
System.out.println("SCA - Start quota service: " +
DateTimeUtils.getSysDateTime());
quotaService.resetSaleQuota(form.getShopTargetId(), form.getProductId());
System.out.println("SCA - Start order service: " +
DateTimeUtils.getSysDateTime());
orderService.createOrder(form.getShopSourceId(), form.getProductId());
System.out.println("SCA - Start trans service: " +
DateTimeUtils.getSysDateTime());
In each service function, I also place a start time log at the beginning of
the function and an end time log at the end of the function to get the
function's elapsed time.
Anh here's the log after 1 run (every time they stayed the same)
<image001.png>
SCA runtime took 5ms to go into Implementation class but 30-50 ms to return
When the number of reference increase, the waste time will become
unacceptable for an end-user web interface.
May you explain this phenomenon and give some advice to resolve it.
Best regards
From: Raymond Feng [mailto:enjoyjava@gmail.com]
Sent: Tuesday, August 21, 2012 11:29 AM
To: user@tuscany.apache.org
Cc: Binhbm@viettel.com.vn
Subject: Re: Tuscany SCA 2.0 web application performance is terrible
For each of the implementation class, can you add the following annotations
and try again?
import org.oasisopen.sca.annotation.AllowsPassByReference;
import org.oasisopen.sca.annotation.Scope;
@AllowsPassByReference // 1
@Scope("COMPOSITE") // 2
public class ...
1 is used to avoid copy of data between service calls
2 only creates one instance per composite
BTW,did you invoke the first service as SOAP web service? Are you open to
other lighter protocols such JSONRPC or REST?
Thanks,
Raymond
On Aug 20, 2012, at 8:56 PM, binhnt22 wrote:
Certainly, please take a look at it.
Thanks & Best regards
From: Raymond Feng [mailto:enjoyjava@gmail.com]
Sent: Tuesday, August 21, 2012 10:30 AM
To: user@tuscany.apache.org
Cc: user@tuscany.apache.org
Subject: Re: Tuscany SCA 2.0 web application performance is terrible
Can you share the sca java impl?
Raymond Feng
Sent from my iPhone
On Aug 20, 2012, at 7:43 PM, binhnt22 <Bi...@viettel.com.vn> wrote:
Hi Luciano,
I kept the @Scope default (@Scope was not present, so I think it's
STATELESS).
My aim is building a SOA based system, so I want to use binding.ws for BPM
easy to use.
All the SCA service are in the same app, how can I expose them as web
services but SCA service call each other by local call.
P/S: I attached my composite file for further information.
Thanks you & Best regards
From: Luciano Resende [mailto:luckbr1975@gmail.com]
Sent: Tuesday, August 21, 2012 8:59 AM
To: user@tuscany.apache.org
Subject: Re: Tuscany SCA 2.0 web application performance is terrible
On Mon, Aug 20, 2012 at 6:46 PM, binhnt22 <Bi...@viettel.com.vn> wrote:
Hi Raymond,
Thank you for your concern. Here is the information:
I'm building a demo just to test performance among SCA, BPM and our legacy
code. In order to decide to use SCA or not for our next-gen enterprise
system.
1. I have a Stock Transfer web application which does the following
things:
- Subtract the quantity of products from the source stock (Stock
table)
- Add the quantity of products into the target stock (Stock table)
- Create an importing product order if the product in the source
stock is too low (StockOrder table)
- Change the sale quota of the show that manages the target stock.
(ShopQuota table)
- Generate a stock transfer transaction (StockTrans table)
The legacy code(java), SCA service (2.0) and JBpm (5.1) process is a part of
the web application (struts2 + tiles). The database is Oracle 10g. The web
server is apache-tomcat-7.0.27
a) The legacy code is very simple, uses hibernate + c3p0, call all the
work in a sequence order.
b) The SCA: the web application has only one web.composite, contains 4
Component for each work (work 1st and 2nd is the same)
Each component was implemented by a java class which call the correlative
legacy code.
Each one expose a web service for JBpm through binding.ws
c) The BPM: create 4 handlers to manipulate 4 web service above, the
handlers use HttpClient (apache common-httpclient) to acquire the fastest
way when call web service
2. Except the database server, the web server and test environment are
on one PC. The database server is in the same Local network with the PC.
3. I kept the default Tomcat configuration. (CATALINA_OPTS="-Xms128m
-Xmx512m -XX:MaxPermSize=256m"
I know placing both Web server and Test environment in a PC is not ok. But
at least the SCA should be as good as the legacy code (slower 15-30%), but
it took 2-4 times.
Concurrent request
10
20
50
Web
Min (ms)
215
215
537
Max (ms)
283
1880
3972
Avg (ms)
259
753
2486
Error (%)
0%
0%
0%
SCA
Min
356
528
1940
Max
870
3726
15136
Avg
656
2932
8520
Error (%)
0%
0%
0%
BPM
Min
529
724
2694
Max
1954
3268
11889
Avg
1304
2509
10229
Error (%)
0%
0%
0%
Could you please share one of your system architecture which use Tuscany
heavily without performance issues? That would be a great help.
.
Best regards
Is your component defined as @Scope composite (a.k.a. singleton)
What if you try a different binding (e.g. REST, JSON-RPC or RMI) ?
--
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/
<web.composite>
<StockTransScaImpl.zip>
Re: Tuscany SCA 2.0 web application performance is terrible
Posted by Raymond Feng <en...@gmail.com>.
An SCA service can be configured with multiple bindings, such as:
<service name="">
<binding.sca/>
<binding.ws name="ws" .../>
...
Raymond Feng
Sent from my iPhone
On Aug 22, 2012, at 7:51 AM, Luciano Resende <lu...@gmail.com> wrote:
> On Wed, Aug 22, 2012 at 3:42 AM, binhnt22 <Bi...@viettel.com.vn> wrote:
>>
>> Thank you very much for your support.
>>
>> I did resolve this problem by removing binding.ws in each SCA service
>> after looking into Tuscany SCA source code.
>>
>> The speed was incredible fast much more than I expected.
>>
>> However, how can I expose web service for BPM use but SCA services still
>> call each other by normal call (direct call)
>>
>> Best regards
>>
>
> You can make the internal/local components to use the default
> <binding.sca> instead of <binding.ws>.
>
>
>
> --
> Luciano Resende
> http://people.apache.org/~lresende
> http://twitter.com/lresende1975
> http://lresende.blogspot.com/
Re: Tuscany SCA 2.0 web application performance is terrible
Posted by Luciano Resende <lu...@gmail.com>.
On Wed, Aug 22, 2012 at 3:42 AM, binhnt22 <Bi...@viettel.com.vn> wrote:
>
> Thank you very much for your support.
>
> I did resolve this problem by removing binding.ws in each SCA service
> after looking into Tuscany SCA source code.
>
> The speed was incredible fast much more than I expected.
>
> However, how can I expose web service for BPM use but SCA services still
> call each other by normal call (direct call)
>
> Best regards
>
You can make the internal/local components to use the default
<binding.sca> instead of <binding.ws>.
--
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/
RE: Tuscany SCA 2.0 web application performance is terrible
Posted by binhnt22 <Bi...@viettel.com.vn>.
Thank you very much for your support.
I did resolve this problem by removing binding.ws in each SCA service after
looking into Tuscany SCA source code.
The speed was incredible fast much more than I expected.
However, how can I expose web service for BPM use but SCA services still
call each other by normal call (direct call)
Best regards
From: binhnt22 [mailto:binhnt22@viettel.com.vn]
Sent: Wednesday, August 22, 2012 3:50 PM
To: 'user@tuscany.apache.org'
Cc: 'Binhbm@viettel.com.vn'
Subject: RE: Tuscany SCA 2.0 web application performance is terrible
Hi,
I've tried Tomcat 6.0.26 and Tomcat 7.0.27 on different server, also tried
to deployed on Jboss AS 7.0.1 Final
It still had some "delay" when "return" a SCA service. And Tuscany SCA 2.0
seemed to be stuck in the 2nd service when having stress.
Check the attached Jboss logs, those were generated when I ran 10 concurrent
thread at the same time.
In server1.log, you can see the biggest elapsed time in in Add Stock Service
(the 2nd service called)
System.out.println("SCA "+ transactionId.toString() +" -
Start Subtract stock service: " + DateTimeUtils.getSysDateTime());
stockService.addStock(transactionId,
form.getShopSourceId(), form.getProductId(), form.getQuantity());
System.out.println("SCA "+ transactionId.toString() +" -
Start Add stock service: " + DateTimeUtils.getSysDateTime());
addStockService.addStock(transactionId,
form.getShopTargetId(), form.getProductId(), form.getQuantity());
System.out.println("SCA "+ transactionId.toString() +" -
Start quota service: " + DateTimeUtils.getSysDateTime());
quotaService.resetSaleQuota(transactionId,
form.getShopTargetId(), form.getProductId());
System.out.println("SCA "+ transactionId.toString() +" -
Start order service: " + DateTimeUtils.getSysDateTime());
orderService.createOrder(transactionId,
form.getShopSourceId(), form.getProductId());
System.out.println("SCA "+ transactionId.toString() +" -
Start trans service: " + DateTimeUtils.getSysDateTime());
When I comment this line : addStockService.addStock(transactionId,
form.getShopTargetId(), form.getProductId(), form.getQuantity());
And get the server2.log, the biggest elapsed time change to quotaService
Please let me know if you find out something.
Thanks & Best regards
From: binhnt22 [mailto:binhnt22@viettel.com.vn]
Sent: Wednesday, August 22, 2012 9:49 AM
To: 'user@tuscany.apache.org'
Cc: 'Binhbm@viettel.com.vn'
Subject: RE: Tuscany SCA 2.0 web application performance is terrible
Hi Raymond,
After removing some unnecessary files and librarys, also removed completely
web-related files, only keep 2 servlets for calling sca and bpm.
I attached my test-performance project (maven), please do some following
works before you run.
- Create table and some small data to your own database with the
file "tables.sql" in project folder
- Point the JNDI datasource to your database
- Change IP:Port in webapp/web.composite
- Change IP:Port in urlWsdl of
com.viettel.bccs2.jbpm.workitem.StockTransFullServiceHandler (only if you
want to test bpm+sca J )
- Fix your build path with the "exclusive.jar" in WEB-INF/lib
- Deploy on Tomcat 7.x
- The test instruction will be showed in my welcome file, I also
attached the jmeter test plan for it (should change server ip and port)
Please attention:
- The "delay phenomenon" only appear when Tomcat is not placed in
development environment (In eclipse), only appear in independent Tomcat
(both in my PC or server)
- Let test with 10, 20, 50 concurrent thread send request in 1
second.
After deploying, you'll have my clone test performance project to check.
Thank you & Best regards
From: Raymond Feng [mailto:enjoyjava@gmail.com]
Sent: Wednesday, August 22, 2012 5:59 AM
To: user@tuscany.apache.org
Cc: Binhbm@viettel.com.vn
Subject: Re: Tuscany SCA 2.0 web application performance is terrible
Hi,
It's weird to see the overhead for these calls. I did a similar test this
morning and the cost only happens for the 1st call (26 ms to enter the
call). Which Tuscany version are you testing? Would it be possible to share
the application by mocking up the service impl?
Thanks,
Raymond
getService: 6 --> service lookup
Enter: 26 --> the overhead between calling the proxy and entering the impl
Exit: 0 --> the overhead between returning from the impl and going back to
the caller
Total: 32 --> The total round-trip
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 2
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 1
getService: 0
Enter: 15
Exit: 0
Total: 18
getService: 1
Enter: 1
Exit: 0
Total: 1
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 1
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 6
Exit: 0
Total: 6
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 1
Enter: 0
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 2
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 21
Exit: 0
Total: 21
getService: 0
Enter: 0
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 1
Enter: 10
Exit: 0
Total: 10
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 22
Exit: 0
Total: 22
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 0
Exit: 0
Total: 4
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 1
Total: 1
getService: 0
Enter: 7
Exit: 0
Total: 7
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 4
Exit: 0
Total: 4
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 5
Exit: 0
Total: 6
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
Aug 21, 2012 3:53:49 PM org.apache.tuscany.sca.node.impl.NodeImpl stop
INFO: Stopping node: http://tuscany.apache.org/sca/1.1/nodes/default0
Aug 21, 2012 3:53:49 PM
org.apache.tuscany.sca.core.assembly.impl.DomainRegistryImpl removeEndpoint
INFO: Remove endpoint - binding.sca - HelloComponent/Hello
Aug 21, 2012 3:53:49 PM
org.apache.tuscany.sca.core.assembly.impl.DomainRegistryImpl removeEndpoint
INFO: Remove endpoint - binding.sca - DateComponent/DateService
On Aug 21, 2012, at 4:20 AM, binhnt22 wrote:
After a lot of investigating work (I moved tomcat to a real server), I got a
few below thing
@AllowsPassByReference : nothing change, maybe because I used primitive
parameters.
@Scope("COMPOSITE"): connection closed, not good for many concurrent web
transactions.
I placed many time logs in the source code. Here's an interesting result.
The code block
System.out.println("SCA - Start stock1 service: " +
DateTimeUtils.getSysDateTime());
stockService.addStock(form.getShopSourceId(), form.getProductId(),
-form.getQuantity());
System.out.println("SCA - Start stock2 service: " +
DateTimeUtils.getSysDateTime());
stockService.addStock(form.getShopTargetId(), form.getProductId(),
form.getQuantity());
System.out.println("SCA - Start quota service: " +
DateTimeUtils.getSysDateTime());
quotaService.resetSaleQuota(form.getShopTargetId(), form.getProductId());
System.out.println("SCA - Start order service: " +
DateTimeUtils.getSysDateTime());
orderService.createOrder(form.getShopSourceId(), form.getProductId());
System.out.println("SCA - Start trans service: " +
DateTimeUtils.getSysDateTime());
In each service function, I also place a start time log at the beginning of
the function and an end time log at the end of the function to get the
function's elapsed time.
Anh here's the log after 1 run (every time they stayed the same)
<image001.png>
SCA runtime took 5ms to go into Implementation class but 30-50 ms to return
When the number of reference increase, the waste time will become
unacceptable for an end-user web interface.
May you explain this phenomenon and give some advice to resolve it.
Best regards
From: Raymond Feng [mailto:enjoyjava@gmail.com]
Sent: Tuesday, August 21, 2012 11:29 AM
To: user@tuscany.apache.org
Cc: Binhbm@viettel.com.vn
Subject: Re: Tuscany SCA 2.0 web application performance is terrible
For each of the implementation class, can you add the following annotations
and try again?
import org.oasisopen.sca.annotation.AllowsPassByReference;
import org.oasisopen.sca.annotation.Scope;
@AllowsPassByReference // 1
@Scope("COMPOSITE") // 2
public class ...
1 is used to avoid copy of data between service calls
2 only creates one instance per composite
BTW,did you invoke the first service as SOAP web service? Are you open to
other lighter protocols such JSONRPC or REST?
Thanks,
Raymond
On Aug 20, 2012, at 8:56 PM, binhnt22 wrote:
Certainly, please take a look at it.
Thanks & Best regards
From: Raymond Feng [mailto:enjoyjava@gmail.com]
Sent: Tuesday, August 21, 2012 10:30 AM
To: user@tuscany.apache.org
Cc: user@tuscany.apache.org
Subject: Re: Tuscany SCA 2.0 web application performance is terrible
Can you share the sca java impl?
Raymond Feng
Sent from my iPhone
On Aug 20, 2012, at 7:43 PM, binhnt22 <Bi...@viettel.com.vn> wrote:
Hi Luciano,
I kept the @Scope default (@Scope was not present, so I think it's
STATELESS).
My aim is building a SOA based system, so I want to use binding.ws for BPM
easy to use.
All the SCA service are in the same app, how can I expose them as web
services but SCA service call each other by local call.
P/S: I attached my composite file for further information.
Thanks you & Best regards
From: Luciano Resende [mailto:luckbr1975@gmail.com]
Sent: Tuesday, August 21, 2012 8:59 AM
To: user@tuscany.apache.org
Subject: Re: Tuscany SCA 2.0 web application performance is terrible
On Mon, Aug 20, 2012 at 6:46 PM, binhnt22 <Bi...@viettel.com.vn> wrote:
Hi Raymond,
Thank you for your concern. Here is the information:
I'm building a demo just to test performance among SCA, BPM and our legacy
code. In order to decide to use SCA or not for our next-gen enterprise
system.
1. I have a Stock Transfer web application which does the following
things:
- Subtract the quantity of products from the source stock (Stock
table)
- Add the quantity of products into the target stock (Stock table)
- Create an importing product order if the product in the source
stock is too low (StockOrder table)
- Change the sale quota of the show that manages the target stock.
(ShopQuota table)
- Generate a stock transfer transaction (StockTrans table)
The legacy code(java), SCA service (2.0) and JBpm (5.1) process is a part of
the web application (struts2 + tiles). The database is Oracle 10g. The web
server is apache-tomcat-7.0.27
a) The legacy code is very simple, uses hibernate + c3p0, call all the
work in a sequence order.
b) The SCA: the web application has only one web.composite, contains 4
Component for each work (work 1st and 2nd is the same)
Each component was implemented by a java class which call the correlative
legacy code.
Each one expose a web service for JBpm through binding.ws
c) The BPM: create 4 handlers to manipulate 4 web service above, the
handlers use HttpClient (apache common-httpclient) to acquire the fastest
way when call web service
2. Except the database server, the web server and test environment are
on one PC. The database server is in the same Local network with the PC.
3. I kept the default Tomcat configuration. (CATALINA_OPTS="-Xms128m
-Xmx512m -XX:MaxPermSize=256m"
I know placing both Web server and Test environment in a PC is not ok. But
at least the SCA should be as good as the legacy code (slower 15-30%), but
it took 2-4 times.
Concurrent request
10
20
50
Web
Min (ms)
215
215
537
Max (ms)
283
1880
3972
Avg (ms)
259
753
2486
Error (%)
0%
0%
0%
SCA
Min
356
528
1940
Max
870
3726
15136
Avg
656
2932
8520
Error (%)
0%
0%
0%
BPM
Min
529
724
2694
Max
1954
3268
11889
Avg
1304
2509
10229
Error (%)
0%
0%
0%
Could you please share one of your system architecture which use Tuscany
heavily without performance issues? That would be a great help.
.
Best regards
Is your component defined as @Scope composite (a.k.a. singleton)
What if you try a different binding (e.g. REST, JSON-RPC or RMI) ?
--
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/
<web.composite>
<StockTransScaImpl.zip>
RE: Tuscany SCA 2.0 web application performance is terrible
Posted by binhnt22 <Bi...@viettel.com.vn>.
Hi Raymond,
After removing some unnecessary files and librarys, also removed completely
web-related files, only keep 2 servlets for calling sca and bpm.
I attached my test-performance project (maven), please do some following
works before you run.
- Create table and some small data to your own database with the
file "tables.sql" in project folder
- Point the JNDI datasource to your database
- Change IP:Port in webapp/web.composite
- Change IP:Port in urlWsdl of
com.viettel.bccs2.jbpm.workitem.StockTransFullServiceHandler (only if you
want to test bpm+sca J )
- Fix your build path with the "exclusive.jar" in WEB-INF/lib
- Deploy on Tomcat 7.x
- The test instruction will be showed in my welcome file, I also
attached the jmeter test plan for it (should change server ip and port)
Please attention:
- The "delay phenomenon" only appear when Tomcat is not placed in
development environment (In eclipse), only appear in independent Tomcat
(both in my PC or server)
- Let test with 10, 20, 50 concurrent thread send request in 1
second.
After deploying, you'll have my clone test performance project to check.
Thank you & Best regards
From: Raymond Feng [mailto:enjoyjava@gmail.com]
Sent: Wednesday, August 22, 2012 5:59 AM
To: user@tuscany.apache.org
Cc: Binhbm@viettel.com.vn
Subject: Re: Tuscany SCA 2.0 web application performance is terrible
Hi,
It's weird to see the overhead for these calls. I did a similar test this
morning and the cost only happens for the 1st call (26 ms to enter the
call). Which Tuscany version are you testing? Would it be possible to share
the application by mocking up the service impl?
Thanks,
Raymond
getService: 6 --> service lookup
Enter: 26 --> the overhead between calling the proxy and entering the impl
Exit: 0 --> the overhead between returning from the impl and going back to
the caller
Total: 32 --> The total round-trip
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 2
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 1
getService: 0
Enter: 15
Exit: 0
Total: 18
getService: 1
Enter: 1
Exit: 0
Total: 1
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 1
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 6
Exit: 0
Total: 6
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 1
Enter: 0
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 2
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 21
Exit: 0
Total: 21
getService: 0
Enter: 0
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 1
Enter: 10
Exit: 0
Total: 10
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 22
Exit: 0
Total: 22
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 0
Exit: 0
Total: 4
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 1
Total: 1
getService: 0
Enter: 7
Exit: 0
Total: 7
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 4
Exit: 0
Total: 4
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 5
Exit: 0
Total: 6
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
Aug 21, 2012 3:53:49 PM org.apache.tuscany.sca.node.impl.NodeImpl stop
INFO: Stopping node: http://tuscany.apache.org/sca/1.1/nodes/default0
Aug 21, 2012 3:53:49 PM
org.apache.tuscany.sca.core.assembly.impl.DomainRegistryImpl removeEndpoint
INFO: Remove endpoint - binding.sca - HelloComponent/Hello
Aug 21, 2012 3:53:49 PM
org.apache.tuscany.sca.core.assembly.impl.DomainRegistryImpl removeEndpoint
INFO: Remove endpoint - binding.sca - DateComponent/DateService
On Aug 21, 2012, at 4:20 AM, binhnt22 wrote:
After a lot of investigating work (I moved tomcat to a real server), I got a
few below thing
@AllowsPassByReference : nothing change, maybe because I used primitive
parameters.
@Scope("COMPOSITE"): connection closed, not good for many concurrent web
transactions.
I placed many time logs in the source code. Here's an interesting result.
The code block
System.out.println("SCA - Start stock1 service: " +
DateTimeUtils.getSysDateTime());
stockService.addStock(form.getShopSourceId(), form.getProductId(),
-form.getQuantity());
System.out.println("SCA - Start stock2 service: " +
DateTimeUtils.getSysDateTime());
stockService.addStock(form.getShopTargetId(), form.getProductId(),
form.getQuantity());
System.out.println("SCA - Start quota service: " +
DateTimeUtils.getSysDateTime());
quotaService.resetSaleQuota(form.getShopTargetId(), form.getProductId());
System.out.println("SCA - Start order service: " +
DateTimeUtils.getSysDateTime());
orderService.createOrder(form.getShopSourceId(), form.getProductId());
System.out.println("SCA - Start trans service: " +
DateTimeUtils.getSysDateTime());
In each service function, I also place a start time log at the beginning of
the function and an end time log at the end of the function to get the
function's elapsed time.
Anh here's the log after 1 run (every time they stayed the same)
<image001.png>
SCA runtime took 5ms to go into Implementation class but 30-50 ms to return
When the number of reference increase, the waste time will become
unacceptable for an end-user web interface.
May you explain this phenomenon and give some advice to resolve it.
Best regards
From: Raymond Feng [mailto:enjoyjava@gmail.com]
Sent: Tuesday, August 21, 2012 11:29 AM
To: user@tuscany.apache.org
Cc: Binhbm@viettel.com.vn
Subject: Re: Tuscany SCA 2.0 web application performance is terrible
For each of the implementation class, can you add the following annotations
and try again?
import org.oasisopen.sca.annotation.AllowsPassByReference;
import org.oasisopen.sca.annotation.Scope;
@AllowsPassByReference // 1
@Scope("COMPOSITE") // 2
public class ...
1 is used to avoid copy of data between service calls
2 only creates one instance per composite
BTW,did you invoke the first service as SOAP web service? Are you open to
other lighter protocols such JSONRPC or REST?
Thanks,
Raymond
On Aug 20, 2012, at 8:56 PM, binhnt22 wrote:
Certainly, please take a look at it.
Thanks & Best regards
From: Raymond Feng [mailto:enjoyjava@gmail.com]
Sent: Tuesday, August 21, 2012 10:30 AM
To: user@tuscany.apache.org
Cc: user@tuscany.apache.org
Subject: Re: Tuscany SCA 2.0 web application performance is terrible
Can you share the sca java impl?
Raymond Feng
Sent from my iPhone
On Aug 20, 2012, at 7:43 PM, binhnt22 <Bi...@viettel.com.vn> wrote:
Hi Luciano,
I kept the @Scope default (@Scope was not present, so I think it's
STATELESS).
My aim is building a SOA based system, so I want to use binding.ws for BPM
easy to use.
All the SCA service are in the same app, how can I expose them as web
services but SCA service call each other by local call.
P/S: I attached my composite file for further information.
Thanks you & Best regards
From: Luciano Resende [mailto:luckbr1975@gmail.com]
Sent: Tuesday, August 21, 2012 8:59 AM
To: user@tuscany.apache.org
Subject: Re: Tuscany SCA 2.0 web application performance is terrible
On Mon, Aug 20, 2012 at 6:46 PM, binhnt22 <Bi...@viettel.com.vn> wrote:
Hi Raymond,
Thank you for your concern. Here is the information:
I'm building a demo just to test performance among SCA, BPM and our legacy
code. In order to decide to use SCA or not for our next-gen enterprise
system.
1. I have a Stock Transfer web application which does the following
things:
- Subtract the quantity of products from the source stock (Stock
table)
- Add the quantity of products into the target stock (Stock table)
- Create an importing product order if the product in the source
stock is too low (StockOrder table)
- Change the sale quota of the show that manages the target stock.
(ShopQuota table)
- Generate a stock transfer transaction (StockTrans table)
The legacy code(java), SCA service (2.0) and JBpm (5.1) process is a part of
the web application (struts2 + tiles). The database is Oracle 10g. The web
server is apache-tomcat-7.0.27
a) The legacy code is very simple, uses hibernate + c3p0, call all the
work in a sequence order.
b) The SCA: the web application has only one web.composite, contains 4
Component for each work (work 1st and 2nd is the same)
Each component was implemented by a java class which call the correlative
legacy code.
Each one expose a web service for JBpm through binding.ws
c) The BPM: create 4 handlers to manipulate 4 web service above, the
handlers use HttpClient (apache common-httpclient) to acquire the fastest
way when call web service
2. Except the database server, the web server and test environment are
on one PC. The database server is in the same Local network with the PC.
3. I kept the default Tomcat configuration. (CATALINA_OPTS="-Xms128m
-Xmx512m -XX:MaxPermSize=256m"
I know placing both Web server and Test environment in a PC is not ok. But
at least the SCA should be as good as the legacy code (slower 15-30%), but
it took 2-4 times.
Concurrent request
10
20
50
Web
Min (ms)
215
215
537
Max (ms)
283
1880
3972
Avg (ms)
259
753
2486
Error (%)
0%
0%
0%
SCA
Min
356
528
1940
Max
870
3726
15136
Avg
656
2932
8520
Error (%)
0%
0%
0%
BPM
Min
529
724
2694
Max
1954
3268
11889
Avg
1304
2509
10229
Error (%)
0%
0%
0%
Could you please share one of your system architecture which use Tuscany
heavily without performance issues? That would be a great help.
.
Best regards
Is your component defined as @Scope composite (a.k.a. singleton)
What if you try a different binding (e.g. REST, JSON-RPC or RMI) ?
--
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/
<web.composite>
<StockTransScaImpl.zip>
Re: Tuscany SCA 2.0 web application performance is terrible
Posted by Raymond Feng <en...@gmail.com>.
Hi,
It's weird to see the overhead for these calls. I did a similar test this morning and the cost only happens for the 1st call (26 ms to enter the call). Which Tuscany version are you testing? Would it be possible to share the application by mocking up the service impl?
Thanks,
Raymond
getService: 6 --> service lookup
Enter: 26 --> the overhead between calling the proxy and entering the impl
Exit: 0 --> the overhead between returning from the impl and going back to the caller
Total: 32 --> The total round-trip
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 2
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 1
getService: 0
Enter: 15
Exit: 0
Total: 18
getService: 1
Enter: 1
Exit: 0
Total: 1
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 1
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 6
Exit: 0
Total: 6
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 1
Enter: 0
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 2
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 21
Exit: 0
Total: 21
getService: 0
Enter: 0
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 1
Enter: 10
Exit: 0
Total: 10
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 22
Exit: 0
Total: 22
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 1
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 0
Exit: 0
Total: 4
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 1
Total: 1
getService: 0
Enter: 7
Exit: 0
Total: 7
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 0
Exit: 0
Total: 0
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 4
Exit: 0
Total: 4
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 5
Exit: 0
Total: 6
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
getService: 0
Enter: 1
Exit: 0
Total: 1
Aug 21, 2012 3:53:49 PM org.apache.tuscany.sca.node.impl.NodeImpl stop
INFO: Stopping node: http://tuscany.apache.org/sca/1.1/nodes/default0
Aug 21, 2012 3:53:49 PM org.apache.tuscany.sca.core.assembly.impl.DomainRegistryImpl removeEndpoint
INFO: Remove endpoint - binding.sca - HelloComponent/Hello
Aug 21, 2012 3:53:49 PM org.apache.tuscany.sca.core.assembly.impl.DomainRegistryImpl removeEndpoint
INFO: Remove endpoint - binding.sca - DateComponent/DateService
On Aug 21, 2012, at 4:20 AM, binhnt22 wrote:
> After a lot of investigating work (I moved tomcat to a real server), I got a few below thing
>
> @AllowsPassByReference : nothing change, maybe because I used primitive parameters.
> @Scope(“COMPOSITE”): connection closed, not good for many concurrent web transactions.
>
> I placed many time logs in the source code. Here’s an interesting result.
> The code block
> System.out.println("SCA - Start stock1 service: " + DateTimeUtils.getSysDateTime());
> stockService.addStock(form.getShopSourceId(), form.getProductId(), -form.getQuantity());
> System.out.println("SCA - Start stock2 service: " + DateTimeUtils.getSysDateTime());
> stockService.addStock(form.getShopTargetId(), form.getProductId(), form.getQuantity());
> System.out.println("SCA - Start quota service: " + DateTimeUtils.getSysDateTime());
> quotaService.resetSaleQuota(form.getShopTargetId(), form.getProductId());
> System.out.println("SCA - Start order service: " + DateTimeUtils.getSysDateTime());
> orderService.createOrder(form.getShopSourceId(), form.getProductId());
> System.out.println("SCA - Start trans service: " + DateTimeUtils.getSysDateTime());
> In each service function, I also place a start time log at the beginning of the function and an end time log at the end of the function to get the function’s elapsed time.
> Anh here’s the log after 1 run (every time they stayed the same)
> <image001.png>
> SCA runtime took 5ms to go into Implementation class but 30-50 ms to return
>
> When the number of reference increase, the waste time will become unacceptable for an end-user web interface.
> May you explain this phenomenon and give some advice to resolve it.
>
> Best regards
>
> From: Raymond Feng [mailto:enjoyjava@gmail.com]
> Sent: Tuesday, August 21, 2012 11:29 AM
> To: user@tuscany.apache.org
> Cc: Binhbm@viettel.com.vn
> Subject: Re: Tuscany SCA 2.0 web application performance is terrible
>
> For each of the implementation class, can you add the following annotations and try again?
>
> import org.oasisopen.sca.annotation.AllowsPassByReference;
> import org.oasisopen.sca.annotation.Scope;
>
> @AllowsPassByReference // 1
> @Scope("COMPOSITE") // 2
> public class ...
>
> 1 is used to avoid copy of data between service calls
> 2 only creates one instance per composite
>
>
> BTW,did you invoke the first service as SOAP web service? Are you open to other lighter protocols such JSONRPC or REST?
>
> Thanks,
> Raymond
>
>
> On Aug 20, 2012, at 8:56 PM, binhnt22 wrote:
>
>
> Certainly, please take a look at it.
>
> Thanks & Best regards
>
> From: Raymond Feng [mailto:enjoyjava@gmail.com]
> Sent: Tuesday, August 21, 2012 10:30 AM
> To: user@tuscany.apache.org
> Cc: user@tuscany.apache.org
> Subject: Re: Tuscany SCA 2.0 web application performance is terrible
>
> Can you share the sca java impl?
>
> Raymond Feng
> Sent from my iPhone
>
> On Aug 20, 2012, at 7:43 PM, binhnt22 <Bi...@viettel.com.vn> wrote:
>
> Hi Luciano,
> I kept the @Scope default (@Scope was not present, so I think it’s STATELESS).
> My aim is building a SOA based system, so I want to use binding.ws for BPM easy to use.
> All the SCA service are in the same app, how can I expose them as web services but SCA service call each other by local call.
> P/S: I attached my composite file for further information.
> Thanks you & Best regards
>
> From: Luciano Resende [mailto:luckbr1975@gmail.com]
> Sent: Tuesday, August 21, 2012 8:59 AM
> To: user@tuscany.apache.org
> Subject: Re: Tuscany SCA 2.0 web application performance is terrible
>
>
>
> On Mon, Aug 20, 2012 at 6:46 PM, binhnt22 <Bi...@viettel.com.vn> wrote:
> Hi Raymond,
>
> Thank you for your concern. Here is the information:
> I’m building a demo just to test performance among SCA, BPM and our legacy code. In order to decide to use SCA or not for our next-gen enterprise system.
> 1. I have a Stock Transfer web application which does the following things:
>
> - Subtract the quantity of products from the source stock (Stock table)
>
> - Add the quantity of products into the target stock (Stock table)
>
> - Create an importing product order if the product in the source stock is too low (StockOrder table)
>
> - Change the sale quota of the show that manages the target stock. (ShopQuota table)
>
> - Generate a stock transfer transaction (StockTrans table)
>
> The legacy code(java), SCA service (2.0) and JBpm (5.1) process is a part of the web application (struts2 + tiles). The database is Oracle 10g. The web server is apache-tomcat-7.0.27
>
> a) The legacy code is very simple, uses hibernate + c3p0, call all the work in a sequence order.
>
> b) The SCA: the web application has only one web.composite, contains 4 Component for each work (work 1st and 2nd is the same)
>
> Each component was implemented by a java class which call the correlative legacy code.
>
> Each one expose a web service for JBpm through binding.ws
>
> c) The BPM: create 4 handlers to manipulate 4 web service above, the handlers use HttpClient (apache common-httpclient) to acquire the fastest way when call web service
>
>
>
> 2. Except the database server, the web server and test environment are on one PC. The database server is in the same Local network with the PC.
>
> 3. I kept the default Tomcat configuration. (CATALINA_OPTS=”-Xms128m –Xmx512m –XX:MaxPermSize=256m”
>
>
> I know placing both Web server and Test environment in a PC is not ok. But at least the SCA should be as good as the legacy code (slower 15-30%), but it took 2-4 times.
> Concurrent request
> 10
> 20
> 50
> Web
> Min (ms)
> 215
> 215
> 537
> Max (ms)
> 283
> 1880
> 3972
> Avg (ms)
> 259
> 753
> 2486
> Error (%)
> 0%
> 0%
> 0%
> SCA
> Min
> 356
> 528
> 1940
> Max
> 870
> 3726
> 15136
> Avg
> 656
> 2932
> 8520
> Error (%)
> 0%
> 0%
> 0%
> BPM
> Min
> 529
> 724
> 2694
> Max
> 1954
> 3268
> 11889
> Avg
> 1304
> 2509
> 10229
> Error (%)
> 0%
> 0%
> 0%
>
> Could you please share one of your system architecture which use Tuscany heavily without performance issues? That would be a great help.
> .
>
> Best regards
>
>
> Is your component defined as @Scope composite (a.k.a. singleton)
> What if you try a different binding (e.g. REST, JSON-RPC or RMI) ?
>
>
> --
> Luciano Resende
> http://people.apache.org/~lresende
> http://twitter.com/lresende1975
> http://lresende.blogspot.com/
> <web.composite>
> <StockTransScaImpl.zip>
RE: Tuscany SCA 2.0 web application performance is terrible
Posted by binhnt22 <Bi...@viettel.com.vn>.
After a lot of investigating work (I moved tomcat to a real server), I got a
few below thing
@AllowsPassByReference : nothing change, maybe because I used primitive
parameters.
@Scope("COMPOSITE"): connection closed, not good for many concurrent web
transactions.
I placed many time logs in the source code. Here's an interesting result.
The code block
System.out.println("SCA - Start stock1 service: " +
DateTimeUtils.getSysDateTime());
stockService.addStock(form.getShopSourceId(), form.getProductId(),
-form.getQuantity());
System.out.println("SCA - Start stock2 service: " +
DateTimeUtils.getSysDateTime());
stockService.addStock(form.getShopTargetId(), form.getProductId(),
form.getQuantity());
System.out.println("SCA - Start quota service: " +
DateTimeUtils.getSysDateTime());
quotaService.resetSaleQuota(form.getShopTargetId(), form.getProductId());
System.out.println("SCA - Start order service: " +
DateTimeUtils.getSysDateTime());
orderService.createOrder(form.getShopSourceId(), form.getProductId());
System.out.println("SCA - Start trans service: " +
DateTimeUtils.getSysDateTime());
In each service function, I also place a start time log at the beginning of
the function and an end time log at the end of the function to get the
function's elapsed time.
Anh here's the log after 1 run (every time they stayed the same)
SCA runtime took 5ms to go into Implementation class but 30-50 ms to return
When the number of reference increase, the waste time will become
unacceptable for an end-user web interface.
May you explain this phenomenon and give some advice to resolve it.
Best regards
From: Raymond Feng [mailto:enjoyjava@gmail.com]
Sent: Tuesday, August 21, 2012 11:29 AM
To: user@tuscany.apache.org
Cc: Binhbm@viettel.com.vn
Subject: Re: Tuscany SCA 2.0 web application performance is terrible
For each of the implementation class, can you add the following annotations
and try again?
import org.oasisopen.sca.annotation.AllowsPassByReference;
import org.oasisopen.sca.annotation.Scope;
@AllowsPassByReference // 1
@Scope("COMPOSITE") // 2
public class ...
1 is used to avoid copy of data between service calls
2 only creates one instance per composite
BTW,did you invoke the first service as SOAP web service? Are you open to
other lighter protocols such JSONRPC or REST?
Thanks,
Raymond
On Aug 20, 2012, at 8:56 PM, binhnt22 wrote:
Certainly, please take a look at it.
Thanks & Best regards
From: Raymond Feng [mailto:enjoyjava@gmail.com]
Sent: Tuesday, August 21, 2012 10:30 AM
To: user@tuscany.apache.org
Cc: user@tuscany.apache.org
Subject: Re: Tuscany SCA 2.0 web application performance is terrible
Can you share the sca java impl?
Raymond Feng
Sent from my iPhone
On Aug 20, 2012, at 7:43 PM, binhnt22 <Bi...@viettel.com.vn> wrote:
Hi Luciano,
I kept the @Scope default (@Scope was not present, so I think it's
STATELESS).
My aim is building a SOA based system, so I want to use binding.ws for BPM
easy to use.
All the SCA service are in the same app, how can I expose them as web
services but SCA service call each other by local call.
P/S: I attached my composite file for further information.
Thanks you & Best regards
From: Luciano Resende [mailto:luckbr1975@gmail.com]
Sent: Tuesday, August 21, 2012 8:59 AM
To: user@tuscany.apache.org
Subject: Re: Tuscany SCA 2.0 web application performance is terrible
On Mon, Aug 20, 2012 at 6:46 PM, binhnt22 <Bi...@viettel.com.vn> wrote:
Hi Raymond,
Thank you for your concern. Here is the information:
I'm building a demo just to test performance among SCA, BPM and our legacy
code. In order to decide to use SCA or not for our next-gen enterprise
system.
1. I have a Stock Transfer web application which does the following
things:
- Subtract the quantity of products from the source stock (Stock
table)
- Add the quantity of products into the target stock (Stock table)
- Create an importing product order if the product in the source
stock is too low (StockOrder table)
- Change the sale quota of the show that manages the target stock.
(ShopQuota table)
- Generate a stock transfer transaction (StockTrans table)
The legacy code(java), SCA service (2.0) and JBpm (5.1) process is a part of
the web application (struts2 + tiles). The database is Oracle 10g. The web
server is apache-tomcat-7.0.27
a) The legacy code is very simple, uses hibernate + c3p0, call all the
work in a sequence order.
b) The SCA: the web application has only one web.composite, contains 4
Component for each work (work 1st and 2nd is the same)
Each component was implemented by a java class which call the correlative
legacy code.
Each one expose a web service for JBpm through binding.ws
c) The BPM: create 4 handlers to manipulate 4 web service above, the
handlers use HttpClient (apache common-httpclient) to acquire the fastest
way when call web service
2. Except the database server, the web server and test environment are
on one PC. The database server is in the same Local network with the PC.
3. I kept the default Tomcat configuration. (CATALINA_OPTS="-Xms128m
-Xmx512m -XX:MaxPermSize=256m"
I know placing both Web server and Test environment in a PC is not ok. But
at least the SCA should be as good as the legacy code (slower 15-30%), but
it took 2-4 times.
Concurrent request
10
20
50
Web
Min (ms)
215
215
537
Max (ms)
283
1880
3972
Avg (ms)
259
753
2486
Error (%)
0%
0%
0%
SCA
Min
356
528
1940
Max
870
3726
15136
Avg
656
2932
8520
Error (%)
0%
0%
0%
BPM
Min
529
724
2694
Max
1954
3268
11889
Avg
1304
2509
10229
Error (%)
0%
0%
0%
Could you please share one of your system architecture which use Tuscany
heavily without performance issues? That would be a great help.
.
Best regards
Is your component defined as @Scope composite (a.k.a. singleton)
What if you try a different binding (e.g. REST, JSON-RPC or RMI) ?
--
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/
<web.composite>
<StockTransScaImpl.zip>
Re: Tuscany SCA 2.0 web application performance is terrible
Posted by Raymond Feng <en...@gmail.com>.
For each of the implementation class, can you add the following annotations and try again?
import org.oasisopen.sca.annotation.AllowsPassByReference;
import org.oasisopen.sca.annotation.Scope;
@AllowsPassByReference // 1
@Scope("COMPOSITE") // 2
public class ...
1 is used to avoid copy of data between service calls
2 only creates one instance per composite
BTW,did you invoke the first service as SOAP web service? Are you open to other lighter protocols such JSONRPC or REST?
Thanks,
Raymond
On Aug 20, 2012, at 8:56 PM, binhnt22 wrote:
> Certainly, please take a look at it.
>
> Thanks & Best regards
>
> From: Raymond Feng [mailto:enjoyjava@gmail.com]
> Sent: Tuesday, August 21, 2012 10:30 AM
> To: user@tuscany.apache.org
> Cc: user@tuscany.apache.org
> Subject: Re: Tuscany SCA 2.0 web application performance is terrible
>
> Can you share the sca java impl?
>
> Raymond Feng
> Sent from my iPhone
>
> On Aug 20, 2012, at 7:43 PM, binhnt22 <Bi...@viettel.com.vn> wrote:
>
> Hi Luciano,
> I kept the @Scope default (@Scope was not present, so I think it’s STATELESS).
> My aim is building a SOA based system, so I want to use binding.ws for BPM easy to use.
> All the SCA service are in the same app, how can I expose them as web services but SCA service call each other by local call.
> P/S: I attached my composite file for further information.
> Thanks you & Best regards
>
> From: Luciano Resende [mailto:luckbr1975@gmail.com]
> Sent: Tuesday, August 21, 2012 8:59 AM
> To: user@tuscany.apache.org
> Subject: Re: Tuscany SCA 2.0 web application performance is terrible
>
>
>
> On Mon, Aug 20, 2012 at 6:46 PM, binhnt22 <Bi...@viettel.com.vn> wrote:
> Hi Raymond,
>
> Thank you for your concern. Here is the information:
> I’m building a demo just to test performance among SCA, BPM and our legacy code. In order to decide to use SCA or not for our next-gen enterprise system.
> 1. I have a Stock Transfer web application which does the following things:
>
> - Subtract the quantity of products from the source stock (Stock table)
>
> - Add the quantity of products into the target stock (Stock table)
>
> - Create an importing product order if the product in the source stock is too low (StockOrder table)
>
> - Change the sale quota of the show that manages the target stock. (ShopQuota table)
>
> - Generate a stock transfer transaction (StockTrans table)
>
> The legacy code(java), SCA service (2.0) and JBpm (5.1) process is a part of the web application (struts2 + tiles). The database is Oracle 10g. The web server is apache-tomcat-7.0.27
>
> a) The legacy code is very simple, uses hibernate + c3p0, call all the work in a sequence order.
>
> b) The SCA: the web application has only one web.composite, contains 4 Component for each work (work 1st and 2nd is the same)
>
> Each component was implemented by a java class which call the correlative legacy code.
>
> Each one expose a web service for JBpm through binding.ws
>
> c) The BPM: create 4 handlers to manipulate 4 web service above, the handlers use HttpClient (apache common-httpclient) to acquire the fastest way when call web service
>
>
>
> 2. Except the database server, the web server and test environment are on one PC. The database server is in the same Local network with the PC.
>
> 3. I kept the default Tomcat configuration. (CATALINA_OPTS=”-Xms128m –Xmx512m –XX:MaxPermSize=256m”
>
>
> I know placing both Web server and Test environment in a PC is not ok. But at least the SCA should be as good as the legacy code (slower 15-30%), but it took 2-4 times.
> Concurrent request
> 10
> 20
> 50
> Web
> Min (ms)
> 215
> 215
> 537
> Max (ms)
> 283
> 1880
> 3972
> Avg (ms)
> 259
> 753
> 2486
> Error (%)
> 0%
> 0%
> 0%
> SCA
> Min
> 356
> 528
> 1940
> Max
> 870
> 3726
> 15136
> Avg
> 656
> 2932
> 8520
> Error (%)
> 0%
> 0%
> 0%
> BPM
> Min
> 529
> 724
> 2694
> Max
> 1954
> 3268
> 11889
> Avg
> 1304
> 2509
> 10229
> Error (%)
> 0%
> 0%
> 0%
>
> Could you please share one of your system architecture which use Tuscany heavily without performance issues? That would be a great help.
> .
>
> Best regards
>
>
> Is your component defined as @Scope composite (a.k.a. singleton)
> What if you try a different binding (e.g. REST, JSON-RPC or RMI) ?
>
>
> --
> Luciano Resende
> http://people.apache.org/~lresende
> http://twitter.com/lresende1975
> http://lresende.blogspot.com/
> <web.composite>
> <StockTransScaImpl.zip>
RE: Tuscany SCA 2.0 web application performance is terrible
Posted by binhnt22 <Bi...@viettel.com.vn>.
Certainly, please take a look at it.
Thanks & Best regards
From: Raymond Feng [mailto:enjoyjava@gmail.com]
Sent: Tuesday, August 21, 2012 10:30 AM
To: user@tuscany.apache.org
Cc: user@tuscany.apache.org
Subject: Re: Tuscany SCA 2.0 web application performance is terrible
Can you share the sca java impl?
Raymond Feng
Sent from my iPhone
On Aug 20, 2012, at 7:43 PM, binhnt22 <Bi...@viettel.com.vn> wrote:
Hi Luciano,
I kept the @Scope default (@Scope was not present, so I think it’s STATELESS).
My aim is building a SOA based system, so I want to use binding.ws for BPM easy to use.
All the SCA service are in the same app, how can I expose them as web services but SCA service call each other by local call.
P/S: I attached my composite file for further information.
Thanks you & Best regards
From: Luciano Resende [mailto:luckbr1975@gmail.com]
Sent: Tuesday, August 21, 2012 8:59 AM
To: user@tuscany.apache.org
Subject: Re: Tuscany SCA 2.0 web application performance is terrible
On Mon, Aug 20, 2012 at 6:46 PM, binhnt22 <Bi...@viettel.com.vn> wrote:
Hi Raymond,
Thank you for your concern. Here is the information:
I’m building a demo just to test performance among SCA, BPM and our legacy code. In order to decide to use SCA or not for our next-gen enterprise system.
1. I have a Stock Transfer web application which does the following things:
- Subtract the quantity of products from the source stock (Stock table)
- Add the quantity of products into the target stock (Stock table)
- Create an importing product order if the product in the source stock is too low (StockOrder table)
- Change the sale quota of the show that manages the target stock. (ShopQuota table)
- Generate a stock transfer transaction (StockTrans table)
The legacy code(java), SCA service (2.0) and JBpm (5.1) process is a part of the web application (struts2 + tiles). The database is Oracle 10g. The web server is apache-tomcat-7.0.27
a) The legacy code is very simple, uses hibernate + c3p0, call all the work in a sequence order.
b) The SCA: the web application has only one web.composite, contains 4 Component for each work (work 1st and 2nd is the same)
Each component was implemented by a java class which call the correlative legacy code.
Each one expose a web service for JBpm through binding.ws
c) The BPM: create 4 handlers to manipulate 4 web service above, the handlers use HttpClient (apache common-httpclient) to acquire the fastest way when call web service
2. Except the database server, the web server and test environment are on one PC. The database server is in the same Local network with the PC.
3. I kept the default Tomcat configuration. (CATALINA_OPTS=”-Xms128m –Xmx512m –XX:MaxPermSize=256m”
I know placing both Web server and Test environment in a PC is not ok. But at least the SCA should be as good as the legacy code (slower 15-30%), but it took 2-4 times.
Concurrent request
10
20
50
Web
Min (ms)
215
215
537
Max (ms)
283
1880
3972
Avg (ms)
259
753
2486
Error (%)
0%
0%
0%
SCA
Min
356
528
1940
Max
870
3726
15136
Avg
656
2932
8520
Error (%)
0%
0%
0%
BPM
Min
529
724
2694
Max
1954
3268
11889
Avg
1304
2509
10229
Error (%)
0%
0%
0%
Could you please share one of your system architecture which use Tuscany heavily without performance issues? That would be a great help.
.
Best regards
Is your component defined as @Scope composite (a.k.a. singleton)
What if you try a different binding (e.g. REST, JSON-RPC or RMI) ?
--
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/
<web.composite>
Re: Tuscany SCA 2.0 web application performance is terrible
Posted by Raymond Feng <en...@gmail.com>.
Can you share the sca java impl?
Raymond Feng
Sent from my iPhone
On Aug 20, 2012, at 7:43 PM, binhnt22 <Bi...@viettel.com.vn> wrote:
> Hi Luciano,
> I kept the @Scope default (@Scope was not present, so I think it’s STATELESS).
> My aim is building a SOA based system, so I want to use binding.ws for BPM easy to use.
> All the SCA service are in the same app, how can I expose them as web services but SCA service call each other by local call.
> P/S: I attached my composite file for further information.
> Thanks you & Best regards
>
> From: Luciano Resende [mailto:luckbr1975@gmail.com]
> Sent: Tuesday, August 21, 2012 8:59 AM
> To: user@tuscany.apache.org
> Subject: Re: Tuscany SCA 2.0 web application performance is terrible
>
>
>
> On Mon, Aug 20, 2012 at 6:46 PM, binhnt22 <Bi...@viettel.com.vn> wrote:
> Hi Raymond,
>
> Thank you for your concern. Here is the information:
> I’m building a demo just to test performance among SCA, BPM and our legacy code. In order to decide to use SCA or not for our next-gen enterprise system.
> 1. I have a Stock Transfer web application which does the following things:
>
> - Subtract the quantity of products from the source stock (Stock table)
>
> - Add the quantity of products into the target stock (Stock table)
>
> - Create an importing product order if the product in the source stock is too low (StockOrder table)
>
> - Change the sale quota of the show that manages the target stock. (ShopQuota table)
>
> - Generate a stock transfer transaction (StockTrans table)
>
> The legacy code(java), SCA service (2.0) and JBpm (5.1) process is a part of the web application (struts2 + tiles). The database is Oracle 10g. The web server is apache-tomcat-7.0.27
>
> a) The legacy code is very simple, uses hibernate + c3p0, call all the work in a sequence order.
>
> b) The SCA: the web application has only one web.composite, contains 4 Component for each work (work 1st and 2nd is the same)
>
> Each component was implemented by a java class which call the correlative legacy code.
>
> Each one expose a web service for JBpm through binding.ws
>
> c) The BPM: create 4 handlers to manipulate 4 web service above, the handlers use HttpClient (apache common-httpclient) to acquire the fastest way when call web service
>
>
>
> 2. Except the database server, the web server and test environment are on one PC. The database server is in the same Local network with the PC.
>
> 3. I kept the default Tomcat configuration. (CATALINA_OPTS=”-Xms128m –Xmx512m –XX:MaxPermSize=256m”
>
>
> I know placing both Web server and Test environment in a PC is not ok. But at least the SCA should be as good as the legacy code (slower 15-30%), but it took 2-4 times.
> Concurrent request
> 10
> 20
> 50
> Web
> Min (ms)
> 215
> 215
> 537
> Max (ms)
> 283
> 1880
> 3972
> Avg (ms)
> 259
> 753
> 2486
> Error (%)
> 0%
> 0%
> 0%
> SCA
> Min
> 356
> 528
> 1940
> Max
> 870
> 3726
> 15136
> Avg
> 656
> 2932
> 8520
> Error (%)
> 0%
> 0%
> 0%
> BPM
> Min
> 529
> 724
> 2694
> Max
> 1954
> 3268
> 11889
> Avg
> 1304
> 2509
> 10229
> Error (%)
> 0%
> 0%
> 0%
>
> Could you please share one of your system architecture which use Tuscany heavily without performance issues? That would be a great help.
> .
>
> Best regards
>
>
> Is your component defined as @Scope composite (a.k.a. singleton)
> What if you try a different binding (e.g. REST, JSON-RPC or RMI) ?
>
>
> --
> Luciano Resende
> http://people.apache.org/~lresende
> http://twitter.com/lresende1975
> http://lresende.blogspot.com/
> <web.composite>
RE: Tuscany SCA 2.0 web application performance is terrible
Posted by binhnt22 <Bi...@viettel.com.vn>.
Hi Luciano,
I kept the @Scope default (@Scope was not present, so I think it’s STATELESS).
My aim is building a SOA based system, so I want to use binding.ws for BPM easy to use.
All the SCA service are in the same app, how can I expose them as web services but SCA service call each other by local call.
P/S: I attached my composite file for further information.
Thanks you & Best regards
From: Luciano Resende [mailto:luckbr1975@gmail.com]
Sent: Tuesday, August 21, 2012 8:59 AM
To: user@tuscany.apache.org
Subject: Re: Tuscany SCA 2.0 web application performance is terrible
On Mon, Aug 20, 2012 at 6:46 PM, binhnt22 <Bi...@viettel.com.vn> wrote:
Hi Raymond,
Thank you for your concern. Here is the information:
I’m building a demo just to test performance among SCA, BPM and our legacy code. In order to decide to use SCA or not for our next-gen enterprise system.
1. I have a Stock Transfer web application which does the following things:
- Subtract the quantity of products from the source stock (Stock table)
- Add the quantity of products into the target stock (Stock table)
- Create an importing product order if the product in the source stock is too low (StockOrder table)
- Change the sale quota of the show that manages the target stock. (ShopQuota table)
- Generate a stock transfer transaction (StockTrans table)
The legacy code(java), SCA service (2.0) and JBpm (5.1) process is a part of the web application (struts2 + tiles). The database is Oracle 10g. The web server is apache-tomcat-7.0.27
a) The legacy code is very simple, uses hibernate + c3p0, call all the work in a sequence order.
b) The SCA: the web application has only one web.composite, contains 4 Component for each work (work 1st and 2nd is the same)
Each component was implemented by a java class which call the correlative legacy code.
Each one expose a web service for JBpm through binding.ws
c) The BPM: create 4 handlers to manipulate 4 web service above, the handlers use HttpClient (apache common-httpclient) to acquire the fastest way when call web service
2. Except the database server, the web server and test environment are on one PC. The database server is in the same Local network with the PC.
3. I kept the default Tomcat configuration. (CATALINA_OPTS=”-Xms128m –Xmx512m –XX:MaxPermSize=256m”
I know placing both Web server and Test environment in a PC is not ok. But at least the SCA should be as good as the legacy code (slower 15-30%), but it took 2-4 times.
Concurrent request
10
20
50
Web
Min (ms)
215
215
537
Max (ms)
283
1880
3972
Avg (ms)
259
753
2486
Error (%)
0%
0%
0%
SCA
Min
356
528
1940
Max
870
3726
15136
Avg
656
2932
8520
Error (%)
0%
0%
0%
BPM
Min
529
724
2694
Max
1954
3268
11889
Avg
1304
2509
10229
Error (%)
0%
0%
0%
Could you please share one of your system architecture which use Tuscany heavily without performance issues? That would be a great help.
.
Best regards
Is your component defined as @Scope composite (a.k.a. singleton)
What if you try a different binding (e.g. REST, JSON-RPC or RMI) ?
--
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/
Re: Tuscany SCA 2.0 web application performance is terrible
Posted by Luciano Resende <lu...@gmail.com>.
On Mon, Aug 20, 2012 at 6:46 PM, binhnt22 <Bi...@viettel.com.vn> wrote:
> Hi Raymond,****
>
> ** **
>
> Thank you for your concern. Here is the information:****
>
> I’m building a demo just to test performance among SCA, BPM and our legacy
> code. In order to decide to use SCA or not for our next-gen enterprise
> system.****
>
> **1. **I have a Stock Transfer web application which does the
> following things:****
>
> **- **Subtract the quantity of products from the source stock
> (Stock table)****
>
> **- **Add the quantity of products into the target stock (Stock
> table)****
>
> **- **Create an importing product order if the product in the
> source stock is too low (StockOrder table)****
>
> **- **Change the sale quota of the show that manages the target
> stock. (ShopQuota table)****
>
> **- **Generate a stock transfer transaction (StockTrans table)***
> *
>
> The legacy code(java), SCA service (2.0) and JBpm (5.1) process is a part
> of the web application (struts2 + tiles). The database is Oracle 10g. The
> web server is apache-tomcat-7.0.27****
>
> ** **
>
> **a) **The legacy code is very simple, uses hibernate + c3p0, call
> all the work in a sequence order.****
>
> **b) **The SCA: the web application has only one web.composite,
> contains 4 Component for each work (work 1st and 2nd is the same)****
>
> Each component was implemented by a java class which call the correlative
> legacy code.****
>
> Each one expose a web service for JBpm through binding.ws****
>
> **c) **The BPM: create 4 handlers to manipulate 4 web service above,
> the handlers use HttpClient (apache common-httpclient) to acquire the
> fastest way when call web service****
>
> ** **
>
> **2. **Except the database server, the web server and test
> environment are on one PC. The database server is in the same Local network
> with the PC.****
>
> **3. **I kept the default Tomcat configuration.
> (CATALINA_OPTS=”-Xms128m –Xmx512m –XX:MaxPermSize=256m”****
>
> ** **
>
> I know placing both Web server and Test environment in a PC is not ok. But
> at least the SCA should be as good as the legacy code (slower 15-30%), but
> it took 2-4 times.****
>
> *Concurrent request*
>
> *10*
>
> *20*
>
> *50*
>
> *Web*
>
> *Min (ms)*
>
> 215****
>
> 215****
>
> 537****
>
> *Max (ms)*
>
> 283****
>
> 1880****
>
> 3972****
>
> *Avg (ms)*
>
> 259****
>
> 753****
>
> 2486****
>
> *Error (%)*
>
> 0%****
>
> 0%****
>
> 0%****
>
> *SCA*
>
> *Min*
>
> 356****
>
> 528****
>
> 1940****
>
> *Max*
>
> 870****
>
> 3726****
>
> 15136****
>
> *Avg*
>
> 656****
>
> 2932****
>
> 8520****
>
> *Error (%)*
>
> 0%****
>
> 0%****
>
> 0%****
>
> *BPM*
>
> *Min*
>
> 529****
>
> 724****
>
> 2694****
>
> *Max*
>
> 1954****
>
> 3268****
>
> 11889****
>
> *Avg*
>
> 1304****
>
> 2509****
>
> 10229****
>
> *Error (%)*
>
> 0%****
>
> 0%****
>
> 0%****
>
> ** **
>
> Could you please share one of your system architecture which use Tuscany
> heavily without performance issues? That would be a great help.****
>
> .****
>
> *Best regards*
>
>
>
Is your component defined as @Scope composite (a.k.a. singleton)
What if you try a different binding (e.g. REST, JSON-RPC or RMI) ?
--
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/
RE: Tuscany SCA 2.0 web application performance is terrible
Posted by binhnt22 <Bi...@viettel.com.vn>.
Hi Raymond,
Thank you for your concern. Here is the information:
I'm building a demo just to test performance among SCA, BPM and our legacy
code. In order to decide to use SCA or not for our next-gen enterprise
system.
1. I have a Stock Transfer web application which does the following
things:
- Subtract the quantity of products from the source stock (Stock
table)
- Add the quantity of products into the target stock (Stock table)
- Create an importing product order if the product in the source
stock is too low (StockOrder table)
- Change the sale quota of the show that manages the target stock.
(ShopQuota table)
- Generate a stock transfer transaction (StockTrans table)
The legacy code(java), SCA service (2.0) and JBpm (5.1) process is a part of
the web application (struts2 + tiles). The database is Oracle 10g. The web
server is apache-tomcat-7.0.27
a) The legacy code is very simple, uses hibernate + c3p0, call all the
work in a sequence order.
b) The SCA: the web application has only one web.composite, contains 4
Component for each work (work 1st and 2nd is the same)
Each component was implemented by a java class which call the correlative
legacy code.
Each one expose a web service for JBpm through binding.ws
c) The BPM: create 4 handlers to manipulate 4 web service above, the
handlers use HttpClient (apache common-httpclient) to acquire the fastest
way when call web service
2. Except the database server, the web server and test environment are
on one PC. The database server is in the same Local network with the PC.
3. I kept the default Tomcat configuration. (CATALINA_OPTS="-Xms128m
-Xmx512m -XX:MaxPermSize=256m"
I know placing both Web server and Test environment in a PC is not ok. But
at least the SCA should be as good as the legacy code (slower 15-30%), but
it took 2-4 times.
Concurrent request
10
20
50
Web
Min (ms)
215
215
537
Max (ms)
283
1880
3972
Avg (ms)
259
753
2486
Error (%)
0%
0%
0%
SCA
Min
356
528
1940
Max
870
3726
15136
Avg
656
2932
8520
Error (%)
0%
0%
0%
BPM
Min
529
724
2694
Max
1954
3268
11889
Avg
1304
2509
10229
Error (%)
0%
0%
0%
Could you please share one of your system architecture which use Tuscany
heavily without performance issues? That would be a great help.
.
Best regards
From: Raymond Feng [mailto:enjoyjava@gmail.com]
Sent: Monday, August 20, 2012 11:11 PM
To: user@tuscany.apache.org
Subject: Re: Tuscany SCA 2.0 web application performance is terrible
Hi,
Th title is really scary :-(
Can you provide more information for your test?
1. What does your SCA service do?
2. Can you do some profiling to find out where the bottleneck is? There
might be many factors, such as Network, Memory settings, Tomcat connection
settings, Service implementation.
3. What's your Tomcat configuration? (How many concurrent
threads/connections allowed?)
The key is to understand how much overhead that Tuscany introduces into your
app.
We use Tuscany quite heavily and never have performance issues.
Thanks,
Raymond
On Aug 20, 2012, at 3:02 AM, binhnt22 wrote:
Hi all,
I have a web application that uses Tuscany SCA 2.0 running on Tomcat 7
-(Xms128m -Xmx512m -XX:MaxPermSize=512m)
So far everything seems to be ok until I tried to carry on a performance
test.
Using Jmeter 2.7, request directly to the servlet that call SCA service.
With 10 and 20 requests were ramed in 1 sec, the performance look promising.
But with 50 requests in 1 sec, the response time was so terrible, not
mention 100 or 200 request in 1 sec.
Did anyone face that problem? Any suggestion or solutions will be
appreciated.
Thasnk & Best regards,
Re: Tuscany SCA 2.0 web application performance is terrible
Posted by Raymond Feng <en...@gmail.com>.
Hi,
Th title is really scary :-(
Can you provide more information for your test?
1. What does your SCA service do?
2. Can you do some profiling to find out where the bottleneck is? There might be many factors, such as Network, Memory settings, Tomcat connection settings, Service implementation.
3. What's your Tomcat configuration? (How many concurrent threads/connections allowed?)
The key is to understand how much overhead that Tuscany introduces into your app.
We use Tuscany quite heavily and never have performance issues.
Thanks,
Raymond
On Aug 20, 2012, at 3:02 AM, binhnt22 wrote:
> Hi all,
> I have a web application that uses Tuscany SCA 2.0 running on Tomcat 7 -(Xms128m –Xmx512m –XX:MaxPermSize=512m)
> So far everything seems to be ok until I tried to carry on a performance test.
> Using Jmeter 2.7, request directly to the servlet that call SCA service.
> With 10 and 20 requests were ramed in 1 sec, the performance look promising. But with 50 requests in 1 sec, the response time was so terrible, not mention 100 or 200 request in 1 sec.
> Did anyone face that problem? Any suggestion or solutions will be appreciated.
> Thasnk & Best regards,