Keep the OpenLM SLM database small
When the OpenLM SLM database runs short of space, find which tables are growing before you delete anything. Usage history grows by design, and you trim it with Cleanup Manager. The persisted messages table should stay small: when it grows, OpenLM SLM isn't processing some messages, and you can clear them.
Find what takes up space
Back up the database before you change anything. Then list the largest tables.
On Microsoft SQL Server:
SELECT t.name AS table_name, SUM(a.total_pages) * 8 / 1024 AS size_mb
FROM sys.tables t
JOIN sys.indexes i ON t.object_id = i.object_id
JOIN sys.partitions p ON i.object_id = p.object_id AND i.index_id = p.index_id
JOIN sys.allocation_units a ON p.partition_id = a.container_id
GROUP BY t.name
ORDER BY size_mb DESC;
On MySQL or MariaDB, replace <openlm_database> with the name of your OpenLM SLM database:
SELECT table_name, ROUND((data_length + index_length) / 1024 / 1024) AS size_mb
FROM information_schema.tables
WHERE table_schema = '<openlm_database>'
ORDER BY size_mb DESC;
Two tables matter most:
OLM_USED_LICENSES_HSholds the usage history. It's normally the largest table. To shrink it, purge old history with Cleanup Manager.OLM_PERSISTED_MESSAGEholds the messages Brokers have sent that OpenLM SLM hasn't processed yet. It should be small or empty. If it's large, see the next section.
Clear stuck persisted messages
OpenLM SLM processes the Broker messages of each monitored license server and deletes them once they're processed. OpenLM SLM never processes the messages of a license server that you removed, disabled, or renamed, so they stay in OLM_PERSISTED_MESSAGE and the table keeps growing.
-
Find which license servers the messages belong to.
On Microsoft SQL Server:
SELECT [LM_SERVER], [PORT], MIN([INSERT_TIME_UTC]) AS MIN_TIME, MAX([INSERT_TIME_UTC]) AS MAX_TIME, COUNT(*) AS NRFROM [OLM_PERSISTED_MESSAGE]GROUP BY [LM_SERVER], [PORT]ORDER BY COUNT(*) DESC;On MySQL or MariaDB:
SELECT LM_SERVER, PORT, MIN(INSERT_TIME_UTC) AS MIN_TIME, MAX(INSERT_TIME_UTC) AS MAX_TIME, COUNT(*) AS NRFROM olm_persisted_messageGROUP BY LM_SERVER, PORTORDER BY COUNT(*) DESC; -
For each license server at the top of the list, check it in EasyAdmin:
- If you no longer monitor it, OpenLM SLM never processes its messages. Go to step 3.
- If you still monitor it and its messages keep piling up, OpenLM SLM can't process them. Check the server for data errors in EasyAdmin and check its Broker configuration before you delete anything.
-
Delete the messages of the license servers you no longer monitor. Replace
<host>and<port>with the values from step 1:DELETE FROM OLM_PERSISTED_MESSAGE WHERE LM_SERVER = '<host>' AND PORT = <port>;If every message belongs to license servers you no longer monitor, you can empty the table instead with
TRUNCATE TABLE OLM_PERSISTED_MESSAGE;. Don't delete the messages of a server you still monitor: they're usage that OpenLM hasn't recorded yet. -
Watch the table over the next days to make sure it doesn't grow again.
Newer OpenLM SLM versions keep fewer messages in this table, so upgrading OpenLM SLM also helps. To get a warning before the table grows again, turn on the Persistence queue overflow alert in OpenLM alerts configuration.
Retire workstations you no longer need
Cleanup Manager removes history, groups, and users, but not workstations. To remove workstations, for example after someone installed the Workstation Agent on many machines by mistake:
- In EasyAdmin, go to Start → Users & Groups → Workstations.
- Select the workstations to remove, and then select Retire.
You can't retire a workstation whose Workstation Agent still reports to OpenLM SLM. Uninstall the agent from that machine first.
To also remove the users that the Workstation Agent created and that have no usage, run Cleanup Manager on Users with the creation source Agent. See Cleanup Manager module.
The documentation team might draft this page using a large language model. A technical writer reviews every page and verifies it against the product before publishing it. A human makes the final decision.