-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to improve PVA put concurrency performance #188
Comments
Based on |
The question is probably for pvxs client, but you could also try MultiChannel class from the pvaClientCPP module. Here is what one can expect when connecting to and retrieving data from 1000 CA channels running in an IOC on the same machine: >>> from pvaccess import * >>> cList = ['X%s' % i for i in range (1,1001)] >>> import time >>> from pvaccess import * >>> cList = ['X%s' % i for i in range (1,1001)] >>> mc = MultiChannel(cList, CA) >>> t0 = time.time(); pv = mc.get(); t1 = time.time(); print(t1-t0) 0.27422356605529785 >>> t0 = time.time(); pv = mc.get(); t1 = time.time(); print(t1-t0) 0.05835700035095215 >>> t0 = time.time(); pv = mc.get(); t1 = time.time(); print(t1-t0) 0.055959224700927734 The initial request is a bit slower because it takes some time to connect to the PVs. Here is what happens with put: >>> vList = [float(i) for i in range (1,1001)] >>> t0 = time.time(); mc.putAsDoubleArray(vList); t1 = time.time(); print(t1-t0) 0.13571906089782715 >>> t0 = time.time(); mc.putAsDoubleArray(vList); t1 = time.time(); print(t1-t0) 0.13674354553222656 |
It looks like github.com doesn't allow transfer of issues between users. So I've opened mdavidsaver/pvxs#42 for further discussion. To answer your question. Concurrent operations are easy. The https://github.com/mdavidsaver/pvxs/blob/dd2f076b4aa6dc63fb91980eda711eabee910696/tools/get.cpp#L104 |
I need to put lots of PV at the same time, which function I used is chan.put.set().exec(), but no matter how I use std::jthread or std::thread to achieve, it looks like always sequential execution at the bottom level. Is there a way to put the value without for waiting timeout?
The text was updated successfully, but these errors were encountered: