Skip to content

Commit b8598c2

Browse files
committed
Limit mongodb cache to 1GB on Linux config files. Add more processes templates to supervisor.conf.
1 parent 739cf79 commit b8598c2

File tree

5 files changed

+131
-62
lines changed

5 files changed

+131
-62
lines changed

platform-nix-idx/mongod.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@ processManagement:
33
net:
44
bindIp: 127.0.0.1
55
port: 27017
6+
# Where and how to store data. Add more memory if you have more than 4GB of RAM.
67
storage:
78
dbPath: "/home/user/mongodb/var/lib/mongo"
9+
wiredTiger:
10+
engineConfig:
11+
cacheSizeGB: 1
12+
813
systemLog:
914
destination: file
1015
path: "/home/user/mongodb/var/log/mongodb/mongod.log"

platform-rhel9/mongod.conf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@
77
systemLog:
88
destination: syslog
99

10-
# Where and how to store data.
10+
# Where and how to store data. Add more memory if you have more than 4GB of RAM.
1111
storage:
1212
dbPath: /var/lib/mongo
13+
wiredTiger:
14+
engineConfig:
15+
cacheSizeGB: 1
1316

1417
# how the process runs
1518
processManagement:

platform-rhel9/supervisord.conf

Lines changed: 59 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -99,21 +99,6 @@ stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
9999
stderr_logfile_backups=0 ; # of stderr logfile backups (0 means none, default 10)
100100
stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
101101

102-
[program:iec104server]
103-
command=/home/jsonscada/json-scada/bin/iec104server 1 1
104-
;process_name=%(program_name)s ; process_name expr (default %(program_name)s)
105-
numprocs=1 ; number of processes copies to start (def 1)
106-
directory=/home/jsonscada/json-scada/bin/ ; directory to cwd to before exec (def no cwd)
107-
user=jsonscada ; setuid to this UNIX account to run the program
108-
stdout_logfile=/home/jsonscada/json-scada/log/iec104server.log ; stdout log path, NONE for none;
109-
stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
110-
stdout_logfile_backups=0 ; # of stdout logfile backups (0 means none, default 10)
111-
stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
112-
stderr_logfile=/home/jsonscada/json-scada/log/iec104server.err ; stderr log path, NONE for none;
113-
stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
114-
stderr_logfile_backups=0 ; # of stderr logfile backups (0 means none, default 10)
115-
stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
116-
117102
[program:pg_hist]
118103
command=/home/jsonscada/json-scada/sql/process_pg_hist.sh
119104
;process_name=%(program_name)s ; process_name expr (default %(program_name)s)
@@ -159,21 +144,6 @@ stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
159144
stderr_logfile_backups=0 ; # of stderr logfile backups (0 means none, default 10)
160145
stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
161146

162-
[program:opcuaserver]
163-
command=/usr/bin/node /home/jsonscada/json-scada/src/OPC-UA-Server/index.js
164-
;process_name=%(program_name)s ; process_name expr (default %(program_name)s)
165-
numprocs=1 ; number of processes copies to start (def 1)
166-
directory=/home/jsonscada/json-scada/src/OPC-UA-Server/ ; directory to cwd to before exec (def no cwd)
167-
user=jsonscada ; setuid to this UNIX account to run the program
168-
stdout_logfile=/home/jsonscada/json-scada/log/opcuaserver.log ; stdout log path, NONE for none;
169-
stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
170-
stdout_logfile_backups=0 ; # of stdout logfile backups (0 means none, default 10)
171-
stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
172-
stderr_logfile=/home/jsonscada/json-scada/log/opcuaserver.err ; stderr log path, NONE for none;
173-
stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
174-
stderr_logfile_backups=0 ; # of stderr logfile backups (0 means none, default 10)
175-
stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
176-
177147
[program:mqtt-sparkplug]
178148
; args: instance# loglevel
179149
command=/usr/bin/node /home/jsonscada/json-scada/src/mqtt-sparkplug/index.js
@@ -216,6 +186,65 @@ stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
216186
stderr_logfile_backups=0 ; # of stderr logfile backups (0 means none, default 10)
217187
stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
218188

