Individual JVM for Access Service

JFrog Installation & Setup Documentation

Content Type
Installation & Setup
ft:sourceType
Paligo

JFrog is implementing a significant architectural update to Artifactory to improve resource management and strengthen the infrastructure. Starting from Artifactory version 7.90 Self-Hosted, Access service will now run on a dedicated Java Virtual Machine (JVM) with a dedicated Tomcat server, independent of the main Artifactory JVM.

In Helm installations, the Access service is moved from the Artifactory container to run as a separate container within the same pod.

Resource Allocation

An individual JVM for an Access service comes with updated default JVM parameters that manage memory allocation for Access. Default settings are as follows:

  • For Helm Installations:

    InitialRAMPercentage is set to 20%.

    MaxRAMPercentage is set to 70% of the value set for resource.limits.memory in the Access container. If no resource limits are defined for the container, the JVM will use the pod’s host memory metrics for RAMPercentage calculations.

  • For Native Installation types (Archive, RPM, Debian, Docker):

    MaxRAMPercentage is set to 25%.

Previous JVM parameters, including memory adjustments (Xmx and Xms), which were configured as part of shared.extraJavaOpts in the Artifactory System YAML, will no longer be applicable to the Access service.

To set Java parameters to the Access JVM, access.extraJavaOpts configuration is already added to the Artifactory System YAML. The values in the example below are merely illustrative and should be modified according to the size and usage of the Artifactory instance:

access:
  extraJavaOpts: "-XX:InitialRAMPercentage=10 -XX:MaxRAMPercentage=25"

JVM Arguments

-XX:InitialRAMPercentage is used to compute the initial heap size of your Java application. If configuring -XX:InitialRAMPercentage=25 and the overall physical server (or container) memory is 1GB, then your Java application’s initial heap size will be set to 250MB (i.e., 25% of 1GB)

-XX:MaxRAMPercentage is used to compute the maximum heap size of your Java application. If configuring -XX:MaxRAMPercentage=30 and the overall physical server (or container) memory is 1GB, then your Java application’s max heap size will be set to 300MB (i.e., 30% of 1GB).

Important

Before you upgrade, if the JFrog Platform is running on a Kubernetes or Openshift cluster, which forces request or limit resources to be defined for every container, you should add a resources definition to the new container. Sizing templates are available in the Helm Chart.

Database Connections

For PostgreSQL, Oracle, MySql, and MariaDB database connections, the Access Tomcat service will continue to use the same database connection pool as before when using databases supporting multiple connections.

For a Derby database connection, the Access Tomcat service requires an additional database as Derby only supports a single connection driver. An additional Derby database will be created on $JFROG_HOME/artifactory/var/data/access/derby. For existing installations, the startup script will copy Derby data from Artifactory to Access. The time to copy the data can vary depending on the amount of data to be copied.

Important

Before you upgrade, verify that enough disk space is available to store an additional copy of your database, then add the new database to your backup.

Database Drivers

To use a database other than PostgreSQL or Derby, ensure that the corresponding driver is placed in the bootstrap directory located at $JFROG_HOME/artifactory/var/bootstrap/artifactory/tomcat/lib. The Access Tomcat service will use custom drivers from this bootstrap directory.

If you place the database drivers directly in the Artifactory application directory ($JFROG_HOME/artifactory/app/artifactory/tomcat/lib), the Access application will fail to load. You are required to move the drivers into the bootstrap directory to avoid failures.

Logging

The Tomcat logs are located at $JFROG_HOME/artifactory/var/log/tomcat. To avoid conflicts between logs generated by Artifactory and Access Tomcat services, the Access Tomcat log is configured to include access as part of the file name.

The following Tomcat logs are generated:

  • tomcat-access-localhost-<date>.log

  • tomcat-access-catalina-<date>.log