I believe that you are using the same TCP/IP port for all the meters. The target meter is found using meter address when data is received using GXDLMSTranslator.GetAddressInfo( method.
Received data it's send only that meter. If you are using a broadcast address, the data is sent for all the meters. Meter addresses start from One.
You can check OnExclusiveReceived method how this is implemented.
We have created one scheduler to read IP data at regular intervals from the Gurux simulator.
From the scheduler, 1000 meters request (IP data) will be initiated one by one and sent it to Simulator.
Using the same port and different port we have executed the scheduler, but the time it takes is same for both.
So, It looks like the simulator executing requests in sequential manner.
We are not broadcasting the request to the simulator.
Can you please update how the simulator process all received a request in parallel ?
I made a test. There were a thousand meters 200 clients and all read association view and all objects. All this was done parallel without problems. Are you running your clients async or in your own thread?
We are executing 1000 meters request from the scheduler (single program) by creating own thread for each meter.
So from one client (Scheduler) multiple thread created for multiple meters respectively. Should this work with simulator?
As per your comment, 200 clients, what does it means like you have created 200 clients or thread?
Yes, that is working. In my test were 200 threads and clients. Each thread needs its own instance from the client. That is needed because in HDLC framing there is a unique sequence number and if you read example profile generic, data might come in segments.
Is your client application using MTA or STA? Make sure it's MTA.
Yes, Our client application is MTA.
Each request create its own thread and do a connection with the simulator. Still from the logs seems that we get responses back from the simulator in sequentially for meters.
Is your client application available on Gurux git repo, So we can check accordingly
That tester is not in GitHub. There is one change for the simulator. There is an own thread for each message that the simulator receives. Get the latest version and let me know if you have problems.
If your messages are short, it might be that thread is not changed before reply.
Are you using a different server address from each meter? The first one is using 1 and second 2, etc.
If all are using server address #1 it might cause problems like this.
Do we need to update server address for all meters in client settings ?
Using latest simulator we have executed a 1000 meter scheduler and it takes 7 min.
With the previous simulator version, it also takes 7 min to complete 1000 meters reading.
So as per my understanding, in latest simulator, if it is executing in parallel then it should not take 7 min.
The server address is updated automatically for each meter when you have multiple meters on the same TCP/IP port. Address of the first meter is 1, second 2, etc.
If the server address for all the clients is 1 you are reading the same meter 1000 times and it should happen in parallel.
Yes, the server address is the same for all the clients. But it is not running in parallel.
We have also analyzed the core utilization during the scheduler execution, but there is no utilization seen.
If parallel thread execution happens then at least some core utilization has to be made.
From the Simulator logs also seen that all are executed in a sequential manner only.
Connection established
Connected
Connection Closed
Can you share some results from your testing or provide any suggestions for the testing scenarios?
Hi,
Hi,
What programming language you are using?
BR,
Mikko
Hi Mikko,
Hi Mikko,
We are using c#.
Regards
Bhaumik
Hi,
Hi,
I believe that you are using the same TCP/IP port for all the meters. The target meter is found using meter address when data is received using GXDLMSTranslator.GetAddressInfo( method.
Received data it's send only that meter. If you are using a broadcast address, the data is sent for all the meters. Meter addresses start from One.
You can check OnExclusiveReceived method how this is implemented.
BR,
Mikko
Hi Mikko,
Hi Mikko,
We have created one scheduler to read IP data at regular intervals from the Gurux simulator.
From the scheduler, 1000 meters request (IP data) will be initiated one by one and sent it to Simulator.
Using the same port and different port we have executed the scheduler, but the time it takes is same for both.
So, It looks like the simulator executing requests in sequential manner.
We are not broadcasting the request to the simulator.
Can you please update how the simulator process all received a request in parallel ?
Regards
Bhaumik
Hi Bhaumik,
Hi Bhaumik,
I'm sorry, I was thinking that the problem is that all simulators process the same request.
Now I understand the problem. I'll check this.
BR,
Mikko
Hi,
Hi,
I made a test. There were a thousand meters 200 clients and all read association view and all objects. All this was done parallel without problems. Are you running your clients async or in your own thread?
Is there an own thread for each connection?
BR,
Mikko
Hi Mikko,
Hi Mikko,
We are executing 1000 meters request from the scheduler (single program) by creating own thread for each meter.
So from one client (Scheduler) multiple thread created for multiple meters respectively. Should this work with simulator?
As per your comment, 200 clients, what does it means like you have created 200 clients or thread?
Regards
Bhaumik.
Hi,
Hi,
Yes, that is working. In my test were 200 threads and clients. Each thread needs its own instance from the client. That is needed because in HDLC framing there is a unique sequence number and if you read example profile generic, data might come in segments.
Is your client application using MTA or STA? Make sure it's MTA.
BR,
Mikko
Hi Mikko,
Hi Mikko,
Yes, Our client application is MTA.
Each request create its own thread and do a connection with the simulator. Still from the logs seems that we get responses back from the simulator in sequentially for meters.
Is your client application available on Gurux git repo, So we can check accordingly
Regards
Bhaumik
Hi,
Hi,
That tester is not in GitHub. There is one change for the simulator. There is an own thread for each message that the simulator receives. Get the latest version and let me know if you have problems.
BR,
Mikko
Hi Mikko,
Hi Mikko,
We have tried with the latest version of the simulator, Still from the logs, we can see that all requests are processed sequentially only.
Found that, after completing reading from one meter, the simulator starts for the next one.
Can't it read in parallel for all meter requests?
Regards
Bhaumik
Hi,
Hi,
If your messages are short, it might be that thread is not changed before reply.
Are you using a different server address from each meter? The first one is using 1 and second 2, etc.
If all are using server address #1 it might cause problems like this.
BR,
Mikko
Hi Mikko,
Hi Mikko,
All are using server address #1.
Please find attached image for ref.
Let us know if need to pass any other arguments in simulator.
Hi Mikko,
Hi Mikko,
Do we need to update server address for all meters in client settings ?
Using latest simulator we have executed a 1000 meter scheduler and it takes 7 min.
With the previous simulator version, it also takes 7 min to complete 1000 meters reading.
So as per my understanding, in latest simulator, if it is executing in parallel then it should not take 7 min.
Can you please provide your suggestion on this?
Hi,
Hi,
The server address is updated automatically for each meter when you have multiple meters on the same TCP/IP port. Address of the first meter is 1, second 2, etc.
If the server address for all the clients is 1 you are reading the same meter 1000 times and it should happen in parallel.
BR,
Mikko
Hi Mikko,
Hi Mikko,
Yes, the server address is the same for all the clients. But it is not running in parallel.
We have also analyzed the core utilization during the scheduler execution, but there is no utilization seen.
If parallel thread execution happens then at least some core utilization has to be made.
From the Simulator logs also seen that all are executed in a sequential manner only.
Connection established
Connected
Connection Closed
Can you share some results from your testing or provide any suggestions for the testing scenarios?
Regards
Bhaumik
Hi Mikko,
Hi Mikko,
Can you please provide any suggestion on this?
Hi,
Hi,
What data your client is reading from the meters? Is it first reading the association view or is it reading just plain values?
BR,
Mikko
Hi Mikko,
Hi Mikko,
We are reading only Instantaneous profile data and in that specific Buffer values for all meters (Attribute index 2)
Regards
Bhaumik
Hi,
Hi,
We'll create a test case for this in the next week and try to find out what might be the reason.
BR,
Mikko
Hi Mikko,
Hi Mikko,
Did you get the chance to check the scenario?
Regards
Bhaumik
Hi Bhaumik,
Hi Bhaumik,
So far there are no problems found. Multiple meters are read simultaneously without any problems.
I'll let you know when I get more information.
BR,
Mikko