|
We have set up three time series A, B and C in Mesh so that C=A+B. I have written a script that sets values on A and B for one day, and then reads back C for that same day. Some performance measurements indicate that writing the values is very fast (~30 ms) and retrieving them back (including the calculation) takes a bit longer with about 800 ms. From the logs of my script: Now I tried to do the same in parallel with 32 threads – so every thread writes to A and B and reads from C (including the calculation) for one day, but every thread uses a different day so there are no conflicts. Now it seems that regardless of the number of threads are started, the total time is linear with the number of threads, meaning that Mesh treats every call consecutively. The “time per run” is always about 900 ms, so two threads take 1800 ms to complete, three threads 2700 ms, and so on. From the logs of my script with 32 threads (only last line): My question is: is this expected? Can we modify parameters to make this runs in parallel or will every request always be treated in sequence? Or is this maybe related to the fact this is happing on the same time series and will requests on different time series be treated in parallel? Below is the script for reference. |
Replies: 2 comments 1 reply
Yes. This is expected. There is no way to make this run parallelly due to how the Mesh server is implemented and at the moment there is no concrete plans to change this behavior. The result will be the same independent of which time series you write/read to. |
|
Okay thanks, that is clear. Can I expect that only calculations are handled one after the other but read/write requests that don't involve calculations will go in parallel? Or are all requests handled in sequence? |
Yes. This is expected. There is no way to make this run parallelly due to how the Mesh server is implemented and at the moment there is no concrete plans to change this behavior. The result will be the same independent of which time series you write/read to.