Professional Documents
Culture Documents
Admin History Service
Admin History Service
PROPRIETARY INFORMATION
THE CONTENT OF THIS DOCUMENT IS PROPRIETARY INFORMATION OF INSTEP SOFTWARE, LLC (ISS)
AND SHALL NOT BE RELEASED IN ANY FORM TO ANY THIRD PARTY WITHOUT
THE EXPRESS WRITTEN CONSENT OF ISS
Thank you for selecting the eDNA History Service from InStep Software, LLC to fulfill
your real-time computing needs.
We appreciate your business and are confident you will be fully satisfied. Should you
have any comments on ways we could improve eDNA History Service, we would
appreciate hearing from you.
How to Contact Us
Please feel free to contact your ISS representative at any time using contact information
provided to you.
Internet support@instepsoftware.com
WWW www.instepsoftware.com
The software described in this document is furnished under a license agreement and
shall be used only in accordance with the terms of the agreement.
This document, whether in electronic or hard copy format, shall not, in whole, or in
part, be copied, photocopied, reproduced, translated, or reduced without prior
consent in writing from InStep Software, LLC.
Every effort has been made to ensure the accuracy of this document. However,
InStep Software, LLC makes no warranties with respect to this documentation and
disclaims any implied warranties of merchantability and fitness for a particular
purpose. InStep Software, LLC shall not be liable for any errors or for incidental or
consequential damages in connection with the furnishing, performance, or use of
this manual or the examples herein. The information in this document is subject to
change without notice.
Trademarks:
Windows, Windows 7, Windows 2008, Windows Vista, Windows XP, Windows
2003, Windows 2000, Windows NT, Windows 98, Windows 95, Microsoft Office,
Access, Excel, and Word are registered trademarks of the Microsoft Corporation.
Other product and brand names may be trademarks or registered trademarks of their
respective companies and remain the sole property of their respective manufacturer.
All rights are reserved.
For information regarding duplication and additional use of this document contact:
CONTENTS
1. OVERVIEW.................................................................................................... 1
2. HISTORY SERVICE COMPRESSION TECHNIQUES .......................... 2
2.1. Overview ............................................................................................................. 2
2.2. Archiving eDNA Values ..................................................................................... 4
2.2.1. Status Values ..................................................................................................... 4
2.2.2. Time Values ...................................................................................................... 4
2.2.3. Digital Values ................................................................................................... 4
2.2.4. Floating-Point Values ....................................................................................... 4
3. HISTORY CONFIGURATION .................................................................... 6
3.1. Service Configuration File (History.cfg) ............................................................ 6
3.1.1. Age Out Setup ................................................................................................. 10
3.2. Service Mapping File ........................................................................................ 11
3.2.1. Reference Type ............................................................................................... 11
3.2.2. Reference Number .......................................................................................... 11
3.2.3. Reference Path ................................................................................................ 12
3.2.4. Limit Type ...................................................................................................... 12
3.2.5. Limit Constraint .............................................................................................. 12
4. EDNA HISTORY EXPLORER .................................................................. 14
4.1. Selecting a History Service ............................................................................... 14
4.2. History Service Point List and Point IDs .......................................................... 15
4.3. Point Details ...................................................................................................... 16
4.4. Point Index ........................................................................................................ 17
4.5. Point History ..................................................................................................... 18
4.5.1. Edit Data Record ............................................................................................. 18
4.6. Point Data Files ................................................................................................. 19
4.6.1. High Speed Point History ............................................................................... 19
4.7. All Index Files................................................................................................... 21
4.8. All Data Files .................................................................................................... 22
5. HISTORY BACKUP .................................................................................... 23
5.1. Overview ........................................................................................................... 23
5.2. Database Lockout Method ................................................................................ 23
5.2.1. Backing Up eDNA History ............................................................................. 25
5.3. Stopping and Starting History Using prBoss.exe ............................................. 27
5.4. Backup Recommendations................................................................................ 28
6. MAINTENANCE.......................................................................................... 29
1. Overview
The enterprise Distributed Network Architecture (eDNA) History provides for
long-term, online, real-time data storage, and retrieval.
The compression techniques used by History achieve high compression ratios and
support decoding on the client end: all of the information needed to decode the
data is included in the data.
2.1. Overview
In choosing the compression algorithms used by the eDNA History, a relatively
strict set of requirements is specified. The compression algorithms are required to
achieve high ratios of compression while maintaining the ability to be
uncompressed by separate applications; for example, eDNA Client Programs.
To represent a set of n symbols takes m bits, where n <+2m-1. For example, the
ASCII character set contains 127 ASCII characters (96 printable and 31
unprintable). Seven bits are required to represent the 127 characters (27 – 1 =
127). Another bit is added for parity, resulting in the familiar eight-bit
representation for characters.
Using all eight bits to store a set of characters is convenient; however, it does not
result in the most efficient use of space. A more efficient method for storing the
characters is to create a code where the most common letters are given short
codes, and the less common letters have longer codes. For example:
If the character ―e‖ occurs more than the other characters in the set, the
fewest number of bits should represent it.
If ―~‖ hardly occurs, it should be represented by the greatest number of
bits.
This efficient storage method is achieved by first collecting statistics on the data
set, and then by adding the data to a Huffman tree. For example, in the following
set of 1000 characters, the set contains only three different characters as shown:
VALUE COUNT
‗a‘ 950
‗b‘ 21
‗c‘ 29
To build a Huffman decoding tree, take the lowest two counts, and make a node
with the counts combined, with the two values attached on each leaf as shown:
Count = 50
b c
Repeat the process until the tree consumes the entire data set:
Count = 1000
Count = 50
b c
When encoding, branch down the tree to find the target value: branching to the
left codes a ―0‖, branching to the right codes a ―1‖. The result is as follows:
The table shows that representing an ―a‖ requires only one bit – 1. The ―b‖ and
―c‖ require two bits each – 00 and 01, respectively. Storing the 1000 characters as
eight-bit ASCII would have required 1000 bytes, but storing them using the
scheme described would require only 156 bytes as follows:
The algorithm used to store the time stores the initial time and an average delta
time. Each of the time values are then stored as deviations from the average delta
time. The deviations are Huffman encoded.
Note that the range is very large; only a small portion is utilized by common data.
Effectively, the exponent can be much smaller, and it is very repetitive for data
from the same measurement device. It is Huffman encoded directly.
IEEE-754 has 23-bit mantissa, rendering floating-point values with nearly eight
decimal digits of precision. Delta encoding looks only at the differences in the
values typically reduces the mantissa. Further, trailing zeros need not be stored.
3. History Configuration
Two files in History‘s root directory are used for configuration:
Service configuration file
History map file
History ?
KEYWORD DESCRIPTION
AGEOUT_BATCH_SIZE Age Out batch size (20 to 5000 files, default 1000).
AGEOUT_DETAILED_TRACE Displays Age Out detailed trace.
AGEOUT_LEGACY_BA_FILES Required to Age Out legacy BA files on what is now
an HS system.
AGEOUT_LOOP_MSEC_DELAY Age Out loop mSec delay allowing other processes
to run (default 1000).
AGEOUT_REST_TIME Minutes between Age Out sessions (default = -1, do
not run).
AGEOUT_RESTART_COUNT Age Out returns to the oldest files after going this
deep into the file list (min 100, no max, default
10,000).
ALLOW_EARLY_TIMES Allow data with times earlier than two days ago to
be appended.
ALLOW_FUTURE_TIMES Allow data with times beyond two hours in the
future to be appended. This parameter must be
included if the user intends to record simulation data
that is in the future.
ALLOW_MODIFICATION Specifies that modification is allowed (edit, insert,
delete). Required for Redundancy.
SERVICE DNA_DEMO.HISTORY
MAP_PATH MAPFILE.MAP
POINT_FILE POINTFILE.PNT
WRITE_BUFFERS 50000, 1000
READ_BUFFERS 200
MAX_POINT_COUNT 50000
INCLUDE_HIGH_SPEED
NO_FULL_VALIDATION
ALLOW_EARLY_TIMES
ENABLE_POINT_COMPRESSION
ALLOW_MODIFICATION
SERVICE_IP_ADDRESS 172.17.5.60
SERVICE_PORT 6335
OPTIMIZE_FLUSHING
TARGET_LOOP_FLUSH 120
AGEOUT_REST_TIME -1
Note: When tuning History, always set the width of the WRITE_BUFFERS (first
number) to match MAX_POINT_COUNT. If no MAX_POINT_COUNT is
present, set the width of the WRITE_BUFFERS to 10000. The width and depth
(first and second numbers) are multipliers and directly affect the memory
footprint of History.
For a system with 5,000 low-speed points, the following settings would be
acceptable:
AGEOUT_REST_TIME 360
AGEOUT_BATCH_SIZE 100
AGEOUT_RESTART_COUNT 2000
These settings will insert six hours between Age Out runs, History will look at
100 files at a time, and it will return to the end of the file list after a total of 2,000
files have been examined (in roughly 20 runs). If half of the files in a batch are to
be deleted, then, approximately, 50 files would be deleted every six hours. With
1,000,000 values per HSA or BA file, this is 50 million values deleted every six
hours (or approximately 2,300 values per second). This would keep pace with
5,000 points updating once every five seconds.
AGEOUT_REST_TIME 5
AGEOUT_BATCH_SIZE 1000
AGEOUT_RESTART_COUNT 5000
With 350,000 points, a larger number of files must be examined in each Age Out
run:
AGEOUT_REST_TIME 5
AGEOUT_BATCH_SIZE 5000
AGEOUT_RESTART_COUNT 50000
AGEOUT_LEGACY_BA_FILES
AGEOUT_DETAILED_TRACE
Note that the Age Out Days for a given point cannot be set in History; this value
needs to be set in the real-time service. For example, setting the entry within
UnivServ will propagate it to its CMCFG and, subsequently, propagate it to
History
A History map file requires the correct format in order to be usable by the
associated History service. Each History service is assigned a map file. This map
file must be located in the same folder/directory as the History service executable
file. The map file should always be named ―mapfile.map‖.
Each line in the map file contains from three to five tokens that have specific
meanings and are read at start-up, including the following:
Reference Type
Reference Number
Reference Path
Limit Type
Limit Constraint
The following is an example of a line that uses all of the possible tokens:
1, 1, D:\eDNA\History\Data, 3, 5000
Limit Type and Limit Constraint controls are not used and do not apply to lines
that include the ―0‖ Reference Number. The data at that location is uncompressed,
keeps changing, and will cycle around a fixed data size once initial startup of the
History service is completed.
Lines that do not include a Limit Type and Limit Constraint are assigned default
size limits. The default size limit for data storage for this type of line is
approximately 95% of the storage space available. When the 95% level is
reached, data will be directed to the Reference Path location identified by the next
sequential Reference Number.
When a Limit Constraint is used, the constraint value represents the number of
megabytes of space that must be available at the identified storage location in
order for historical data to be written to the location. Consider the following
sample line:
1, 1, d:\eDNA\History\Data, 3, 5000
This specifies that 5000 MB (5.0 GB) of disk space must be available before
historical data can be written to the specified path on the volume labeled ―D:\‖.
The eDNA administrator must ensure that adequate storage space is always
available for storage of historical data. If no storage location is identified in
mapfile.map, or if there is less than 5% space available on the identified storage
device, historical data will be sent to the next location identified as having space
available. This can result in decreased performance of History as well as
decreased performance of the tools that access and make historical data available
for use throughout the system.
Example:
The following is an example of the contents in a mapfile.map, where archiving
moves to the ―e‖ drive when only 4.1 GB of free space is available on the ―d‖
drive:
1, 0, d:\eDNAhist\hist
1, 1, d:\eDNAhist\arch, 3, 4100
1, 2, e:\eDNAhist\arch
Services displayed in light gray are unavailable and cannot be selected. Click on
an available History service to select it. Right-click select Load Points to load the
service‘s available points.
To delete the point, select the point, and right-click select Delete. Confirm the
deletion in the pop-up dialog. (Deleting a point requires that the
ALLOW_MODIFICATION keyword be present in the History configuration
file.)
This tab lists the point name, point status, and data availability, among other point
details. If data is available, ―HAS DATA‖ will display. If the point has no
available data, ―EMPTY‖ will display.
The Earliest Time and Latest Time fields indicate the earliest and latest times
for the point in History. The Hash value is an internal value indicating the hash
value assigned by History. The Hash value provides a quick search algorithm for
finding points in the list. The Record Count indicates the number of readings for
this point.
Administrators can configure the Age Out Days and view the Bits Precision
field. Age Out Days indicates how long History is to store the data. Bits
Precision defaults to 23 for lossless compression.
The user can trigger a QA audit of a point in History by clicking Force Trace.
This can be a time intensive operation and can cause some queries against the data
to take longer than expected. The information in the Indexes section displays the
location of the first and last index for the point.
The History Points dialog displays its reference in the File Reference group and
a reference back to its Index File Reference. It also displays the Previous File
Reference as well as the Next File Reference.
Clicking on the printer icon produces a comprehensive listing for this point. In the
example shown, the ―Index‖ option was selected and lists all of the Index File
records where this particular point appears.
Clicking on the ―<<‖ or ―>>‖ button moves to the Previous Data File Reference
(1:HSA00000002.DAT:540) or the Next Data File Reference
(1:HSA00000002.DAT:815), respectively.
The Data File Reference List displays record number, hash value, hex hash
value, file offset, and record size. The record size is static in raw data files but is
variable in archived files (different blocks of data compress differently).
5. History Backup
This section discusses backing up the History service.
5.1. Overview
Backing up highly dynamic databases poses challenges to most backup systems.
The systems either yank control of files out from under the database or make
inconsistent backups because the files continue to change. This section describes a
simple method administrators can use to facilitate backups.
The best way to ensure that History‘s database is flushed and unchanging is to
stop History. When History stops, it forces all outstanding data and all cached
files to flush. History then unlocks the files by closing them.
Stopping History does not cause a loss of data if the eDNA system is configured
properly. The real-time service sending data to History will cache the data in
memory and to disk while it is unable to communicate with History. It is
important to configure the real-time service to cache and to provide enough room
for the data to be cached.
Most eDNA real-time services provide for caching of data when its associated
History is inaccessible. Typically, an administrator adds the
MAX_HIST_QUEUE_SIZE configuration file parameter. For more information
on real-time service caching, refer to the specific documentation for that real-time
service.
The recommended method to stop and start History and other eDNA services is
through eDNA Explorer BOSS.
There are two levels of database lockout: full lockout and read-only lockout. In
full lockout, History will not allow any kind of access to the database. Users can
neither read nor modify the database. In read-only lockout, History blocks updates
but allows reads. Most backup systems can coordinate with History in read-only
lockout; however, if either the backup system or History show signs of problems,
full lockout should be used.
Once the backup is accomplished, either of the lockout modes can be cancelled
using a restore command. The lockouts have a safety feature that automatically
cancels the lockouts after a specified period of time. This is known as the lockout
timeout. Timeouts are specified in seconds and can be set to infinite.
The optional wait specifies how long to wait for a History to flush its buffers to
disk before locking. The default is set to 60 seconds, but this parameter can
specify a wait of up to 10 minutes.
eDNA uses several data sources—both internal and external—to store data
to the History. In most cases, a real-time service (for example,
Calculation) is used to store the results to History. Another form or
method of storing data can be the eDNA specialty services (such as
Universal, OPCRTS, and DNAMDBus). All eDNA RTS services must
have the appropriate cache settings to write the data to disk during the lock
History period.
Note: Each RTS has its cache keyword to configure for service caching.
2. Stop and start the real-time services through the eDNA Explorer BOSS
Control.
A. Select the ―BOSS‖ service from the list and click OK.
B. Stop all source real-time services ([SITE].[RTS Service]). This
should include all real-time services (Calc, Universal, and so forth)
writing/storing data to the eDNA History.
C. Start all source real-time services after adding the Cache settings
from step 1, page 25.
Note: eDNA administrator privileges are required to stop and start eDNA
real-time services.
The maximum time allowed for the backup can be specified when issuing
the lock History command.
―Hist‖ - This folder contains all basic and high-speed map files, as well as,
the POINTFILE.PNT and HS/HD.DAT files. These files are contained
within the History service directory (Default: D:\Systems\History). Many
eDNA Systems services are installed on slightly different drives.
―arch‖ – This folder contains all high- and low-speed data index and data
files.
Note: Be sure to specify the folders mentioned in this step to back up the
eDNA Archive History files. The ―Hist‖ and ―Arch‖ folders should be
included for backup from the backup software.
6. Verify all cached data from the eDNA real-time services is stored in the
History.
Confirm that the data for the time the eDNA History was locked by
trending several of the eDNA RTS points using eDNA Trend.
InStep Software strongly recommends using the xcopy utility for users planning
to copy all historical files to a ―backup‖ folder before running the ntback utility
software.
In order to use the recommended tools for backing up History, the History must
be running under a BOSS.
…where the stop and start specify the control command, –nb precedes the
name of the boss, in SITE.SERVICE format, –ss precedes the History‘s site,
and –sn precedes the History‘s name.
The best way to know which directories to back up is to look in the Map File
(typically named MAPFILE.MAP). The Map File defines where the History is to
store its database. Be sure to back up all of the directories specified in the Map
File. If saving the configuration information, back up the executable directory as
well.
Backups should occur at times when it is unlikely users will be viewing data.
History might allow viewing, but it will not allow user editing.
6. Maintenance
eDNA History service requires no formal, routine maintenance. As with all eDNA
services, it is recommended that the administrator periodically check the service
screens for error messages and verify that the alarms are current.