Skip to content
Snippets Groups Projects
Commit 707b10ff authored by OZGCloud's avatar OZGCloud
Browse files

Merge remote-tracking branch 'origin/master' into OZG-3276-CleanupRestInterfaceAndNaming

parents bf634d81 1bb14aaf
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,7 @@ This properties must be configured to run the application
| Key | Value | Default | Mandatory | Description |
| --- | ----- | ------- | --------- | ----------- |
| quarkus.oidc.auth-server-url | https://sso.dev.by.kop-cloud.de/realms/sh-kiel-dev | none | yes | Url of the keycloak server with the realm |
| quarkus.mongodb.connection-string | mongodb://ozg-mongodb:27017 | none | yes | The connection string for the mongo db database |
| quarkus.mongodb.database | usermanager | usermanager | no | Name of the mongo db database |
| kop.keycloak.sync.cron | 0 15 2 * * ? | 0 15 2 * * ? | no | Cron statement when the sync is done |
......@@ -89,3 +90,115 @@ Monitor your application's health using SmallRye Health
This involves injection fields, constructors and initializers, observer methods, producer methods and fields, disposers and interceptor methods.
[See section 2 of quarkus guide ](https://quarkus.io/guides/cdi-reference#native-executables-and-private-members)
## Quarkus Speichernutzung
### Usermanager Einstellungen
Usermanager als über-jar erstellen und lokal starten:
```bash
./mvnw clean package -Dquarkus.package.type=uber-jar
java -Dquarkus.oidc.auth-server-url=https://sso.dev.by.kop-cloud.de/realms/sh-kiel-de \
-Dkop.user-manager.url=http://localhost:8080 \
-Dkeycloak.url=https://sso.dev.by.kop-cloud.de \
-jar ./target/user-manager-server-1.3.0-SNAPSHOT-runner.jar
```
Usermanager als native Anwendung erstellen und lokal starten:
```bash
./mvnw clean package -Pnative
./target/user-manager-server-1.3.0-SNAPSHOT-runner \
-Dquarkus.oidc.auth-server-url=https://sso.dev.by.kop-cloud.de/realms/sh-kiel-dev \
-Dquarkus.mongodb.connection-string=mongodb://localhost:27018 \
-Dkop.user-manager.url=http://localhost:8080 \
-Dkeycloak.url=https://sso.dev.by.kop-cloud.de \
-Dkop.keycloak.api.user=goofyApiUser \
-Dkop.keycloak.api.password=S9UEMuLG9y9ev99 \
-Dkop.keycloak.api.realm=sh-kiel-dev \
-Dkop.keycloak.api.client=sh-kiel-dev-goofy \
-Dkop.keycloak.sync.cron="* */3 * * * ?" \
-Xmx32m
```
### Commands
Anzeigen des Verwendeten Speichers:
```bash
ps -e -o pid,rss,args | grep application
```
Anzeigen der Details der Speichernutzung:
```bash
pmap -x [pid]
```
Loggen der Speichernutzung in Datei:
```bash
top -b -d1 -o +%MEM | grep user-manager >> usermanager_Xmx32m_long.tsv
```
### Quarkus Speicherverwendung
Minimale quarkus features: cdi, resteasy-reactive, smallrye-context-propagation, vertx
#### Verbrauchter Speicher ohne festgelegtem Heapspace
| Application | Selected additional features | Memory Usage in MB |
| ----------- | ------------------- | ------------ |
| quarkus-test-min-1.0.0-SNAPSHOT-runner | - | 39,232 |
| quarkus-test-1.0.0-SNAPSHOT-runner | resteasy-reactive-jackson | 44,172 |
| quarkus-test-db-1.0.0-SNAPSHOT-runner | mongodb-client, mongodb-panache, narayana-jta, resteasy-reactive-jackson | 46,936 |
| quarkus-test-um-1.0.0-SNAPSHOT-runner | config-yaml, grpc-server, micrometer, mongodb-client, mongodb-panache, narayana-jta, smallrye-health, scheduler | 52,068 |
| quarkus-test-oidc-1.0.0-SNAPSHOT-runner | config-yaml, grpc-server, micrometer, mongodb-client, mongodb-panache, narayana-jta, smallrye-health, scheduler, oidc, keycloak-admin | 71,580 |
| user-manager-server-1.3.0-SNAPSHOT-runner | Usermanager Projekt | 124,164 |
#### Speicher bei Last
Lastest wurde über SoapUI (Projekt Usermanager user-manager-server/src/test/resources/Usermanager-REST-Last.xml) gemacht
| Heapspace | max Memory Usage in MB | max Transactions/s |
| --------- | ---------------------- | ------------------ |
| default | 160 | 300 |
| 32m | 99 | 115 |
#### Empfohlene Speichereinstellungen
Prod:
```yaml
limits:
cpu: "500m"
memory: "256Mi"
requests:
cpu: "50m"
memory: "256Mi"
```
Dev:
```yaml
limits:
cpu: "500m"
memory: "128Mi"
requests:
cpu: "50m"
memory: "128Mi"
```
### Weitere Urls
<https://e.printstacktrace.blog/graalvm-heap-size-of-native-image-how-to-set-it/>
<https://quarkus.io/guides/performance-measure>
<https://www.graalvm.org/22.0/reference-manual/native-image/MemoryManagement/>
<https://github.com/quarkusio/quarkus/issues/22757>
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment