Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Am I misinterpreting CounterUpdateIntervalMs? #262

Open
Kritner opened this issue Oct 15, 2019 · 4 comments
Open

Am I misinterpreting CounterUpdateIntervalMs? #262

Kritner opened this issue Oct 15, 2019 · 4 comments

Comments

@Kritner
Copy link
Member

Kritner commented Oct 15, 2019

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
Copy link
Member Author

Kritner commented Oct 15, 2019

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?

@SebastianStehle
Copy link
Contributor

SebastianStehle commented Oct 15, 2019

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

@Kritner
Copy link
Member Author

Kritner commented Oct 16, 2019

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?

@SebastianStehle
Copy link
Contributor

Yes, true. PRs are welcome ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants