OrleansDashboard icon indicating copy to clipboard operation
OrleansDashboard copied to clipboard

Am I misinterpreting CounterUpdateIntervalMs?

Open Kritner opened this issue 5 years ago • 4 comments

Here's my SiloHostBuilder code registering the dashboard:

.UseDashboard(options =>
                {
                    options.Port = _orleansConfig.OrleansDashboardPort;
                    options.CounterUpdateIntervalMs = 10000;
                });

However, I'm not seeing a difference on the dashboard in how often it is hitting the grains involved with the dashboard, see the log:

10/15/2019 5:25:14 PM info: [       1] Request starting HTTP/1.1 GET http://localhost:8081/DashboardCounters application/json 
10/15/2019 5:25:14 PM info: [       1] Request starting HTTP/1.1 GET http://localhost:8081/ClusterStats application/json 
10/15/2019 5:25:14 PM info: [       2] Request finished in 0.4737ms 200 text/json
10/15/2019 5:25:14 PM info: [       2] Request finished in 1.4174ms 200 text/json
10/15/2019 5:25:14 PM info: [       1] Request starting HTTP/1.1 GET http://localhost:8081/TopGrainMethods application/json 
10/15/2019 5:25:14 PM info: [       2] Request finished in 1.2085ms 200 text/json
10/15/2019 5:25:14 PM info: [       1] Request starting HTTP/1.1 GET http://localhost:8081/DashboardCounters application/json 
10/15/2019 5:25:14 PM info: [       2] Request finished in 0.4793ms 200 text/json
10/15/2019 5:25:14 PM info: [       0] GetSimpleGrainStatistics
10/15/2019 5:25:14 PM info: [       0] GetDetailedHosts onlyActive=True
10/15/2019 5:25:15 PM info: [       1] Request starting HTTP/1.1 GET http://localhost:8081/DashboardCounters application/json 
10/15/2019 5:25:15 PM info: [       1] Request starting HTTP/1.1 GET http://localhost:8081/ClusterStats application/json 
10/15/2019 5:25:15 PM info: [       2] Request finished in 0.5074ms 200 text/json
10/15/2019 5:25:15 PM info: [       2] Request finished in 1.466ms 200 text/json
10/15/2019 5:25:15 PM info: [       1] Request starting HTTP/1.1 GET http://localhost:8081/TopGrainMethods application/json 
10/15/2019 5:25:15 PM info: [       2] Request finished in 1.1134ms 200 text/json
10/15/2019 5:25:15 PM info: [       1] Request starting HTTP/1.1 GET http://localhost:8081/DashboardCounters application/json 
10/15/2019 5:25:15 PM info: [       2] Request finished in 0.4819ms 200 text/json
10/15/2019 5:25:15 PM info: [       0] GetSimpleGrainStatistics
10/15/2019 5:25:15 PM info: [       0] GetDetailedHosts onlyActive=True
10/15/2019 5:25:16 PM info: [       1] Request starting HTTP/1.1 GET http://localhost:8081/DashboardCounters application/json 
10/15/2019 5:25:16 PM info: [       1] Request starting HTTP/1.1 GET http://localhost:8081/ClusterStats application/json 
10/15/2019 5:25:16 PM info: [       2] Request finished in 0.4419ms 200 text/json
10/15/2019 5:25:16 PM info: [       2] Request finished in 1.714ms 200 text/json
10/15/2019 5:25:16 PM info: [       1] Request starting HTTP/1.1 GET http://localhost:8081/TopGrainMethods application/json 
10/15/2019 5:25:16 PM info: [       2] Request finished in 1.1589ms 200 text/json
10/15/2019 5:25:16 PM info: [       1] Request starting HTTP/1.1 GET http://localhost:8081/DashboardCounters application/json 
10/15/2019 5:25:16 PM info: [       2] Request finished in 0.5079ms 200 text/json
10/15/2019 5:25:16 PM info: [       0] GetSimpleGrainStatistics
10/15/2019 5:25:16 PM info: [       0] GetDetailedHosts onlyActive=True

Is this expected behavior? Am I misinterpreting what this property does?

Kritner avatar Oct 15 '19 17:10 Kritner

Looking further at the grain calls themselves, it seems that it may be only querying the cluster for this information every 10 seconds (as my configuration specifies), is the result then just cached for the 10 seconds the GET http://localhost:8081/DashboardCounters is running, in between cluster queries? Wouldn't it make sense for these two "queries" to be in sync with their following of the CounterUpdateIntervalMs property?

Kritner avatar Oct 15 '19 17:10 Kritner

It defines how often the raw measurements are aggregated. Its there to improve performance by increasing the duration

SebastianStehle avatar Oct 15 '19 20:10 SebastianStehle

I see, is there a reason that the API hits wouldn't also follow that ms timer? the data would seemingly not change any time during the 10 seconds of not hitting orleans for the information, isn't that just additional overhead (albeit i'd imagine quite small) by continuing to hit the counter APIs every second?

Kritner avatar Oct 16 '19 12:10 Kritner

Yes, true. PRs are welcome ;)

SebastianStehle avatar Oct 16 '19 15:10 SebastianStehle