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 
November 20, 2019, 09:47:40 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: JCA J2EE JPPF connector - wrong local execution thread number  (Read 749 times)

kardigen

  • JPPF Padawan
  • *
  • Posts: 11
JCA J2EE JPPF connector - wrong local execution thread number
« on: September 12, 2016, 12:21:33 PM »

Hi All
  I'm trying to configure local execution thread number run via JCA connector.
The configuration:

jppf_ra_JBoss.rar/META-INF/ra.xml
[...]
<config-property>
          <description>Defines how the JPPF configuration is to be located.
            This property is defined in the format "type|path", where "type" can be one of:
            - "classpath": in this case "path" is a path to a properties file in one of the jars of the .rar file
              example: "classpath|resources/config/jppf.properties"
            - "url": "path" is a url that points to a properties file
              example: "url|file:///home/me/jppf/jppf.properties" (could be a http:// or ftp:// url as well)
            - "file": "path" is considered a path on the file system
              example: "file|/home/me/jppf/config/jppf.properties"
            When an invalid value, or a value that points to a non-existent configuration file, is specified for this,
            "classpath|jppf.properties" is used, to specify the jppf.properties file at the root of jppf-jca.jar in the rar file.
          </description>
          <config-property-name>ConfigurationSource</config-property-name>
          <config-property-type>java.lang.String</config-property-type>
          <config-property-value>file|../server/default/deploy/jppf.properties</config-property-value>
        </config-property>
[...]

In jppf.properties at deploy directory
[...]
jppf.local.execution.enabled = true
jppf.local.execution.threads = 4
[...]

Looks like the configuration is loaded, because I can set if local execution is enabled or disabled, but it always uses the number of available CPUs instead of configuration property.

I can see in the logs:

[org.jppf.execute.AbstractExecutionManager] running 8 processing threads

the same on debugger - there is 8 threads

I did some debug and i found in AbstractExecutionManager the code is executed:

TypedProperties config = JPPFConfiguration.getProperties();
ConfigurationHelper helper = new ConfigurationHelper(config);
int poolSize = helper.getInt(nbThreadsProperty, legacyNbThreadsProperty, Runtime.getRuntime().availableProcessors());

looks like the the AbstractExecutionManager is not aware of jppf.properties file configure in ra.xml

Whereas in AbstractGenericClient.initPools() the configuration file is loaded appropriate, but anyway:

[...]
    int coreThreads = Runtime.getRuntime().availableProcessors();
[...]

No configuration property for number of threads is used.

I'll be glad if you help me to solve the issue of how configure the number of threads, maybe I configured it wrongly?

Regards,
  Kardigen

« Last Edit: September 12, 2016, 12:28:35 PM by kardigen »
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 2257
    • JPPF Web site
Re: JCA J2EE JPPF connector - wrong local execution thread number
« Reply #1 on: September 13, 2016, 11:49:52 PM »

Hi Kardigen,

Thank you for reporting this issue. I registered a JPPF bug for this: JPPF-476 J2EE connector does not use specified number of local executor threads. A fix will be delivered as part of the v5.2.2 maintenance release by the end of ths week.

In the meantime, a workaround that works but isn't very pretty is to copy the config file JBOSS_HOME/server/default/deploy/jppf.properties to JBOSS_HOME/bin (make sure you have it in both locations). Once the fix is released, you can remove the config file from JBOSS_HOME/bin.

Sincerely,
-Laurent
Logged

kardigen

  • JPPF Padawan
  • *
  • Posts: 11
Re: JCA J2EE JPPF connector - wrong local execution thread number
« Reply #2 on: September 27, 2016, 09:33:48 AM »

HI Lolo,
  Thanks for your help, you do really good job!
The workaround works fine, but it would be good to replace it with the solution. When can we expect the 5.2.2 release to be out?

Best,
  Kardigen
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 2257
    • JPPF Web site
Re: JCA J2EE JPPF connector - wrong local execution thread number
« Reply #3 on: September 29, 2016, 09:34:15 AM »

Hi Kardigen,

JPPF 5.2.2 will be released by the end of this week at the lastest. Sorry for the delay, I had to fix another issue uncovered when implementing the enhancement JPPF-475 which was causing our automated build and tests to fail.

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