pvaPy icon indicating copy to clipboard operation
pvaPy copied to clipboard

Mirror server slow processing large struct arrays

Open echandler-anl opened this issue 3 years ago • 0 comments

Problem: PV servers has difficultly keeping up reading PV objects with very large struct arrays. The same issue appears with both mirror server and p2p. Steps to reproduce:

  1. IOC is writing PV array with 27000 struct elements to a PV channel at 10hz
  2. Run mirror server mapped to PV channel to a second PV channel
  3. Run pvapy client to read data from the second PV channel

The pvapy client receives the data at 4Hz. The TCP-rx thread in the mirror server is maxed out and the perf profile shows that it is spending most time creating and deleting struct arrays (see graph below):

image

Both the mirror server and pv client can be optimized by caching the PV object structure after the connection is initialized.

echandler-anl avatar Feb 14 '22 19:02 echandler-anl