Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Forums
  3. Gurux.DLMS.Server.Example.Net & Gurux.DLMS.Client.Example.python Different Latencies

Gurux.DLMS.Server.Example.Net & Gurux.DLMS.Client.Example.python different latencies

Forum Rules

Before commenting read Forum rules

Don't comment the topic if you have a new question.

You can create a new topic selecting correct category from Gurux Forum and then create a new topic selecting "New Topic" from the top left.

By mfried , 11 May, 2022
Forums
General discussion

Good day Gurux Community
I am using the C# application "Gurux.DLMS.Server.Example.Net" and the Python project "Gurux.DLMS.Client.Example.python" from the Gurux Github for a thesis in my studies. I noticed that the latencies are roughly different. In test measurements where 1000 load profiles were transferred, it took between 23 and 103 seconds. I am puzzling over the reason. Is there a logical explanation for this phenomenon?
Thanks in advance for the answers.

Profile picture for user Kurumi

Kurumi

4 years 1 month ago

Hi,

Hi,

It's hard to say, but usually, the reason is in the garbage collection or TCP/IP connection. Do you have 1000 different load profiles or do you have 1000 rows in your profile?

BR,
Mikko

mfried

4 years 1 month ago

Hello Mikko

Hello Mikko
Thank you for your answer. I have 1000 rows in one load profile.
I have done some research. I could explain the big differences by timeouts in the TCP/IP connection (as you mentioned). However, is it possible that the garbage collection makes that much of a difference? I have a graph here for illustration with minimum, maximum and median delay as a function of packet size. I am generally amazed that communication takes so long (e.g. about 16 seconds when transmitting only one row).
Kind regards from Switzerland
Manuel

Image
Profile picture for user Kurumi

Kurumi

4 years ago

Hi,

Hi,

The garbage collection might affect a little bit, but not so much. 16 seconds sounds a long time for reading a one row. I did test this and it takes about 6 ms to read one row.

start = time.time_ns()
cells = self.readRowsByEntry(pg, 1, 1)
end = time.time_ns()
print(str((end - start)/1000000))

Reading all the rows from the buffer (10000 rows) takes about 11 seconds.
start = time.time_ns()
cells = self.read(pg, 2)
end = time.time_ns()
print(str((end - start)/1000000))

This will take a long time because there is a lot of data moved between the client and server.

BR,
Mikko

mfried

4 years ago

Hello

Hello
I have expressed myself somewhat unclearly. By "I am generally amazed that communication takes so long (e.g. about 16 seconds when transmitting only one row)." I meant the total time for data retrieval (from communication establishment to data display).
Kind regards
Manuel

Profile picture for user Kurumi

Kurumi

4 years ago

Hi Manuel,

Hi Manuel,

I believe that you are reading the association view. If you save that and read only data that you want to the reading time is much smaller.
Try to add -o argument like this:
-o association.xml

It will read the association view and save it for the file. The next read is faster. Have you modified the client example? The client example reads all the data from the meter and that is taking a long time.

BR,
Mikko

mfried

4 years ago

Hello Mikko

Hello Mikko
Thank you for your answer. Saving the association view sounds like a good idea, thanks! Besides project specific adjustments I deleted the method "self.readScalerAndUnits()" and the method "self.getReadOut()" in the readAll() method from the GXDLMSReader.py. As far as I could interpret, this is the minimum configuration of the readAll() method to read the load profile.
Kind regards
Manuel

Profile picture for user Kurumi

Kurumi

4 years ago

Hi,

Hi,

Note that the might be multiple profile generic objects on the meter and this approach will read them all. Remove profile generic objects that you don't need from the saved association file.

BR
Mikko

mfried

4 years ago

Hello Mikko

Hello Mikko
Thanks for the tip, I will adjust that. For me, the topic has thus settled.
Kind regards
Manuel

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 06/09/2026 - 11:16
    gurux.dlms.java 4.0.95
  • Tue, 06/09/2026 - 10:03
    Gurux.DLMS.Python 1.0.199
  • Mon, 06/08/2026 - 13:39
    gurux.dlms.cpp 9.0.2606.0801
  • Mon, 06/01/2026 - 10:15
    gurux.dlms.cpp 9.0.2606.0101
  • Thu, 05/28/2026 - 16:06
    gurux.dlms.java 4.0.94

New forum topics

  • Error reading L&G Meter
  • Pass a TCP Client to GXNet
  • Australian EDMI Mk10D (Essential Energy area)
  • Strange mix of data notificiation vs get response
  • DLMS Connection
More

Who's new

  • Tuanhgg
  • Adel
  • charnon
  • Paddles
  • Miguel Ángel
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin