Configuring InfluxPersistenceProviderPackage
To configure InfluxPersistenceProviderPackage, perform the following steps:
1. In ThingWorx Composer, create a new persistence provider.
2. In the Persistence Provider Package field, select InfluxPersistenceProviderPackage.
3. Click Save.
4. Click the Configuration tab and configure the connection information as necessary and save. Reference the configuration options in the tables below. If you are using a persistence provider instance (created using InfluxDB persistence provider package) as the default persistence provider, you can edit the following stream and value stream queue configurations settings. These edits then apply to all streams and value streams. You cannot change these settings for a specific stream or value stream.
* 
When switching the persistence provider of a value stream (for example, from ThingworxPersistenceProvider to InfluxPersistenceProviderPackage), any Thing that implements a value stream must call the RestartThing service to retrieve entries written to the new persistence provider. If the Things are not restarted, entries may be written to the database, but they are not retrieved until the Thing is restarted.
Connection Information for Influx 1.8
Name
Description
Default Value
Connection URL
The URL of the database from which you should acquire connections.
http://localhost:8086
Database Schema
Schema to connect.
thingworx
Username
User name for acquiring a database connection.
twadmin
Password
Password for acquiring a database connection.
n/a
Fetch Size of Data from the Persistence Provider
Fetch size of data from the persistence provider.
5000
Time for Connection Timeout
Time, in seconds, for a connection timeout.
10
Time for Read Timeout
Time, in seconds, for a read timeout.
10
Time for Write Timeout
Time, in seconds, for a write timeout.
10
Stream Processing Settings for Influx 1.8
Name
Description
Base Type
Default Value
Max Queue Size
Maximum number of stream entries to queue. Once the specified value is reached, the subsequent entries are rejected.
Number
250000
Max Wait Time Before Flushing Stream Buffer (millisec)
Number of milliseconds the system waits before flushing the stream buffer.
Number
2000
Number of Processing Threads
Number of processing threads dedicated to the stream.
* 
InfluxPersistenceProviderPackage provider performs better with a smaller number of threads. It is highly optimized to handle data from a smaller number of channels.
For Influx2PersistenceProviderPackage, it is not the case anymore. PTC recommends increasing the number of threads in order to get a better throughput. For InfluxDB Cloud, PTC recommends increasing the Number of Processing Threads to 10, Max Queue Sizeto 1000000, and Max no. of Value Stream Writes in Process Block to 25000, to reach a throughput of 80,000 wps.
Number
5
Max no. of Items Before Flushing Stream Buffer
Maximum number of items to accumulate before flushing the stream buffer.
Number
1000
Max no. of Stream Writes in Process Block
Maximum number of stream writes to process in one block.
Number
2500
Buffer Status Scan Rate (millisec).
The buffer status is checked at the specified rate value in milliseconds.
Number
5
Value Stream Processing Settings for Influx 1.8
Name
Description
Base Type
Default Value
Max Queue Size
Maximum number of value stream entries to queue. Once the specified value is reached, the following entries are rejected.
Number
500000
Max Wait Time Before Flushing Value Stream Buffer (millisec)
Number of milliseconds the system waits before flushing the value stream buffer.
Number
10000
Number of Processing Threads
Number of processing threads allocated to the value stream.
* 
InfluxPersistenceProviderPackage provider performs better with a smaller number of threads. It is highly optimized to handle data from a smaller number of channels.
For Influx2PersistenceProviderPackage, it is not the case anymore. PTC recommends increasing the number of threads in order to get a better throughput. For InfluxDB Cloud, PTC recommends increasing the Number of Processing Threads to 10, Max Queue Sizeto 1000000, and Max no. of Value Stream Writes in Process Block to 25000, to reach a throughput of 80,000 wps.
Number
5
Max no. of Items Before Flushing Value Buffer
Maximum number of items to accumulate before flushing the value stream buffer.
Number
1000
Max no. of Value Stream Writes in Process Block
Maximum number of items to process in one block.
Number
2500
Buffer Status Scan Rate (millisec)
The buffer status is checked at the specified rate value in milliseconds.
Number
5
5. Click the General Information tab and select the Active check box.
6. Click Save.
Was this helpful?