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

[Telemetry] Add scalability tests for known bottlenecks #151110

Merged
merged 13 commits into from
Mar 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"journeyName": "POST /api/telemetry/v2/clusters/_stats - 1600 dataviews",
"scalabilitySetup": {
"warmup": [
{
"action": "constantUsersPerSec",
"userCount": 10,
"duration": "30s"
}
],
"test": [
{
"action": "rampUsersPerSec",
"minUsersCount": 10,
"maxUsersCount": 400,
"duration": "195s"
}
],
"maxDuration": "5m"
},
"testData": {
"esArchives": [],
"kbnArchives": [
"x-pack/test/scalability/fixtures/kbn_archiver/1600-dataviews.json"
]
},
"streams": [
{
"requests": [
{
"http": {
"method": "POST",
"path": "/api/telemetry/v2/clusters/_stats",
"body": "{}",
"headers": {
"Cookie": "",
"Kbn-Version": "",
"Accept-Encoding": "gzip, deflate, br",
"Content-Type": "application/json"
},
"statusCode": 200
}
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"journeyName": "POST /api/telemetry/v2/clusters/_stats - no cache - 1600 dataviews",
"scalabilitySetup": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on local results, I think we need to adjust threshold to track.

    "responseTimeThreshold": {
      "threshold1": 10000,
      "threshold2": 20000,
      "threshold3": 30000
    },

Not sure of response time matters here, we can increase values just to understand how many requests were completed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Member Author

@afharo afharo Feb 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++ to increasing the timeouts... I'm concerned about the Connection refused failures, though... shouldn't those be timeouts instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Timeouts increased in elastic/kibana@98c1f84 (#151110)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@afharo I think this test basically kills Kibana server and that's why we see "Connection refused"

I can see multiple errors like

[2023-02-21T18:51:35.148+01:00][ERROR][plugins.dataViews.dataView.indexPatterns] ConnectionError: connect EADDRNOTAVAIL 127.0.0.1:9220 - Local (0.0.0.0:0)
    at KibanaTransport.request (/Users/dmle/github/kibana/node_modules/@elastic/transport/src/Transport.ts:585:17)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at KibanaTransport.request (create_transport.ts:57:17)
    at ClientTraced.FieldCapsApi [as fieldCaps] 

(/Users/dmle/github/kibana/node_modules/@elastic/elasticsearch/src/api/api/field_caps.ts:78:10)
    at callFieldCapsApi (es_api.ts:74:12)
    at getFieldCapabilities (field_capabilities.ts:46:23)
    at IndexPatternsFetcher.getFieldsForWildcard (index_patterns_fetcher.ts:76:31)
    at IndexPatternsApiServer.getFieldsForWildcard (index_patterns_api_client.ts:33:12)
    at DataViewsService.getFieldsAndIndicesForWildcard (data_views.ts:541:12)
    at DataViewsService.refreshFieldSpecMap (data_views.ts:624:46)
    at DataViewsService.initFromSavedObjectLoadFields (data_views.ts:756:33)
    at DataViewsService.initFromSavedObject (data_views.ts:798:34)

and

2023-02-16T16:01:15.143+01:00][ERROR][http] NoLivingConnectionsError: There are no living connections
    at KibanaTransport.request (/Users/dmle/github/kibana/node_modules/@elastic/transport/src/Transport.ts:456:17)
    at KibanaTransport.request (/Users/dmle/github/kibana/node_modules/elastic-apm-node/lib/instrumentation/modules/@elastic/elasticsearch.js:143:28)
    at KibanaTransport.request (create_transport.ts:57:29)
    at Security.hasPrivileges (/Users/dmle/github/kibana/node_modules/@elastic/elasticsearch/src/api/api/security.ts:962:33)
    at checkPrivilegesAtResources (check_privileges.ts:121:81)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at Object.atSpaces (check_privileges.ts:219:16)
    at SavedObjectsSecurityExtension.checkSavedObjectsPrivileges [as checkPrivilegesFunc] (check_saved_objects_privileges.ts:52:20)
    at SavedObjectsSecurityExtension.checkPrivileges (saved_objects_security_extension.ts:612:14)
    at SavedObjectsSecurityExtension.checkAuthorization (saved_objects_security_extension.ts:411:45)
    at SavedObjectsSecurityExtension.authorize (saved_objects_security_extension.ts:578:54)
    at SavedObjectsSecurityExtension.authorizeGet (saved_objects_security_extension.ts:822:12)
    at SavedObjectsRepository.get (repository.ts:1704:33)
    at SavedObjectsClient.get (saved_objects_client.ts:117:12)
    at UiSettingsClient.read (ui_settings_client_common.ts:158:20)
    at UiSettingsClient.getUserProvided (ui_settings_client_common.ts:53:59)
    at UiSettingsClient.getAll (base_ui_settings_client.ts:56:26)
    at Object.fieldFormatServiceFactory (plugin.ts:44:31)
    at getVisData (get_vis_data.ts:35:30)
    at vis.ts:36:23
    at Router.handle (router.ts:192:30)
    at handler (router.ts:147:13)
    at exports.Manager.execute (/Users/dmle/github/kibana/node_modules/@hapi/hapi/lib/toolkit.js:60:28)
    at Object.internals.handler (/Users/dmle/github/kibana/node_modules/@hapi/hapi/lib/handler.js:46:20)
    at exports.execute (/Users/dmle/github/kibana/node_modules/@hapi/hapi/lib/handler.js:31:20)
    at Request._lifecycle (/Users/dmle/github/kibana/node_modules/@hapi/hapi/lib/request.js:371:32)
    at Request._execute (/Users/dmle/github/kibana/node_modules/@hapi/hapi/lib/request.js:281:9)

Copy link
Member Author

@afharo afharo Feb 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We covered this on Zoom. The intention of this test is to show that this API is problematic in this scenario. It will help us track any improvements for different efforts that have branched off since we've identified this bottleneck.

Is it a problem to have reports that show failures?

"responseTimeThreshold": {
"threshold1": 1000,
"threshold2": 3000,
"threshold3": 5000
},
"warmup": [
{
"action": "constantUsersPerSec",
"userCount": 1,
"duration": "30s"
}
],
"test": [
{
"action": "rampUsersPerSec",
"minUsersCount": 1,
"maxUsersCount": 10,
"duration": "120s"
}
],
"maxDuration": "5m"
},
"testData": {
"esArchives": [],
"kbnArchives": [
"x-pack/test/scalability/fixtures/kbn_archiver/1600-dataviews.json"
]
},
"streams": [
{
"requests": [
{
"http": {
"method": "POST",
"path": "/api/telemetry/v2/clusters/_stats",
"body": "{ \"refreshCache\": true }",
"headers": {
"Cookie": "",
"Kbn-Version": "",
"Accept-Encoding": "gzip, deflate, br",
"Content-Type": "application/json"
},
"timeout": 240000,
"statusCode": 200
}
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"journeyName": "POST /api/telemetry/v2/clusters/_stats - no cache",
"scalabilitySetup": {
"responseTimeThreshold": {
"threshold1": 1000,
"threshold2": 3000,
"threshold3": 5000
},
"warmup": [
{
"action": "constantUsersPerSec",
"userCount": 1,
"duration": "30s"
}
],
"test": [
{
"action": "rampUsersPerSec",
"minUsersCount": 1,
"maxUsersCount": 10,
"duration": "120s"
}
],
"maxDuration": "5m"
},
"testData": {
"esArchives": [],
"kbnArchives": []
},
"streams": [
{
"requests": [
{
"http": {
"method": "POST",
"path": "/api/telemetry/v2/clusters/_stats",
"body": "{ \"refreshCache\": true }",
"headers": {
"Cookie": "",
"Kbn-Version": "",
"Accept-Encoding": "gzip, deflate, br",
"Content-Type": "application/json"
},
"statusCode": 200
}
}
]
}
]
}
Loading