Implementation and Testing of RDB Channel Archiver with
Implementation and Testing of RDB Channel Archiver with My. SQL Richard Ma, De. Pauw University Supervisor: Richard Farnsworth, Argonne National Laboratory 1
Overview • Archive System of the Control System Studio (CSS) collection – CSS is a collection of tools including the Channel Archiver, the Data Browser and other control system diagnostic tools • Built as Java/Eclipse Rich Client Platform (RCP) products • Interfaces to Relational Databases (RDB) for data storage: My. SQL, Oracle • Developed by Kasemir at Oak Ridge National Laboratory 2
IOC Channel Access Protocol Architecture of Archive System Archive. Engine • Reads Engines Configurations from RDB • Samples Process Variables (PVs) from EPICS Input/Output Controllers (IOCs) via Channel Access (CA) protocol • Stores data into RDB • User browses data via the Data Browser Config. Samples RDB (Oracle/My. SQL) Other tools for config & samples config. xml Engine. Config -Import CSS-based OPI 3 Source: RDB Channel Archiver Documentation
Building the Archive Engine • Prerequisite: - Eclipse IDE for RCP Developers - Java JKD • Download Java sources from SNS CSS web page • Import the *. product file and other needed plug -ins into Eclipse • Compile, test and export the product 4
My. SQL Setup 5
Preference Settings • Preference information – RDB URL and account information – Channel Access address of IOCs – Engine parameters: write period, buffer size, etc. • Stored in the preference. ini file of each plugin, override by global plugincustomization. ini • Choose preference file via command option -plugincustomization file_name. ini 6
Running the Archive Engine • Command line tool – invoked from Windows Command Prompt via • archiveengine –engine Demo –port 4812 (–plugin. Customization(/path/to/)test. ini) (–data Demo) 7
Archive Engine Web Page • Access through the engine’s URL • Information such as – Uptime – Preference settings – Engine and channel status • Stop and restart the engine 8
Test Design • Simulated signals from the engine’s plug-in that updates about every 0. 1 s • A group of N channels will generate about 10 N samples per second • Compare the sample update speed and the archive speed • The engine runs twice with the same settings for 5 minutes and record the average • Groups of 50, 100, 150, 200, 300 and 500 PVs are tested 9
Factors that Impact the Archive Speed • • Write period Buffer size Batch size Network traffic Storage engine of My. SQL CPU of the computer where the engine runs Memory of the Java Virtual Machine 10
Default Settings Write_period=30 seconds Buffer_reserve=2. 0 Batch_size=500 Microsoft Windows 7 32 -bit OS with Intel(R) Pentium(R) 4 CPU of 3. 20 GHz • My. SQL server version 5. 0. 77 for redhat-linuxgnu (x 86_64), using My. ISAM storage engine. • • 11
Archive Speed vs. # IOCs, 5 -min Runs Archive Speed vs. # IOCs 2500 500, 2190 Samples/sec 2000 200, 1658 1500 300, 1806 150, 1478 1000 100, 988 500 50, 496 0 0 100 200 300 # IOCs 400 500 600 Default Settings 12
Archive Speed vs. Write_period Samples/sec 1790 1740 1690 1640 30, 1658 15, 1610 1590 1540 10 20 30 40 50 60 Write_period (s) 70 No. IOC=200 Archive Speed vs. Buffer_reserve 2100 2000 Samples/sec 60, 1738 45, 1710 15, 1981 8, 1975 4, 1902 1900 1800 1700 2, 1658 1600 1500 1400 0 2 4 6 8 10 12 Buffer_reserve 14 16 No. IOC=200 Samples/sec Archive Speed vs. Batch_size 1614 1612 1610 1608 1606 1604 1602 1600 1598 1596 1000, 1613 250, 1612 750, 1607 500, 1602 0 200 400 600 Batch_size 800 1000 No. IOC=200 13
Archive Speed vs. # IOCs, 5 -min Runs Archive Speed vs. # IOCs 6000 500, 4931 Samples/sec 5000 Default Settings 4000 Buffer_reserve=16 3000 200, 1981 2000 150, 1478 100, 988 1000 200, 1658 500, 2190 300, 1806 Buffer_reserve=32, Write_period=60 s 50, 496 0 0 100 200 300 400 # IOCs 500 600 14
Archive Speed, Long Run No. IOC 100 150 150 150 200 200 Sample Time Buffer_reserve Archive Speed Average Sample Size 1. 02 d=88128 s 4 989/sec 74 Bytes 2. 86 h=10296 s 8 1479/sec 76 Bytes 2. 5 h=9000 s 16 1466/sec 75 Bytes 5. 7 h=20520 s 4 1485/sec 76 Bytes 18. 55 h=66780 s 4 1160/sec 76 Bytes 1. 82 d=157248 s 16 1390/sec 76 Bytes 1. 29 h=4644 s 8 1512/sec 76 Bytes 1. 72 h=6192 s 16 1536/sec 75 Bytes 11. 97 h=43092 s 4 1484/sec 76 Bytes 15
Conclusion • Short run reliable archive speed can reach 5000 samples per second • Long run reliable archive speed is estimated at 1000 samples per second, but needs more tests 16
Further Researches • The memory of Java Virtual Machine seems to be the bottle neck of long run speed and should be verified • More reliable signals that have exact update frequencies should be used, such as EPICS soft IOCs 17
Acknowledgement • Richard Farnsworth, Marty Smith and Kay Kasemir for advising and helping the research • Argonne National Laboratory for hosting me • Lee Teng program for funding the research 18
- Slides: 18