Installation Planning
A Model Manager server is typically installed on a server computer in your organization’s internal network. Computers running the COMSOL Multiphysics software connect to the server computer over the network in order to access the Model Manager server database. Users can also access the Model Manager server web interface via a web browser — either to perform administrative tasks for the server or use the web-based asset management system.
This section contains general guidelines and background information to help you with planning your server setup. This includes a description of the various directories used by the server — the Installation Directory for the Model Manager server program, the Preference Directory for the Model Manager server settings and log files, and the Data Directories for the Model Manager server database — with particular emphasis on recommendations for access permissions, disk requirements, and backup strategies for these directories. The section also contains details on Server Processes and Memory Footprint for the Model Manager server and some Examples of Server Setups.
Installation Directory
The Model Manager server is supported on the Windows®, Linux®, and macOS operating systems. The default installation directory for each operating system is:
Windows®: C:\Program Files\COMSOL\COMSOL64\ModelManagerServer
Linux®: /usr/local/comsol64/modelmanagerserver
macOS: /Applications/COMSOL64/ModelManagerServer
You can choose another directory when installing the server. The installation directory may either be on a physical disk or on a network disk.
Preference Directory
Server settings and log files for a Model Manager server are stored in a preference directory with default location:
Windows®: <user>\.comsol\v64modelmanagerserver
Linux®: <user>/.comsol/v64modelmanagerserver
macOS: <user>/Library/Preferences/COMSOL/v64modelmanagerserver
with <user> being the home directory for the user account running the Model Manager server process. The location when running, for example, as a Windows® service using the predefined NetworkService user account is:
C:\Windows\ServiceProfiles\NetworkService\.comsol\
v64modelmanagerserver
Replace NetworkService with LocalService in the directory path for the predefined LocalService account in Windows®.
Two subfolders of particular interest in the preference directory are:
db — containing accounts, database configurations, and other server preferences.
logs — log files for the Model Manager server.
You can specify another directory path for the preference directory using the
-prefsdir command option — see Command Options for further details.
Backup of Preference Directory
Add the subfolder db in the Model Manager server preference directory to your backup routines. The folder contains accounts, database configurations, and other server preferences that may be time consuming to recreate in case of a server disk crash or other failure. A periodic file system copy of the folder is sufficient.
When restoring a Model Manager server after a failure, copy the db folder from its backup location to its location in the preference directory before starting the server.
Server Components
A Model Manager server uses three separate server components for the storage and search indexing of your data. A default installation of Model Manager server includes all three as managed server components, with the server handling the start and stop of component subprocesses and data backups. You also have the option of replacing some or all of these managed server components with external server components maintained by your organization.
The Model Manager server uses a relational database management system for storing data in a SQL database. The installation includes the PostgreSQL® relational database management system as an optional managed server component. You can also configure the server to use an external relational database management system — see External SQL Databases for a list of supported SQL database servers. The external SQL database server can either run on the same computer as the Model Manager server or on a different computer within the same network.
For the search functionality of the Model Manager, a Model Manager server uses the Apache Solr™ enterprise search platform. The installation includes this platform as an optional managed server component. You can also configure a Model Manager server to use an external Apache Solr™ installation provided by your organization — see External Search Indexes. As for the SQL database server, the external Apache Solr™ server can either run on the same computer as the Model Manager server or on a different computer within the network.
Binary and text data that is too large to be stored inside the SQL database is stored directly on the file system inside a dedicated directory. This directory is registered with the Model Manager server as a server component. The backup of the files in the directory can either be managed by the Model Manager server or it can be handled by external backup routines maintained by your organization.
During installation, you will be given the option of letting the Model Manager server automatically set up a new Model Manager database using managed server components configured with default settings on first launch of the server. This includes, for example, data directories and backup directories located on the server computer’s file system. Depending on your expected user base and IT infrastructure, you may want to modify these default settings once the Model Manager server is up and running — either by moving the default database or by adding a new database via the Model Manager server’s web interface. You can also skip this automatic creation altogether, thereby enabling you to take full control of where data directories and backup directories should be located once the server is up and running.
Data Directories
The three server components of a Model Manager database each uses its own data directory:
The so-called resources directory for storing large binary and text data associated with models, data files, and assets. Large here typically means above a few hundred kilobytes. This includes:
-
-
-
The resources directory is expected to be the largest of the three and you may want to offload it to a dedicated file server whose file system is mounted by the server computer running the Model Manager server — see Examples of Server Setups.
The location of the data directories used by the default Model Manager server database optionally set up during installation depends on the computer account running the server — see Default Data Directories.
When using managed server components, it is recommended to store the data directory for the SQL database server on a physical disk for best performance. For Linux, storing the data directory on a network disk using NFS mounted in hard mode is supported. Other network disk configurations are not supported. Placing the data directory for the search index server on a network disk is not supported for any configuration.
SQL database server — only supported on Linux® using NFS mounted in hard mode.
If placing the data directory of the SQL database server or the search index server on the same computer as the Model Manager server is not an option, the recommended approach is to use external server components. You can install a SQL database server on another computer and then connect to that server from the Model Manager server over the network. Connecting to an external SQL database server may also prove useful if the IT infrastructure of your organization already supports managing SQL databases, including handling their backups. You can also install and connect to an Apache Solr™ enterprise search platform on another computer. Finally, the resources directory may be placed on an external file server as long as the Model Manager server can mount it as a network disk.
Files stored in the resources data directory always pass through the Model Manager server when opened or saved from a COMSOL Multiphysics session — this to ensure data integrity and that necessary permissions are verified. There is therefore little to gain from placing a file server containing the resources data directory geographically near your users if the Model Manager server itself, for example, is not.
Default Data Directories
The location of the data directories used by the default Model Manager server database optionally set up during installation depends on the computer account running the Model Manager server process. For the predefined NetworkService account in Windows®, for example, the directories are located inside:
C:\Windows\ServiceProfiles\NetworkService\AppData\Local\COMSOL\
ModelManager\ManagedDatabases\default-managed
with subdirectories:
data — the data directory of the managed SQL database server.
index — the data directory of the managed search index server.
resources — the managed resources directory.
Replace NetworkService with LocalService in the directory path for the predefined LocalService account in Windows®.
For Linux®, the directories are located inside:
<user>/.comsolmodelmanagerdata/manageddatabases/default-managed
and for macOS:
<user>/Library/Application Support/COMSOL/ModelManager/
ManagedDatabases/default-managed
Backup of Data Directories
A Model Manager server database using managed server components requires backup for the data directory of the SQL database server and for the resources data directory. The data directory of the search index server requires no backup. The default Model Manager database optionally set up during installation is already configured so that the Model Manager server handles this backup — see Managed Backups for further details.
You can also let external backup software provided by your organization handle the backup of the two data directories. This may be useful when you want to save disk space on the computer running the Model Manager server and mounting an external file server — as described for Managed Backups — is not feasible. The simplest option is to periodically shut down the Model Manager server and do a file system copy of both directories to an external location. It is important to copy both directories as they could otherwise become inconsistent with respect to each other.
If shutting down the server is impractical, it is also possible to do a backup while the service is running as long as the external backup software, as well as the file system volume containing the data directories, supports frozen file system snapshots. See the official documentation for the PostgreSQL® relational database management system for further details on file system level backups.
If your external backup software do supports frozen file system snapshots, but the data directory of SQL database server and the resources data directory reside on different disk volumes, it is recommended to order your backups so that the SQL database server’s data directory is backed up first.
Managed Backups
The backup directories for the managed server components used by the default Model Manager database optionally set up during installation are located on the same disk drive as the data directories for these components — see Default Backup Directories. This backup configuration makes it possible to recover data after an accidental deletion in the database but is still vulnerable to a server disk crash. You are therefore strongly recommended to do one of the following options — or a combination thereof — when using a managed Model Manager database:
The best alternative typically depends on your organization’s IT infrastructure.
For the second option — taking a secondary backup of the managed backup directories themselves — there is no strict requirement of shutting down the Model Manager server or using frozen file system snapshots. The server writes the managed backup of the PostgreSQL® relational database management system as an ordered sequence of fixed-size files such that, once a specific file is completed, a new file is begun and the previous file will not be further modified. On the off-chance that the external backup software is running at the exact same moment that the server is writing to the most recent such file, you would only risk potentially missing data in this particular file. This could be rectified the next time the external backup software runs.
The size of the backup directory of a managed SQL database server is expected to be the same order of magnitude as the data directory itself. For a managed resources directory, the backup directory has exactly the same size unless any resources have been permanently deleted in the Model Manager database — such deletions are never propagated to the backup directory by design.
Default Backup Directories
The backup directories for the managed server components used by the default Model Manager server database optionally set up during installation are located on the same disk drive as the Default Data Directories. For the predefined NetworkService account in Windows®, for example, the directories are located inside:
C:\Windows\ServiceProfiles\NetworkService\AppData\Local\COMSOL\
ModelManager\ManagedDatabases\default-managed-backup
with subdirectories:
data_backup — backup directory for the managed SQL database server.
resources_backup — backup directory for the managed resources directory.
Replace NetworkService with LocalService in the directory path for the predefined LocalService account in Windows®.
For Linux®, the directories are located inside:
<user>/.comsolmodelmanagerdata/manageddatabases
/default-managed-backup
and for macOS:
<user>/Library/Application Support/COMSOL/ModelManager/
ManagedDatabases/default-managed-backup
Server Processes and Memory Footprint
The memory footprint of the main Model Manager server process is expected to be small and will typically not be a deciding factor for the overall system requirements of the server computer. When using managed server components for a Model Manager server database, there are two groups of subprocesses started on the server computer:
The memory footprint of both of these two groups will scale with the size of the database. A recommendation is to start with at least a few gigabytes of RAM and then follow up over time as your database grows.
Examples of Server Setups
A few examples of server setups for a Model Manager server installation, in order of increasing complexity, is summarized as follows:
Example 1 — Single Server
A Model Manager server with a fully managed Model Manager database. The main Model Manager server process, as well as subprocesses for the managed SQL database server and managed search index server, all run on a single server computer. The data directories are all located on the server computer’s file system. The backup directories are located on a physical disk drive different from that of the data directories.
Apart from the location of the backup directories, this is the setup used by the default managed database optionally added when installing a Model Manager server. It is also the recommended setup when getting started with a Model Manager server.
Example 2 — Backup File Server
A Model Manager server with a fully managed Model Manager database. The main Model Manager server process, as well as subprocesses for the managed SQL database server and managed search index server, all run on a single server computer. The data directories are all located on the server computer’s file system. The backup directories are located on a separate file server mounted by the server computer.
Example 3 — Managed Resources File Server
A Model Manager server with a fully managed Model Manager database. The main Model Manager server process, as well as subprocesses for the managed SQL database server and managed search index server, all run on a single server computer. The data directories of the managed SQL database server and the managed search index server are located on the server computer’s file system. The managed resources directory is located on a separate file server and the backup directories are located on a second separate file server, both mounted by the server computer.
Example 4 — External SQL Database Server
A Model Manager server with a partially managed Model Manager database. The main Model Manager server process and the managed search index server subprocess run on the main server computer. The Model Manager server connects to an external SQL database server running on a second server computer. The data directory for the managed search index server is located on the main server computer, the data directory for the external SQL database server is located on the second server computer, and the managed resources directory is located on a separate file server. The backup directory for the managed resources directory is located on a second separate file server, while the backup of the external SQL database server is handled by your IT department. This option gives the most flexibility to, for example, scale up memory and disk size over time.