|
On 4/22/26 7:30 PM, Bernardo Brotas
Carvalho via Tech-talk wrote:
Hi
Epics tech-talkers,
While
working on a prototype gateway to a WinCCOA I ended up using PVXS C++ client library,
but I was a little
surprised by the relatively low Throughput (when compared to
a plain CA client),
when
making a bunch of "puts" to 1000 ai-PVs, served by a
softIocPVX.
A couple of thoughts.
Overall put_pvxs.cpp is structured correctly, so the PUTs are
being issued in parallel.
After exec()ing all Operations, you could call
client::Context::hurryUp() [1]. Somewhat analogous to
ca_flush_io(), this optional hint can speed up the search phase.
If you want to understand the effect, you can set:
export PVXS_LOG=pvxs.client.setup=DEBUG
Look for messages mentioning "hurryUp()" [2].
Also, you and your friend might wish to read about
std::condition_variable or epicsEvent instead of sleep_for() in a
loop ;)
[1] https
://epics-base.github.io/pvxs/client.html#_CPPv4N4pvxs6client7Context7hurryUpEv
[2] https
://github.com/epics-base/pvxs/blob/3d854e492c44261ca25541dfda2177e934efb8b7/src/client.cpp#L723-L731
My first result, made on
a 10 year old Intel PC where:
## PVXS Client
=== EPICS PVXS Put
Benchmark: 1000 PVs ===
…
=== SUMMARY ===
Client creation: 1.02404 ms (0.100708%)
Put issue phase: 4.97025 ms (0.488793%)
Wait phase: 1010.81 ms (99.4072%)
---------------------------------
TOTAL TIME: 1016.84 ms
Throughput: 983.437 puts/sec
## CA Client
=== EPICS CA Put Benchmark: 1000 PVs ===
….
=== SUMMARY ===
Connect phase: 100.629 ms (95.7%)
Put issue phase: 0.195 ms (0.2%)
Wait phase: 4.252 ms (4.0%)
---------------------------------
TOTAL TIME: 105.130 ms
Throughput: 9512.0 puts/sec
A second test,
performed on an more recent 40-core Intel(R) Xeon(R) CPU,
and using PV grouping, pool, threading, etc.
( 50 groups of ~20 PVs
each), gave me ~2000 puts/sec for PVXS , but still far from
CA.
My Env is:
EPICS_CA_ADDR_LIST=localhost
EPICS_CA_AUTO_ADDR_LIST=NO
EPICS_PVA_ADDR_LIST=localhost
EPICS_PVA_AUTO_ADDR_LIST=NO
EPICS_PVA_NAME_SERVERS=localhost
Am I missing
something?
In case of interest,
my codes made “With a Little Help From My AI Friends”, are
in:
Thanks in advance
Bernardo
IPFN-IST Portugal
|