189+
;[program:iec61850client]
190+
;command=/home/jsonscada/json-scada/bin/iec61850_client 1 1
191+
;;process_name=%(program_name)s ; process_name expr (default %(program_name)s)
192+
;numprocs=1 ; number of processes copies to start (def 1)
193+
;directory=/home/jsonscada/json-scada/bin/ ; directory to cwd to before exec (def no cwd)
194+
;user=jsonscada ; setuid to this UNIX account to run the program
195+
;stdout_logfile=/home/jsonscada/json-scada/log/iec61850client.log ; stdout log path, NONE for none;
196+
;stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
197+
;stdout_logfile_backups=0 ; # of stdout logfile backups (0 means none, default 10)
198+
;stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
199+
;stderr_logfile=/home/jsonscada/json-scada/log/iec61850client.err ; stderr log path, NONE for none;
200+
;stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
201+
;stderr_logfile_backups=0 ; # of stderr logfile backups (0 means none, default 10)
202+
;stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
203+
204+
;[program:plc4xclient]
205+
;; args: instance# loglevel
206+
;command=/home/jsonscada/json-scada/bin/plc4x-client 1 1
207+
;autostart=false
208+
;numprocs=1 ; number of processes copies to start (def 1)
209+
;directory=/home/jsonscada/json-scada/bin/ ; directory to cwd to before exec (def no cwd)
210+
;user=jsonscada ; setuid to this UNIX account to run the program
211+
;redirect_stderr=true ; redirect proc stderr to stdout (default false)
212+
;stdout_logfile=/home/jsonscada/json-scada/log/plc4xclient.log ; stdout log path, NONE for none; default AUTO
213+
;stdout_logfile_maxbytes=10MB ; max # logfile bytes b4 rotation (default 50MB)
214+
;stdout_logfile_backups=10 ; # of stdout logfile backups (0 means none, default 10)
215+
;stdout_capture_maxbytes=10MB ; number of bytes in 'capturemode' (default 0)
216+
217+
;[program:opcuaserver]
218+
;command=/usr/bin/node /home/jsonscada/json-scada/src/OPC-UA-Server/index.js
219+
;;process_name=%(program_name)s ; process_name expr (default %(program_name)s)
220+
;numprocs=1 ; number of processes copies to start (def 1)
221+
;directory=/home/jsonscada/json-scada/src/OPC-UA-Server/ ; directory to cwd to before exec (def no cwd)
222+
;user=jsonscada ; setuid to this UNIX account to run the program
223+
;stdout_logfile=/home/jsonscada/json-scada/log/opcuaserver.log ; stdout log path, NONE for none;
224+
;stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
225+
;stdout_logfile_backups=0 ; # of stdout logfile backups (0 means none, default 10)
226+
;stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
227+
;stderr_logfile=/home/jsonscada/json-scada/log/opcuaserver.err ; stderr log path, NONE for none;
228+
;stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
229+
;stderr_logfile_backups=0 ; # of stderr logfile backups (0 means none, default 10)
230+
;stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
231+
232+
;[program:iec104server]
233+
;command=/home/jsonscada/json-scada/bin/iec104server 1 1
234+
;;process_name=%(program_name)s ; process_name expr (default %(program_name)s)
235+
;numprocs=1 ; number of processes copies to start (def 1)
236+
;directory=/home/jsonscada/json-scada/bin/ ; directory to cwd to before exec (def no cwd)
237+
;user=jsonscada ; setuid to this UNIX account to run the program
238+
;stdout_logfile=/home/jsonscada/json-scada/log/iec104server.log ; stdout log path, NONE for none;
239+
;stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
240+
;stdout_logfile_backups=0 ; # of stdout logfile backups (0 means none, default 10)
241+
;stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
242+
;stderr_logfile=/home/jsonscada/json-scada/log/iec104server.err ; stderr log path, NONE for none;
243+
;stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
244+
;stderr_logfile_backups=0 ; # of stderr logfile backups (0 means none, default 10)
245+
;stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
246+
247+
219248
;[program:mongowr]
220249
;; args: instance# loglevel
221250
;command=/usr/bin/node /home/jsonscada/json-scada/src/mongowr/index.js

