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

Cache /api/-/search results #542

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

amvanbaren
Copy link
Contributor

@amvanbaren amvanbaren commented Oct 3, 2022

Testing steps

  • Check out master
  • Download a bunch of extensions in a directory (the more the better)
  • Configure extensionDir in src/gatling/resources/application.properties
  • Add super_token to access-tokens.csv
  • Start the server: ./gradlew runServer
  • Run src/gatling/scripts/fill-database.sh
  • Wait for the server to process all publish background jobs
  • Run ./gradlew --rerun-tasks gatlingRun-org.eclipse.openvsx.RegistryAPISearchSimulation
  • Checkout this PR
  • Again run ./gradlew --rerun-tasks gatlingRun-org.eclipse.openvsx.RegistryAPISearchSimulation

Performance Comparison

== MASTER f956110 3 RUNS ===============================================================
---- Global Information --------------------------------------------------------
> request count                                       5000 (OK=5000   KO=0     )
> min response time                                      4 (OK=4      KO=-     )
> max response time                                   2193 (OK=2193   KO=-     )
> mean response time                                    57 (OK=57     KO=-     )
> std deviation                                        106 (OK=106    KO=-     )
> response time 50th percentile                         20 (OK=20     KO=-     )
> response time 75th percentile                         39 (OK=39     KO=-     )
> response time 95th percentile                        342 (OK=342    KO=-     )
> response time 99th percentile                        446 (OK=446    KO=-     )
> mean requests/sec                                 83.333 (OK=83.333 KO=-     )
---- Response Time Distribution ------------------------------------------------
> t < 800 ms                                          4997 (100%)
> 800 ms < t < 1200 ms                                   1 (  0%)
> t > 1200 ms                                            2 (  0%)
> failed                                                 0 (  0%)
================================================================================
== NEW 1 RUN ===================================================================
---- Global Information --------------------------------------------------------
> request count                                       5000 (OK=5000   KO=0     )
> min response time                                      4 (OK=4      KO=-     )
> max response time                                   6210 (OK=6210   KO=-     )
> mean response time                                    44 (OK=44     KO=-     )
> std deviation                                        178 (OK=178    KO=-     )
> response time 50th percentile                         20 (OK=20     KO=-     )
> response time 75th percentile                         39 (OK=39     KO=-     )
> response time 95th percentile                        114 (OK=114    KO=-     )
> response time 99th percentile                        350 (OK=350    KO=-     )
> mean requests/sec                                104.167 (OK=104.167 KO=-     )
---- Response Time Distribution ------------------------------------------------
> t < 800 ms                                          4983 (100%)
> 800 ms < t < 1200 ms                                   3 (  0%)
> t > 1200 ms                                           14 (  0%)
> failed                                                 0 (  0%)
================================================================================
== NEW 3 RUNS ==================================================================
---- Global Information --------------------------------------------------------
> request count                                       5000 (OK=5000   KO=0     )
> min response time                                      3 (OK=3      KO=-     )
> max response time                                    407 (OK=407    KO=-     )
> mean response time                                    18 (OK=18     KO=-     )
> std deviation                                         25 (OK=25     KO=-     )
> response time 50th percentile                         11 (OK=11     KO=-     )
> response time 75th percentile                         17 (OK=17     KO=-     )
> response time 95th percentile                         53 (OK=53     KO=-     )
> response time 99th percentile                        139 (OK=139    KO=-     )
> mean requests/sec                                    250 (OK=250    KO=-     )
---- Response Time Distribution ------------------------------------------------
> t < 800 ms                                          5000 (100%)
> 800 ms < t < 1200 ms                                   0 (  0%)
> t > 1200 ms                                            0 (  0%)
> failed                                                 0 (  0%)
================================================================================

@amvanbaren amvanbaren self-assigned this Oct 3, 2022
@filiptronicek
Copy link
Member

@amvanbaren could you please share what you used to get this benchmark so I could try to reproduce? 🙏

@amvanbaren
Copy link
Contributor Author

@amvanbaren could you please share what you used to get this benchmark so I could try to reproduce? 🙏

@filiptronicek I've updated the PR with testing steps.

@filiptronicek
Copy link
Member

Made a script for downloading a lot of extensions: https://gist.github.com/filiptronicek/fdfc009371401b9d63716759a90887f4 (should be easily tweak-able for changing download amount as well as output directory).

@kineticsquid
Copy link
Contributor

@amvanbaren is there a separate issue to go along with this PR? Priority?

@amvanbaren
Copy link
Contributor Author

Issue #379 comes close. I've added a priority.

@amvanbaren amvanbaren force-pushed the feature/cache-search-results branch 2 times, most recently from 11d525a to dc4d7e8 Compare March 16, 2023 12:48
@amvanbaren
Copy link
Contributor Author

I've tested this on staging. It looks like the load balancer is doing the heavy lifting, because the results are more or less the same. It can still be useful for #670 though.

== CURRENT =====================================================================
---- Global Information --------------------------------------------------------
> request count                                       5000 (OK=4244   KO=756   )
> min response time                                    141 (OK=141    KO=144   )
> max response time                                   1507 (OK=1507   KO=502   )
> mean response time                                   175 (OK=178    KO=161   )
> std deviation                                         97 (OK=104    KO=37    )
> response time 50th percentile                        150 (OK=150    KO=155   )
> response time 75th percentile                        157 (OK=156    KO=162   )
> response time 95th percentile                        305 (OK=312    KO=176   )
> response time 99th percentile                        627 (OK=734    KO=459   )
> mean requests/sec                                 27.933 (OK=23.709 KO=4.223 )
---- Response Time Distribution ------------------------------------------------
> t < 800 ms                                          4221 ( 84%)
> 800 ms < t < 1200 ms                                  22 (  0%)
> t > 1200 ms                                            1 (  0%)
> failed                                               756 ( 15%)
---- Errors --------------------------------------------------------------------
> status.find.in(200,201,202,203,204,205,206,207,208,209,304), f    581 (76,85%)
ound 400
> status.find.in(200,201,202,203,204,205,206,207,208,209,304), f    175 (23,15%)
ound 429
================================================================================
== SEARCH CACHE ================================================================
---- Global Information --------------------------------------------------------
> request count                                       5000 (OK=4244   KO=756   )
> min response time                                    142 (OK=142    KO=144   )
> max response time                                   1962 (OK=1962   KO=611   )
> mean response time                                   184 (OK=188    KO=158   )
> std deviation                                        128 (OK=138    KO=35    )
> response time 50th percentile                        150 (OK=149    KO=152   )
> response time 75th percentile                        156 (OK=155    KO=159   )
> response time 95th percentile                        448 (OK=456    KO=172   )
> response time 99th percentile                        761 (OK=870    KO=308   )
> mean requests/sec                                 26.738 (OK=22.695 KO=4.043 )
---- Response Time Distribution ------------------------------------------------
> t < 800 ms                                          4197 ( 84%)
> 800 ms < t < 1200 ms                                  37 (  1%)
> t > 1200 ms                                           10 (  0%)
> failed                                               756 ( 15%)
---- Errors --------------------------------------------------------------------
> status.find.in(200,201,202,203,204,205,206,207,208,209,304), f    568 (75,13%)
ound 400
> status.find.in(200,201,202,203,204,205,206,207,208,209,304), f    188 (24,87%)
ound 429
================================================================================

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

3 participants