Our license for the server software is good for only four cores, but our machine has two four-core processors. How can I set the processor affinity for the Tomcat service?
-
Our license for the server software is good for only four cores, but our machine has two four-core processors. How can I set the processor affinity for the Tomcat service?
Hello TJSnider,
thank you for question.
We are not aware of any Tomcat-local setting for processor affinity.
Supposing that your server is running on Windows operating system, you should be able to:- set affinity for a running process (in Task Manager)
- start a process with given afinity (can be encapsulated by a Windows Service to start Tomcat with this setting each time):
start /affinity {cpunumber} {path} - install CloverETL Server to a virtual machine with limited number of cores (common way)
First two options do not work on Linux as system provides information about physical instead of allowed number of cores to Java Virtual Machine. Virtualization should solve the problem in almost all deployment scenarios. -
Regarding setting processor affinity on Windows, you may find following MS tech forum posts interesting:
Processor Affinity and Set Affinity...
Help! My Application only runs on a Single Processor system! -
Thank you for your help.
I did eventually get it working using the SysInternals tool PsExec as outlined by this blog http://waynes-world-it.blogspot.com/2009/06/processor-affinity-on-windows-server.html. Most of my initial problem was caused by the blog's failing to mention that PsExec is part of the SysInternals tool set that has to be downloaded from Microsoft (as is the instsrv example--from the Windows Resource Kit).
Additionally, PsExec and instrsrv don't seem to like spaces in the paths...even using quotes seemed to hose things up. -
Hi TJSnider,
thank you for sharing knowledge!
Please sign in to leave a comment.
Comments 4