0

Is it possible to configure an Apache Tomcat (v7) with an specific number of cores? How can I specify it?

I'm developing in a machine with 4 cores, but when uploading to the server with 8 cores, the perfomances increases a 800%. I need to check if the numbers of cores used is the responsible of it.

Relevant data:

  • Server: Apache Tomcat (v7.0.47)
  • OS: Linux Ubuntu 14.04
tremendows
  • 103
  • 1
  • 5

1 Answers1

1

With systemd, in unit file you can: set

  1. CPUAffinity which controls cores used: https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html
  2. CPUQuota to limit CPU utilization: https://www.freedesktop.org/software/systemd/man/systemd.exec.html

also, there are options for setting process priority.

For non-systemd, you can use taskset for affinity settings: https://linux.die.net/man/1/taskset

GioMac
  • 4,444
  • 3
  • 24
  • 41