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

select_object optimizations #3810

Merged
merged 11 commits into from
Sep 22, 2023
Merged

select_object optimizations #3810

merged 11 commits into from
Sep 22, 2023

Conversation

Geal
Copy link
Contributor

@Geal Geal commented Sep 12, 2023

Small optimizations when selecting entity types and keys for federated queries

Checklist

Complete the checklist (and note appropriate exceptions) before a final PR is raised.

  • Changes are compatible[^1]
  • Documentation[^2] completed
  • Performance impact assessed and acceptable
  • Tests added and passing[^3]
    • Unit Tests
    • Integration Tests
    • Manual Tests

Exceptions

Note any exceptions here

Notes

[^1]. It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this.
[^2]. Configuration is an important part of many changes. Where applicable please try to document configuration examples.
[^3]. Tick whichever testing boxes are applicable. If you are adding Manual Tests:
- please document the manual testing (extensively) in the Exceptions.
- please raise a separate issue to automate the test and label it (or ask for it to be labeled) as manual test

@github-actions
Copy link
Contributor

@Geal, please consider creating a changeset entry in /.changesets/. These instructions describe the process and tooling.

@Geal Geal marked this pull request as draft September 12, 2023 15:39
@Geal Geal marked this pull request as ready for review September 12, 2023 15:46
@Geal
Copy link
Contributor Author

Geal commented Sep 12, 2023

perf test please

@Geal Geal marked this pull request as draft September 12, 2023 16:18
@Geal Geal marked this pull request as ready for review September 12, 2023 16:18
@router-perf
Copy link

router-perf bot commented Sep 12, 2023

CI performance tests

  • events_big_cap_high_rate - Stress test for events with a lot of users, deduplication enabled and high rate event with a big queue capacity
  • events_without_dedup - Stress test for events with a lot of users and deduplication DISABLED
  • events - Stress test for events with a lot of users and deduplication ENABLED
  • large-request - Stress test with a 1 MB request payload
  • step - Basic stress test that steps up the number of users over time
  • xlarge-request - Stress test with 10 MB request payload
  • reload - Reload test over a long period of time at a constant rate of users
  • no-graphos - Basic stress test, no GraphOS.
  • xxlarge-request - Stress test with 100 MB request payload
  • step-jemalloc-tuning - Clone of the basic stress test for jemalloc tuning
  • const - Basic stress test that runs with a constant number of users

@Geal
Copy link
Contributor Author

Geal commented Sep 13, 2023

The benchmark we use in CI has few entities but a lot of fields. Here I am testing with a lot of entities, so creating the representations for federated queries is heavier.

Router on dev (38be5e2), 2 cores, 200 clients:

Summary:
  Total:	30.2196 secs
  Slowest:	0.9184 secs
  Fastest:	0.0423 secs
  Average:	0.2310 secs
  Requests/sec:	862.7849
  

Response time histogram:
  0.042 [1]	|
  0.130 [223]	|■
  0.217 [11779]	|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  0.305 [12346]	|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  0.393 [1371]	|■■■■
  0.480 [94]	|
  0.568 [49]	|
  0.656 [40]	|
  0.743 [55]	|
  0.831 [29]	|
  0.918 [86]	|


Latency distribution:
  10% in 0.1787 secs
  25% in 0.1988 secs
  50% in 0.2209 secs
  75% in 0.2484 secs
  90% in 0.2856 secs
  95% in 0.3179 secs
  99% in 0.4792 secs

Details (average, fastest, slowest):
  DNS+dialup:	0.0002 secs, 0.0423 secs, 0.9184 secs
  DNS-lookup:	0.0002 secs, 0.0000 secs, 0.0871 secs
  req write:	0.0000 secs, 0.0000 secs, 0.0910 secs
  resp wait:	0.2304 secs, 0.0369 secs, 0.9180 secs
  resp read:	0.0001 secs, 0.0000 secs, 0.0164 secs

Status code distribution:
  [200]	26073 responses

This PR, 2 cores:


Summary:
  Total:	30.1998 secs
  Slowest:	0.4410 secs
  Fastest:	0.0681 secs
  Average:	0.2127 secs
  Requests/sec:	937.4899
  

Response time histogram:
  0.068 [1]	|
  0.105 [58]	|
  0.143 [454]	|■
  0.180 [3788]	|■■■■■■■■■■■■
  0.217 [12671]	|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  0.255 [8102]	|■■■■■■■■■■■■■■■■■■■■■■■■■■
  0.292 [2437]	|■■■■■■■■
  0.329 [627]	|■■
  0.366 [153]	|
  0.404 [17]	|
  0.441 [4]	|


Latency distribution:
  10% in 0.1727 secs
  25% in 0.1899 secs
  50% in 0.2090 secs
  75% in 0.2322 secs
  90% in 0.2585 secs
  95% in 0.2771 secs
  99% in 0.3186 secs

Details (average, fastest, slowest):
  DNS+dialup:	0.0002 secs, 0.0681 secs, 0.4410 secs
  DNS-lookup:	0.0002 secs, 0.0000 secs, 0.0664 secs
  req write:	0.0000 secs, 0.0000 secs, 0.0643 secs
  resp wait:	0.2122 secs, 0.0634 secs, 0.4409 secs
  resp read:	0.0001 secs, 0.0000 secs, 0.0283 secs

Status code distribution:
  [200]	28312 responses

@Geal Geal requested review from a team, BrynCooke, bnjjj and o0Ignition0o September 14, 2023 09:53
@Geal Geal merged commit 0ef2f36 into dev Sep 22, 2023
@Geal Geal deleted the geal/select-object-bytestring branch September 22, 2023 15:08
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

Successfully merging this pull request may close these issues.

3 participants