platform-ubuntu-2404/mongod.conf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@
77
systemLog:
88
destination: syslog
99

10-
# Where and how to store data.
10+
# Where and how to store data. Add more memory if you have more than 4GB of RAM.
1111
storage:
1212
dbPath: /var/lib/mongodb
13+
wiredTiger:
14+
engineConfig:
15+
cacheSizeGB: 1
1316

1417
# how the process runs
1518
processManagement:

platform-ubuntu-2404/supervisord.conf

Lines changed: 59 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -103,21 +103,6 @@ stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
103103
stderr_logfile_backups=0 ; # of stderr logfile backups (0 means none, default 10)
104104
stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
105105

106-
[program:iec104server]
107-
command=/home/jsonscada/json-scada/bin/iec104server 1 1
108-
;process_name=%(program_name)s ; process_name expr (default %(program_name)s)
109-
numprocs=1 ; number of processes copies to start (def 1)
110-
directory=/home/jsonscada/json-scada/bin/ ; directory to cwd to before exec (def no cwd)
111-
user=jsonscada ; setuid to this UNIX account to run the program
112-
stdout_logfile=/home/jsonscada/json-scada/log/iec104server.log ; stdout log path, NONE for none;
113-
stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
114-
stdout_logfile_backups=0 ; # of stdout logfile backups (0 means none, default 10)
115-
stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
116-
stderr_logfile=/home/jsonscada/json-scada/log/iec104server.err ; stderr log path, NONE for none;
117-
stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
118-
stderr_logfile_backups=0 ; # of stderr logfile backups (0 means none, default 10)
119-
stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
120-
121106
[program:pg_hist]
122107
command=/home/jsonscada/json-scada/sql/process_pg_hist.sh
123108
;process_name=%(program_name)s ; process_name expr (default %(program_name)s)
@@ -163,21 +148,6 @@ stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
163148
stderr_logfile_backups=0 ; # of stderr logfile backups (0 means none, default 10)
164149
stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
165150

166-
[program:opcuaserver]
167-
command=/usr/bin/node /home/jsonscada/json-scada/src/OPC-UA-Server/index.js
168-
;process_name=%(program_name)s ; process_name expr (default %(program_name)s)
169-
numprocs=1 ; number of processes copies to start (def 1)
170-
directory=/home/jsonscada/json-scada/src/OPC-UA-Server/ ; directory to cwd to before exec (def no cwd)
171-
user=jsonscada ; setuid to this UNIX account to run the program
172-
stdout_logfile=/home/jsonscada/json-scada/log/opcuaserver.log ; stdout log path, NONE for none;
173-
stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
174-
stdout_logfile_backups=0 ; # of stdout logfile backups (0 means none, default 10)
175-
stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
176-
stderr_logfile=/home/jsonscada/json-scada/log/opcuaserver.err ; stderr log path, NONE for none;
177-
stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
178-
stderr_logfile_backups=0 ; # of stderr logfile backups (0 means none, default 10)
179-
stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
180-
181151
[program:mqtt-sparkplug]
182152
; args: instance# loglevel
183153
command=/usr/bin/node /home/jsonscada/json-scada/src/mqtt-sparkplug/index.js
@@ -220,6 +190,65 @@ stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
220190
stderr_logfile_backups=0 ; # of stderr logfile backups (0 means none, default 10)
221191
stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
222192

