JPPF, java, parallel computing, distributed computing, grid computing, parallel, distributed, cluster, grid, cloud, open source, android, .net
JPPF

The open source
grid computing
solution

 Home   About   Features   Download   Documentation   On Github   Forums 
June 04, 2023, 08:25:47 PM *
Welcome,
Please login or register.

Login with username, password and session length
Advanced search  
News: New users, please read this message. Thank you!
  Home Help Search Login Register  
Pages: [1]   Go Down

Author Topic: JPPF few random quesitons  (Read 1782 times)

webcentric

  • Guest
JPPF few random quesitons
« on: March 13, 2016, 01:25:30 PM »

Hello, I have few question that are random:
  • How can disable for node to download classes from driver? If some class is missing, I would like for node to throw NoClassDefFound, instead of requesting the class from driver.
  • Is there anyway for node to run multiple tasks in parallel? Currently if I want one machine to execute 3 tasks, I run 3 separate JPPF node instances :(.
  • We are using non-blocking mode to run our jobs, and process results in listeners method jobEnded. Sometimes all sent jobs are ended, but sometimes we stop recieve results from driver, and in log we get "o.j.client.BaseJPPFClientConnection - java.io.EOFException: null". This can happen in any time, at the end of whole process or at the beginning, no rules. Any idea why?

Thanks a lot.
Milos
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 2272
    • JPPF Web site
Re: JPPF few random quesitons
« Reply #1 on: March 13, 2016, 05:39:10 PM »

Helo Milos,

Quote
1. How can disable for node to download classes from driver? If some class is missing, I would like for node to throw NoClassDefFound, instead of requesting the class from driver.

The easiest way to do that is by disabling the remote class loading flag in the SLA of your jobs. For example:
Code: [Select]
JPPFJob job = new JPPFJob();
job.setRemoteClassLoadingEnabled(false);

Note that this feature exists since JPPF 4.2

Quote
2. Is there anyway for node to run multiple tasks in parallel? Currently if I want one machine to execute 3 tasks, I run 3 separate JPPF node instances :(.

You can run multiple tasks in parallel in a node by specifying a number of node processing threads greater than 1 in the node's configuration:
Code: [Select]
# execute up to 3 tasks in parallel
jppf.processing.threads = 3

When this property is not specified, the node uses by default the number of available processors, that is, the value returned by Runtime.getRuntime().availableProcessors().

Note that the number of processing threads of a node can also be changed dynamically at runtime, by using the related JMX API or from the administration console.

Quote
3. ... Sometimes all sent jobs are ended, but sometimes we stop recieve results from driver, and in log we get "o.j.client.BaseJPPFClientConnection - java.io.EOFException: null". This can happen in any time, at the end of whole process or at the beginning, no rules. Any idea why?

Unfortunately, there is too little information to determine the cause. The EOFException may mean that the connection was closed or broken on the client side, but that doesn't tell us why. A possibiltiy, given that you process the jobs asynchronously in non-blocking mode, would be that for some reason, your application closes the JPPFClient before all the jobs have been processed. If you set logging to debug level in the client, tyou should see the sequence of traces in the traces, in particular you should see if the client is closed before the jobs are done. Other than that, I'd look in the client log for error messages or exceptions, and do the same in the driver log.

Sincerely,
-Laurent
Logged

webcentric

  • Guest
Re: JPPF few random quesitons
« Reply #2 on: March 13, 2016, 08:44:17 PM »

Hi Laurent.

Sorry, I totally forgot to mention that we are running on JPPF 4.2.2.

1. Thanks!
2. If so, is driver aware of node capacity. Does he send maximum number of tasks that node can process? Meaning if I change jppf.processing.threads = 10, will driver know that he can send up to 10 task on this node for processing? Do you agree it's better to have one node with 10 threads than 5 nodes with 2 threads?
3. I think you are totally right. We have a watchdog process that watches our process and if results are not received in given time restarts all (nodes, driver and client - in that order). That would explain this. My question is that after restart everything is back to normal and working. Can't find why sometimes we stop receiving results from driver. Where to look, in driver or should I log something on the client?
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 2272
    • JPPF Web site
Re: JPPF few random quesitons
« Reply #3 on: March 14, 2016, 09:25:03 AM »

Hi Milos,

Quote
Does he send maximum number of tasks that node can process?

The number of tasks sent to a node is determined by the load-balancing settings.
For a detailed explanation of the load-balancing algorithms and their configuration, I invite you to read the new Load Balancing documentation, and in particular the built-in algorithms section (this doc is written for the upcomin JPPF 5.2 but it still applies to 4.2 if you're not implementing your own custom load-balancer).

Quote
Do you agree it's better to have one node with 10 threads than 5 nodes with 2 threads?

While this is often true, it not always true, as in the following use cases:
- if your tasks are CPU-bound, then it is generally not good for performance to have more threads in the nodes than you have cores
- if your tasks have a large footprint (e.g. dozens or hundreds of MB of data), or if they are sent over a slow network, then you can improve the throughput by parallelizing the network I/O, that is, by sending the tasks to multiple nodes in parallel

Quote
Can't find why sometimes we stop receiving results from driver. Where to look, in driver or should I log something on the client?

I would increase the logging level in both the client and the server:

in the client's log4j.properties, add the following:
Code: [Select]
log4j.logger.org.jppf.client=DEBUG
in the driver's log4j-driver.properties, add:
Code: [Select]
log4j.logger.org.jppf.server.nio.client=DEBUG
log4j.logger.org.jppf.server.nio.nodeserver=DEBUG
log4j.logger.org.jppf.server.queue=DEBUG

This will add a lot of logging, but I'm hopeful it will be enough to capture the error.

Sincerely,
-Laurent
Logged
Pages: [1]   Go Up
 
JPPF Powered by SMF 2.0 RC5 | SMF © 2006–2011, Simple Machines LLC Get JPPF at SourceForge.net. Fast, secure and Free Open Source software downloads