MX Performance Optimization
Performance benchmarking
- Digital output pulses can be used to measure timing on
an oscilloscope.
- The elapsed_time pseudomotor can be used as a coarse
measurement of time delay.
- MX needs to be profiled extensively.
Examples of performance improvements
Imcagui
- Due to a poor application design, imcagui
used to spend a long time in the
process_imcagui_callbacks
routine without servicing user events.
- At sector 17-ID, this meant that imcagui
might take up to 1.7 seconds before responding
to user input.
- This bottleneck was fixed by explicitly polling for
user input periodically during the callback routine.
- The perceived performance of imcagui is now
much better.
epics_motor driver
- The MX epics_motor driver used to do some
unnecessary initialization of motor speed and
acceleration parameters at startup time.
- Eliminating extraneous channel access calls reduced
the startup time of motor at Sector 10
from 24 seconds to 4 seconds.
PMACs and Lantronix terminal servers
- At SER-CAT, the performance of PMACs controlled via
Lantronix terminal servers was much slower than
for directly connected PMACs.
- This is because the Lantronix servers wait for
0.1 second before transmitting characters
from their serial ports to "improve buffering".
- SER-CAT has replaced the Lantronix servers
with RS-422 connections.
MX server fast mode
- MX scans now set a flag in the MX servers called the
fast_mode flag.
- Individual MX drivers are free to make use of the
fast_mode flag in any way that seems
appropriate.
- Currently used by the following records:
- aframe_det_motor - skips reading
the A, B, and C parameters during a scan.
- energy_motor - skips reading
the crystal d spacing during a scan.
- keithley428 - skips reading
anything from the Keithley during a scan.
Current situation
- Performance characterization can only be done well with the
real controllers.
- It would be desireable to borrow as many of the following
controllers as is practical:
    OMS VME-58, Joerger VSC-16, Compumotor 6K,
Delta Tau PMAC
- Performance optimization tasks will overlap with the server
restructuring and network communication restructuring
tasks that are also in the plans.
- Performance optimization will not be a one time thing.
It will be an ongoing task.