193+
;[program:iec61850client]
194+
;command=/home/jsonscada/json-scada/bin/iec61850_client 1 1
195+
;;process_name=%(program_name)s ; process_name expr (default %(program_name)s)
196+
;numprocs=1 ; number of processes copies to start (def 1)
197+
;directory=/home/jsonscada/json-scada/bin/ ; directory to cwd to before exec (def no cwd)
198+
;user=jsonscada ; setuid to this UNIX account to run the program
199+
;stdout_logfile=/home/jsonscada/json-scada/log/iec61850client.log ; stdout log path, NONE for none;
200+
;stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
201+
;stdout_logfile_backups=0 ; # of stdout logfile backups (0 means none, default 10)
202+
;stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
203+
;stderr_logfile=/home/jsonscada/json-scada/log/iec61850client.err ; stderr log path, NONE for none;
204+
;stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
205+
;stderr_logfile_backups=0 ; # of stderr logfile backups (0 means none, default 10)
206+
;stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
207+
208+
;[program:plc4xclient]
209+
;; args: instance# loglevel
210+
;command=/home/jsonscada/json-scada/bin/plc4x-client 1 1
211+
;autostart=false
212+
;numprocs=1 ; number of processes copies to start (def 1)
213+
;directory=/home/jsonscada/json-scada/bin/ ; directory to cwd to before exec (def no cwd)
214+
;user=jsonscada ; setuid to this UNIX account to run the program
215+
;redirect_stderr=true ; redirect proc stderr to stdout (default false)
216+
;stdout_logfile=/home/jsonscada/json-scada/log/plc4xclient.log ; stdout log path, NONE for none; default AUTO
217+
;stdout_logfile_maxbytes=10MB ; max # logfile bytes b4 rotation (default 50MB)
218+
;stdout_logfile_backups=10 ; # of stdout logfile backups (0 means none, default 10)
219+
;stdout_capture_maxbytes=10MB ; number of bytes in 'capturemode' (default 0)
220+
221+
;[program:opcuaserver]
222+
;command=/usr/bin/node /home/jsonscada/json-scada/src/OPC-UA-Server/index.js
223+
;;process_name=%(program_name)s ; process_name expr (default %(program_name)s)
224+
;numprocs=1 ; number of processes copies to start (def 1)
225+
;directory=/home/jsonscada/json-scada/src/OPC-UA-Server/ ; directory to cwd to before exec (def no cwd)
226+
;user=jsonscada ; setuid to this UNIX account to run the program
227+
;stdout_logfile=/home/jsonscada/json-scada/log/opcuaserver.log ; stdout log path, NONE for none;
228+
;stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
229+
;stdout_logfile_backups=0 ; # of stdout logfile backups (0 means none, default 10)
230+
;stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
231+
;stderr_logfile=/home/jsonscada/json-scada/log/opcuaserver.err ; stderr log path, NONE for none;
232+
;stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
233+
;stderr_logfile_backups=0 ; # of stderr logfile backups (0 means none, default 10)
234+
;stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
235+
236+
;[program:iec104server]
237+
;command=/home/jsonscada/json-scada/bin/iec104server 1 1
238+
;;process_name=%(program_name)s ; process_name expr (default %(program_name)s)
239+
;numprocs=1 ; number of processes copies to start (def 1)
240+
;directory=/home/jsonscada/json-scada/bin/ ; directory to cwd to before exec (def no cwd)
241+
;user=jsonscada ; setuid to this UNIX account to run the program
242+
;stdout_logfile=/home/jsonscada/json-scada/log/iec104server.log ; stdout log path, NONE for none;
243+
;stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
244+
;stdout_logfile_backups=0 ; # of stdout logfile backups (0 means none, default 10)
245+
;stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
246+
;stderr_logfile=/home/jsonscada/json-scada/log/iec104server.err ; stderr log path, NONE for none;
247+
;stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
248+
;stderr_logfile_backups=0 ; # of stderr logfile backups (0 means none, default 10)
249+
;stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
250+
251+
223252
;[program:mongowr]
224253
;; args: instance# loglevel
225254
;command=/usr/bin/node /home/jsonscada/json-scada/src/mongowr/index.js

0 commit comments

Comments
 (0)