Fast sending of message

developerlearn999
Posts: 85
Joined: Thu Jun 20, 2019 9:34 am

Re: Fast sending of message

Post by developerlearn999 » Mon Sep 09, 2019 6:06 am

Hi alt,
seem's like all issues were fixed!
when do you attend to release a stable release?
developerlearn999
Posts: 85
Joined: Thu Jun 20, 2019 9:34 am

Re: Fast sending of message

Post by developerlearn999 » Thu Sep 12, 2019 8:34 am

Hi alt, something not stable about sending speed.
on some test i make 200/sec, and on some it's 12/sec...
my network is 150/150.
how do you decide in which speed to release it?
can i take any log and send it to you?

i did the test of the 200/sec in the build that was release on : 2.7.0-beta-190910
now i test it with : 2.7.0-beta-190911 and get 50/sec

can framewok version influence it?
alt
Site Admin
Posts: 988
Joined: Tue Apr 25, 2006 9:45 am

Re: Fast sending of message

Post by alt » Thu Sep 12, 2019 10:35 am

Timer in windows is inaccurate the deviation can be up to 15 ms for every tick.
In your case it should be 1000/200=5ms . It is almost impossible on desktop pc.

How do you calculate the speed?

Please try to output new metric client.Metrics.Sent.Requests.PerSecond.
It is the average speed from begin of connection. You can also reset the metrics
client.Metrics.Sent.Requests.Reset();
then it will calculate from point you want.
developerlearn999
Posts: 85
Joined: Thu Jun 20, 2019 9:34 am

Re: Fast sending of message

Post by developerlearn999 » Thu Sep 12, 2019 11:20 am

Hi alt,
i added a log before the submit line and after.
i used the EntranceId GUID line bfore and after the SUBMIT to measure the time.
this case is from my pc, when i send 250/sec.
Before Submit where time is:9/12/2019 2:07:07 PM,with EntranceId:058a4d27-db99-40b8-b8eb-48331f1da7b5
after
after Submit where time is:9/12/2019 2:07:07 PM, finish send tme :9/12/2019 2:07:09 PM,with EntranceId:058a4d27-db99-40b8-b8eb-48331f1da7b5
i did before on my pc 200/sec, and got the next graph from the provider:
Image

*on my pc i have 12 vCors and on the erver 48.
developerlearn999
Posts: 85
Joined: Thu Jun 20, 2019 9:34 am

Re: Fast sending of message

Post by developerlearn999 » Thu Sep 12, 2019 11:35 am

more input:
1. i used the _client.Metrics.Sent.Requests.PerSecond and got 16.3544361370444 . which is low.
2. i have another graph before your last fixes looke like this

Image
developerlearn999
Posts: 85
Joined: Thu Jun 20, 2019 9:34 am

Re: Fast sending of message

Post by developerlearn999 » Thu Sep 12, 2019 11:54 am

Hi alt,
send you a PM with wireshark frm my pc
where i sent 249 in 2 sec+-
alt
Site Admin
Posts: 988
Joined: Tue Apr 25, 2006 9:45 am

Re: Fast sending of message

Post by alt » Thu Sep 12, 2019 12:21 pm

Have you mean that if you use the version 2.7.0-beta-190910
then submitting works correct in your application?
developerlearn999
Posts: 85
Joined: Thu Jun 20, 2019 9:34 am

Re: Fast sending of message

Post by developerlearn999 » Thu Sep 12, 2019 12:44 pm

yes
the 2 graph tha i put in the previous answers is from version 2.6.
also on my pc all ok but not on the server.
developerlearn999
Posts: 85
Joined: Thu Jun 20, 2019 9:34 am

Re: Fast sending of message

Post by developerlearn999 » Thu Sep 12, 2019 12:57 pm

i did now a test on the server and it seems slower on wire shark
also i saw this
Image
alt
Site Admin
Posts: 988
Joined: Tue Apr 25, 2006 9:45 am

Re: Fast sending of message

Post by alt » Thu Sep 12, 2019 4:58 pm

Network errors can also slow down submitting speed.
alt
Site Admin
Posts: 988
Joined: Tue Apr 25, 2006 9:45 am

Re: Fast sending of message

Post by alt » Thu Sep 12, 2019 4:59 pm

developerlearn999 wrote:
Thu Sep 12, 2019 12:44 pm
the 2 graph tha i put in the previous answers is from version 2.6.
Please test only with version 2.7.0. In version 2.6 speed limit was implemented wrong.
developerlearn999
Posts: 85
Joined: Thu Jun 20, 2019 9:34 am

Re: Fast sending of message

Post by developerlearn999 » Sun Sep 15, 2019 6:45 am

Hi Alt
I am using only 2.7.0
developerlearn999
Posts: 85
Joined: Thu Jun 20, 2019 9:34 am

Re: Fast sending of message

Post by developerlearn999 » Sun Sep 15, 2019 6:54 am

Hi alt,
the 120 max speed you saw in the graph was with 2.6 version
the 200 speed you see it's with version 2.7 (on my pc with law bandwidth).
when I upload the 2.7 to the server the speed limit drops to less then 50/sec
where I have a 150/150 line
alt
Site Admin
Posts: 988
Joined: Tue Apr 25, 2006 9:45 am

Re: Fast sending of message

Post by alt » Sun Sep 15, 2019 4:17 pm

Please check if Stopwatch.IsHighResolution is True on the server.

Code: Select all

if (Stopwatch.IsHighResolution)
    {
        Console.WriteLine("Operations timed using the system's high-resolution performance counter.");
    }
    else 
    {
        Console.WriteLine("Operations timed using the DateTime class.");
    }
See also https://docs.microsoft.com/en-us/dotnet ... mework-4.8
developerlearn999
Posts: 85
Joined: Thu Jun 20, 2019 9:34 am

Re: Fast sending of message

Post by developerlearn999 » Mon Sep 16, 2019 6:14 am

Hi alt
i get Stopwatch.IsHighResolution==True on both my pc and servers
Post Reply