![Page 1: Controls Group New Channel Access Nameserver Joan Sage 12/4/01](https://reader035.vdocuments.site/reader035/viewer/2022080914/56649cc55503460f9498ec32/html5/thumbnails/1.jpg)
Controls GroupControls Group
New Channel Access Nameserver
Joan Sage
12/4/01
![Page 2: Controls Group New Channel Access Nameserver Joan Sage 12/4/01](https://reader035.vdocuments.site/reader035/viewer/2022080914/56649cc55503460f9498ec32/html5/thumbnails/2.jpg)
Controls GroupControls Group
Overview
• Background
• Motivation
• Old JLab Nameserver
• New JLab Nameserver
• Results
![Page 3: Controls Group New Channel Access Nameserver Joan Sage 12/4/01](https://reader035.vdocuments.site/reader035/viewer/2022080914/56649cc55503460f9498ec32/html5/thumbnails/3.jpg)
Controls GroupControls Group
Background
• By default, EPICS does not use a nameserver
• Process variable name resolution achieved via UDP broadcasts
• JLab has used a cdev based nameserver for BURT and MEDM clients for several years
![Page 4: Controls Group New Channel Access Nameserver Joan Sage 12/4/01](https://reader035.vdocuments.site/reader035/viewer/2022080914/56649cc55503460f9498ec32/html5/thumbnails/4.jpg)
Controls GroupControls Group
EPICS PV Name Resolution
IOC
IOC
IOC
IOC
Client
BroadcastTCP Connection
![Page 5: Controls Group New Channel Access Nameserver Joan Sage 12/4/01](https://reader035.vdocuments.site/reader035/viewer/2022080914/56649cc55503460f9498ec32/html5/thumbnails/5.jpg)
Controls GroupControls Group
Why Use A Nameserver?
• Reduce IOC CPU load due to broadcast requests for name resolution
• Provide PV location information for tools that do not require connection
• Improve client connection time
![Page 6: Controls Group New Channel Access Nameserver Joan Sage 12/4/01](https://reader035.vdocuments.site/reader035/viewer/2022080914/56649cc55503460f9498ec32/html5/thumbnails/6.jpg)
Controls GroupControls Group
Why A New JLab Nameserver?
• Old JLab Nameserver – Integration with client programs required code
changes and recompilation– Required changes to Channel Access Library
• Because of these difficulties, the old nameserver was only used with BURT and MEDM
![Page 7: Controls Group New Channel Access Nameserver Joan Sage 12/4/01](https://reader035.vdocuments.site/reader035/viewer/2022080914/56649cc55503460f9498ec32/html5/thumbnails/7.jpg)
Controls GroupControls Group
New Nameserver
• No modifications needed to client code• No modifications to Channel Access Library• Client programs are configured to use nameserver
by setting EPICS_CA_ADDR_LIST to the IP Address of the Nameserver host and by setting EPICS_CA_AUTO_ADDR_LIST to NO
![Page 8: Controls Group New Channel Access Nameserver Joan Sage 12/4/01](https://reader035.vdocuments.site/reader035/viewer/2022080914/56649cc55503460f9498ec32/html5/thumbnails/8.jpg)
Controls GroupControls Group
New Nameserver
• Nameserver reads signal.list files generated by IOCs at boot time to fill initial hash table
• Nameserver “learns” about PVs added to the system after startup by broadcasting to fill unknown PV requests
![Page 9: Controls Group New Channel Access Nameserver Joan Sage 12/4/01](https://reader035.vdocuments.site/reader035/viewer/2022080914/56649cc55503460f9498ec32/html5/thumbnails/9.jpg)
Controls GroupControls Group
New Nameserver
• Built on PCAS example code – directoryServer (Jeff Hill’s suggestion)
• pvExistTest reimplemented
• Heartbeat CA monitors for each IOC
![Page 10: Controls Group New Channel Access Nameserver Joan Sage 12/4/01](https://reader035.vdocuments.site/reader035/viewer/2022080914/56649cc55503460f9498ec32/html5/thumbnails/10.jpg)
Controls GroupControls Group
New Nameserver
• Runs as a daemon with automatic restart on failure (code stolen from CA Gateway)
• Nameserver Startup Time < 5 sec for 250K PVs
![Page 11: Controls Group New Channel Access Nameserver Joan Sage 12/4/01](https://reader035.vdocuments.site/reader035/viewer/2022080914/56649cc55503460f9498ec32/html5/thumbnails/11.jpg)
Controls GroupControls Group
New Nameserver
• Nameserver monitors IOC heartbeat for connection events
• When an IOC goes down– Hashtable updated
– Nameserver monitors for reconnection events
– Nameserver does not respond to clients asking for PVs on IOCS that are down
• Deleted and moved PVs are automatically handled
![Page 12: Controls Group New Channel Access Nameserver Joan Sage 12/4/01](https://reader035.vdocuments.site/reader035/viewer/2022080914/56649cc55503460f9498ec32/html5/thumbnails/12.jpg)
Controls GroupControls Group
New Nameserver
NS
Client
IOC
IOC
IOC
IOC
BroadcastTCP Connection
Fallthrough*
*Nameserver Hash Table IS Updated
![Page 13: Controls Group New Channel Access Nameserver Joan Sage 12/4/01](https://reader035.vdocuments.site/reader035/viewer/2022080914/56649cc55503460f9498ec32/html5/thumbnails/13.jpg)
Controls GroupControls Group
Results
• Tested name resolution and connection 10,465 PVs on 36 IOCs Max 300 PVs/IOC
• Without Nameserver – 4.39 sec
• With New Nameserver – 2.18 sec
• Being used successfully for Jlab operations for 3 months
![Page 14: Controls Group New Channel Access Nameserver Joan Sage 12/4/01](https://reader035.vdocuments.site/reader035/viewer/2022080914/56649cc55503460f9498ec32/html5/thumbnails/14.jpg)
Controls GroupControls Group
Side Effects
• An extra computer is required to run the Nameserver
• Central “database” – Allows generation of a list of PVs that never
resolve– Allows identification of duplicate PVs