Skip to content

Commit c052b4a

Browse files
committed
WIP
1 parent 7d63465 commit c052b4a

3 files changed

Lines changed: 14 additions & 12 deletions

File tree

docs/developer-guide/licensing-guidelines-for-contributors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Tip: use `./gradlew dependencies` on projects that use gradle as build tool.
1313
In all source files (except where not appropriate such as property files or test fixtures), include a copyright header:
1414

1515
```
16-
Copyright ${YEAR}, OpenRemote Inc.
16+
Copyright <YEAR>, OpenRemote Inc.
1717
1818
See the CONTRIBUTORS.txt file in the distribution for a
1919
full listing of individual contributors.

docs/developer-guide/system-administration.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ GCT: Total garbage collection time.
7575
Force garbage collection with:
7676

7777
```shell
78-
docker exec -it openremote_manager_1 /usr/bin/jcmd 1 GC.run
78+
docker exec -it or-manager-1 /usr/bin/jcmd 1 GC.run
7979
```
8080

8181
### Install the JDK
@@ -209,26 +209,28 @@ To keep the instance healthy and prevent Docker crashes, you can follow these gu
209209
7. Set `effective_cache_size` (P - `shared_buffers`) = 1.5GB
210210
8. Actively monitor `pg_hot_update_percent` metric to attain a >90% HOT update percentage; tweak the asset table `fillfactor` to achieve this (default is set to: 90% as asset table is not significantly large)
211211

212-
Apply this config in docker compose yaml as follows:
212+
Apply this config in docker compose yaml as follows (use environment variables for convenience:
213213
```yaml
214214
services:
215215
postgresql:
216-
image: openremote/postgresql:latest
217-
shm_size: 1gb
216+
image: openremote/postgresql:${POSTGRESQL_VERSION:-latest-slim}
217+
restart: always
218+
# RAM limits and PostgreSQL memory settings should be set appropriately for the expected load (see documentation)
219+
shm_size: ${OR_DB_SHM:-156mb}
218220
deploy:
219221
resources:
220222
limits:
221-
memory: 2G
223+
memory: ${OR_DB_RAM:-512M}
222224
command:
223225
- postgres
224226
- -c
225-
- shared_buffers=512MB
227+
- shared_buffers=${OR_DB_SHARED_BUFFERS:-128MB}
226228
- -c
227-
- effective_cache_size=1536MB
229+
- effective_cache_size=${OR_DB_CACHE_SIZE:-384MB}
228230
- -c
229-
- maintenance_work_mem=256MB
231+
- maintenance_work_mem=${OR_DB_MAINTENANCE_WORK_MEM:-56MB}
230232
- -c
231-
- work_mem=16MB
233+
- work_mem=${OR_DB_WORK_MEM:-4MB}
232234
```
233235
234236
#### Some simple guidelines

docs/user-guide/metrics.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ graph LR
2828
subgraph Docker [Docker Containers]
2929
direction TB
3030
HAProxy["<b>HA Proxy</b><br/>http://localhost:8404/metrics<br/>- Uses prometheus-exporter<br/>- Runs on own embedded web server port 8404<br/>- Configured via haproxy.cfg"]:::greenStyle
31-
Manager["<b>Manager</b><br/>http://localhost:8405/metrics<br/>- Micrometer with Prometheus Registry<br/>- Runs on own embedded web server port 8404<br/>- OR_METRICS_ENABLED: true/false"]:::greenStyle
31+
Manager["<b>Manager</b><br/>http://localhost:8405/metrics<br/>- Micrometer with Prometheus Registry<br/>- Runs on own embedded web server port 8404 but mapped to 8405 by default<br/>- OR_METRICS_ENABLED: true/false"]:::greenStyle
3232
Keycloak["<b>Keycloak</b><br/>http://localhost:8080/metrics<br/>- Built in prometheus metrics support<br/>- KC_METRICS_ENABLED: true/false<br/>- Do not publicly expose"]:::orangeStyle
3333
PostgreSQL["<b>PostgreSQL</b><br/>http://localhost:8406/metrics<br/>- Uses separate query-exporter docker container and config"]:::redStyle
3434
end
@@ -37,7 +37,7 @@ graph LR
3737
%% Connections
3838
PromScrape --> Manager
3939
PromScrape --> HAProxy
40-
PromScape --> PostgreSQL
40+
PromScrape --> PostgreSQL
4141
CWAgent --> CW
4242
CW --> DB
4343

0 commit comments

Comments
 (0)