Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] Thread pooling

Hi Scott,
 
i am using r_osgi it appears to be on the consumer side
 
while debugging :

org.eclipse.ecf.internal.provider.r_osgi.RemoteServiceImpl

i have found that the callSync uses:

IExecutor executor =

new
ThreadsExecutor();

IFuture future = executor.execute(

new
IProgressRunnable() {

public
Object run(IProgressMonitor monitor) throws Exception {

final Method method = ClassUtil.getMethod(service.getClass(), call.getMethod(), formalParams);

return method.invoke(service, parameters);

}

},

null);

the client uses thread pool as well?

can it be controled?

On Sat, Apr 2, 2011 at 6:18 PM, Scott Lewis <slewis@xxxxxxxxxxxxx> wrote:

Ronen,

1) Does this error occur on the host or the consumer?
2)  Which provider are you using?  (e.g. r-osgi, ecf generic, etc?).  The answer to your question about the host and threading depends upon the provider.

For r-osgi I believe a thread pool is used, but by default it's set to sort of a small number of threads in the pool (2).  You can change the maximum threads per endpoint via this system property:

ch.ethz.iks.r_osgi.threadsPerEndpoint

e.g.

-Dch.ethz.iks.r_osgi.threadsPerEndpoint=50

Scott


On 4/2/2011 6:27 AM, ronen hamias wrote:
Hi all
i am playing around with the ECF remoteservices
i have built a simple stress testing that invoke hello service 8000 times

i have received this error:
An internal error has occurred.
unable to create new native thread

org.eclipse.ecf.examples.remoteservices.hello.consumer.rs
org.eclipse.ecf.examples.remoteservices.hello.host.rs

my code:

        // 6. Finally...call the proxy

        long start, end, total;
        start = System.currentTimeMillis();
        String response=null;
      
        long count = 8000;
        for (int i = 0; i<count;i++)
              response = proxy.sayHello("RemoteService Consumer");

        end = System.currentTimeMillis();
        total = end - start;

        long avg = total/count;
        System.out.println("total=["+total+"][avg=" +(avg) +"]"+ response);


does the server uses thread pooling?
if i try to guess what happen is that every invocation spawn new thread until the system is out of resources?

BR
ronen.






_______________________________________________ ecf-dev mailing list ecf-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/ecf-dev


_______________________________________________
ecf-dev mailing list
ecf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ecf-dev




--
Ronen Hamias
Cell Phone: +972-50-2289988

Back to the top