Skip to content

Commit

Permalink
Merge branch 'RM-3342_load_test_results' into 'master'
Browse files Browse the repository at this point in the history
RM-3342: load test results recommendations

See merge request cdoc2/cdoc2-capsule-server!53
  • Loading branch information
jann0k committed Sep 18, 2024
2 parents 5447314 + 200942f commit be1f0c3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
16 changes: 16 additions & 0 deletions admin-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,19 @@ To run the server, execute the following command:
java -jar -Dspring.config.location=application.properties cdoc2-put-server-VER.jar
`

#### Running in Docker

From `1.4.1` release docker images are using `Java 21` as Java base image. To fully use Java21 improvements
enable virtual threads by adding `spring.threads.virtual.enabled=true` into `application.properties`.

To get better throughput it's recommended to give at least 2 CPUs and 1GB of memory per `get-server` and `put-server` instance.
2 GB of memory per process is even better (some additional throughput gains).

Instead of creating two VMs with 1CPU, create single VM with 2 CPU and run both
`get-server` and `put-server` on that VM instance (two Java process per VM).

For sample setup see [cdoc2-gatling-tests/setup-load-testing](https://github.com/open-eid/cdoc2-gatling-tests/tree/master/setup-load-testing)

### Get Server

#### Requirements
Expand Down Expand Up @@ -140,6 +153,9 @@ This will configure the Get Server to trust all requests done by Estonian ID car
The configuration file `application.properties` must contain the following configuration parameters:

```
#Enable when running on Java21 to improve througput by ~20%
#spring.threads.virtual.enabled=true
# The format used for the keystore. It could be set to JKS in case it is a JKS file
server.ssl.key-store-type=PKCS12
Expand Down
4 changes: 3 additions & 1 deletion get-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,9 @@
<configuration>
<image>
<env>
<BP_JVM_VERSION>${java.version}</BP_JVM_VERSION>
<!-- use spring.threads.virtual.enabled=true in application.properties -->
<!-- to take advantage of Java 21 virtual threads -->
<BP_JVM_VERSION>21</BP_JVM_VERSION>
<BP_SPRING_CLOUD_BINDINGS_DISABLED>true</BP_SPRING_CLOUD_BINDINGS_DISABLED>
<!--suppress UnresolvedMavenProperty -->
<BP_DEPENDENCY_MIRROR>${bp.dependency.mirror}</BP_DEPENDENCY_MIRROR>
Expand Down
2 changes: 1 addition & 1 deletion put-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@
<configuration>
<image>
<env>
<BP_JVM_VERSION>${java.version}</BP_JVM_VERSION>
<BP_JVM_VERSION>21</BP_JVM_VERSION>
<BP_SPRING_CLOUD_BINDINGS_DISABLED>true</BP_SPRING_CLOUD_BINDINGS_DISABLED>
<!--suppress UnresolvedMavenProperty -->
<BP_DEPENDENCY_MIRROR>${bp.dependency.mirror}</BP_DEPENDENCY_MIRROR>
Expand Down

0 comments on commit be1f0c3

Please sign in to comment.