Re: [eclipse-clp-users] eclipse Prolog Java multithreading with EmbeddedEclipse and OutOfProcessEclipse

From: Kish Shen <kisshen_at_...5...>
Date: Tue, 10 Jun 2008 14:02:17 +0100
Hi,

Martin Wegner wrote:
> Hello,
>
> we, three students, want to write a multithreading Java program that 
> uses eclipse prolog.
>
>  From the universirty we can use a server with four CPUs and we want to 
> use them.
>
> It is only possible to create one EmbeddedEclipse object and when four 
> threads use this object for prolog commands only one processor is used 
> by the JVM.
>
>   
> So we tried OutOfProcessEclipse and every thread has now its own 
> OutOfProcessEclipse object. So all four CPUs can be used by the JVM but 
> we had a big problem with this. In some cases the threads wants to 
> execute a lot of small prolog command so that we had a very huge 
> communication overhead which kills our performance under a single core 
> solution :(
>
> Is it possible that an EmbeddedEclipse object can use more than one 
> processor with the JVM?
>
>   
If I understand you correctly, you want to run ECLiPSe in parallel -- 
ECLiPSe is currently single threaded, and does not support concurrent or 
parallel execution, so it does not make sense to run an ECLiPSe process 
on more than one processor. With OutOfProcessEclipse, each ECLiPSe 
process is independent of the others that you run, so this is probably 
not what you want.

Are you saying that when you have a single embedded ECLiPSe process, you 
can't run the Java threads on more than one processor? You obviously 
can't run the ECLiPSe on more than one process, but does this also limit 
the other Java threads?

ECLiPSe did have support for some form of or-parallelism (finding the 
multiple branches of the search tree in parallel) many years ago, and 
the code is still in the source, but I don't think it has been tested in 
recent years, and features developed since (such as the Java interface), 
does not really take this parallel execution into account and probably 
will not work with it.
> Is it possible to "tune" OutOfProcessEclipse to minimize the 
> communication overhead with some eclipse option tweaks?
>
> Thanks a lot!
>
>   
I think the main overhead with using out-of-process (or remote) ECLiPSe 
is the use of the sockets for transmitting the data between ECLiPSe and 
Java. There seems to be some (rather large) minimum time to send 
anything through the socket. So it is quite expensive if you transmit 
only small amounts of data, e.g via the queues. You can reduce this 
overhead somewhat by transmitting larger amounts of data each time.

Howver, as I said, I am not sure if this is what you want, as each 
out-of-process ECLiPSe you set up is not connected to the others.

Cheers,

Kish
> Greetings!
>
> Martin
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> ECLiPSe-CLP-Users mailing list
> ECLiPSe-CLP-Users_at_lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/eclipse-clp-users
>   
Received on Tue Jun 10 2008 - 06:02:30 CEST

This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST