Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.
1690 Discussions

J2EE Apps use only two cores of the quad-core CPU of Xeon?

rajendrapote
Beginner
275 Views

We need to install our J2EE application on a Xeon server machines, built by IBM, but need to install it only for two cores due
to licensing issues. Any idea on how to make a JVM use only two cores of the quad-core CPU of Xeon?

0 Kudos
1 Solution
Dmitry_Vyukov
Valued Contributor I
275 Views
Quoting - rajendrapote

We need to install our J2EE application on a Xeon server machines, built by IBM, but need to install it only for two cores due
to licensing issues. Any idea on how to make a JVM use only two cores of the quad-core CPU of Xeon?

On Windows you can create script which will execute SetProcessAffinityMask() call for JVM process.

This is general method, although maybe JVM executable has corresponding command line parameters.

View solution in original post

2 Replies
Dmitry_Vyukov
Valued Contributor I
275 Views
Quoting - rajendrapote

We need to install our J2EE application on a Xeon server machines, built by IBM, but need to install it only for two cores due
to licensing issues. Any idea on how to make a JVM use only two cores of the quad-core CPU of Xeon?

On linux you can use numactl(8):

http://linux.die.net/man/8/numactl

(see --physcpubind parameter)

Dmitry_Vyukov
Valued Contributor I
276 Views
Quoting - rajendrapote

We need to install our J2EE application on a Xeon server machines, built by IBM, but need to install it only for two cores due
to licensing issues. Any idea on how to make a JVM use only two cores of the quad-core CPU of Xeon?

On Windows you can create script which will execute SetProcessAffinityMask() call for JVM process.

This is general method, although maybe JVM executable has corresponding command line parameters.

Reply