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

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

rajendrapote
Beginner
591 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
591 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

0 Kudos
2 Replies
Dmitry_Vyukov
Valued Contributor I
591 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)

0 Kudos
Dmitry_Vyukov
Valued Contributor I
592 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.

0 Kudos
Reply