Skip to main content

Enterprise NoSQL Database

The Enterprise NoSQL Database module (also called MangoNoSQL or IasTSDB) is an embedded, high-performance time-series database designed specifically for storing point value history in Mango. It is included in the commercial edition of Mango and replaces the default behavior of storing point values in the relational SQL database (H2 or MySQL).

Overview

Mango collects time-stamped values from data sources at rates that can reach millions of samples per day across thousands of data points. Storing this volume of data in a traditional relational database creates significant overhead from indexing, transaction management, and row-level locking. The NoSQL module solves this problem by writing point values into a purpose-built, append-optimized time-series data store that is designed for sequential writes and range-based reads.

When the NoSQL module is installed, the pointValues and reports tables are moved out of the SQL database and into the NoSQL store. All other configuration data (data sources, data points, users, events, etc.) remains in the relational database.

How Data Is Stored

Point values are organized into shard files on disk. Each shard covers approximately 24.86 days of data (2,147,483,648 milliseconds). The files are stored under MA_HOME/databases/mangoTSDB/ in a directory hierarchy organized by point ID. A typical shard file is named using a numeric hash of its time range, for example 685.data.rev.

NoSQL shard rollover calculator

Shard 830 contains the reference date (EDT). Mango is currently writing to shard 830.

Shard IDStarts (EDT)Ends (EDT)Status
820Oct 20 2025 at 01:03:11 EDTNov 13 2025 at 20:34:35 ESTStarted on
821Nov 13 2025 at 20:34:35 ESTDec 08 2025 at 17:05:58 ESTStarted on
822Dec 08 2025 at 17:05:58 ESTJan 02 2026 at 13:37:22 ESTStarted on
823Jan 02 2026 at 13:37:22 ESTJan 27 2026 at 10:08:45 ESTStarted on
824Jan 27 2026 at 10:08:45 ESTFeb 21 2026 at 06:40:09 ESTStarted on
825Feb 21 2026 at 06:40:09 ESTMar 18 2026 at 04:11:33 EDTStarted on
826Mar 18 2026 at 04:11:33 EDTApr 12 2026 at 24:42:56 EDTStarted on
827Apr 12 2026 at 24:42:56 EDTMay 06 2026 at 21:14:20 EDTStarted on
828May 06 2026 at 21:14:20 EDTMay 31 2026 at 17:45:44 EDTStarted on
829May 31 2026 at 17:45:44 EDTJun 25 2026 at 14:17:07 EDTStarted on
830ReferenceCurrentJun 25 2026 at 14:17:07 EDTJul 20 2026 at 10:48:31 EDTStarted on
831Jul 20 2026 at 10:48:31 EDTAug 14 2026 at 07:19:55 EDTStarts on
832Aug 14 2026 at 07:19:55 EDTSep 08 2026 at 03:51:18 EDTStarts on
833Sep 08 2026 at 03:51:18 EDTOct 03 2026 at 24:22:42 EDTStarts on
834Oct 03 2026 at 24:22:42 EDTOct 27 2026 at 20:54:06 EDTStarts on
835Oct 27 2026 at 20:54:06 EDTNov 21 2026 at 16:25:29 ESTStarts on
836Nov 21 2026 at 16:25:29 ESTDec 16 2026 at 12:56:53 ESTStarts on
837Dec 16 2026 at 12:56:53 ESTJan 10 2027 at 09:28:17 ESTStarts on
838Jan 10 2027 at 09:28:17 ESTFeb 04 2027 at 05:59:40 ESTStarts on
839Feb 04 2027 at 05:59:40 ESTMar 01 2027 at 02:31:04 ESTStarts on
840Mar 01 2027 at 02:31:04 ESTMar 26 2027 at 24:02:27 EDTStarts on

Each shard covers 2,147,483,648 ms (~24.86 days). Shard IDs match the numeric prefix in filenames such as 830.data.rev. Shard boundaries are always computed in UTC using the same algorithm as Mango's TinyTSDB store; dates and times above are shown in your selected time zone for convenience.

Each data point has its own directory structure within the TSDB, which allows the database to read and write values for individual points without contending with other points. This architecture provides excellent write throughput when data is arriving for many points simultaneously.

The Batch Write-Behind System

To avoid slowing down data collection, the NoSQL module uses a batch write-behind system. When a new point value arrives, it is placed into an in-memory queue rather than being written to disk immediately. Background tasks periodically drain this queue and write batches of values to the appropriate shard files.

The key settings that control this behavior are:

  • Batch write behind spawn threshold -- How many values must accumulate in the queue before a new write task is spawned.
  • Max batch write behind tasks -- The maximum number of concurrent write tasks. Each task consumes a high-priority thread.
  • Batch write inserts per task -- How many values each task pulls from the queue per iteration.

If the write-behind system falls behind the incoming data rate, values accumulate in the queue. If the queue overflows, a NoSQL Data Lost event is raised. This is one of the most common issues encountered in high-load Mango systems.

The "NoSQL Task Queue Full" Error

If you see a "NoSQL Data Lost" alarm or "Task Queue Full" event in the Mango event list, it means the write-behind system could not keep up with the volume of incoming point values. Common causes and remedies include:

  • Too many data points polling too frequently -- Reduce polling rates or stagger data source schedules.
  • Slow disk I/O -- Use faster storage (SSD recommended for production). Verify with iostat or similar tools.
  • Insufficient write threads -- Increase Max batch write behind tasks in the NoSQL settings (requires a corresponding increase in the high-priority thread pool).
  • Large purge operations running concurrently -- Schedule purges during off-peak hours.

See NoSQL Database Performance Tuning for detailed tuning guidance.

Purge Settings

Data purging removes old shard files to free disk space. Purge settings can be configured at the system level (under System Settings > Purge Settings) and overridden per data source or per data point.

Because data is stored in shards covering approximately 25 days, setting a purge period shorter than one shard length is inefficient -- the system must open and rewrite individual shard files rather than simply deleting whole files. For best performance, set purge periods to at least 30 days.

As a rough guideline, 200 million point values consume approximately 4 GB of disk space.

Configuration Properties

The following properties can be set in mango.properties:

PropertyDescriptionDefault
db.nosql.locationBase directory for all NoSQL data storagedatabases
db.nosql.pointValueStoreNameFolder name for point value storage within the base locationmangoTSDB
db.nosql.maxOpenFilesMaximum number of open file handles (set to 2x your data point count)500

Backups

The NoSQL module supports automatic backups to zip files. Incremental backups capture only the changes since the last backup, reducing backup size significantly. Backup settings are configured under Administration > System Settings > Mango NoSQL Configuration. See How to Backup Your Mango System for complete backup guidance.

The Mango NoSQL configuration panel in System Settings showing performance tuning and backup options