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

Profiling Example 1 Query: how could we be faster? #2372

Closed
edeutsch opened this issue Sep 11, 2024 · 2 comments
Closed

Profiling Example 1 Query: how could we be faster? #2372

edeutsch opened this issue Sep 11, 2024 · 2 comments

Comments

@edeutsch
Copy link
Collaborator

edeutsch commented Sep 11, 2024

Hi everyone, I just put in a little effort profiling a run of Example 1 through ARAX. This is just once instance of course
https://arax.ci.transltr.io/?r=293759

Here's my analysis:

0.15s Launch, setup, and start launching queries to KPs and begin waiting for responses. wow, fast!
------- 0.3s since KP request: MolePro responds already!
------- 0.8s since KP request: RTX-KG2 responds, nice!
----- <1.0s 8 other KPs are queried and respond with no edges, but do so in less than a second
------- 6.5s since KP request: Service Provider lumbers across the finish line panting heavily
------- 24.5s since KP request: SPOKE finally limps across the finish line
0.5s Add NGD edges to the graph
0.6s Remove general concepts from the knowledge graph
<0.1s Other steps like Resultify seem negligible
0.3s Writing the Response to the S3 bucket

26.6s: Total processing time from receipt to begin streaming Response
24.5s: Time spent waiting for KPs to respond: MolePro, RTX-KG2 are sub-second. Service provider slowish. SPOKE a turtle
2.1s: Other processing of data

Two local processing steps appear to stand out:

  1. Computing NGD edges. 0.5 seconds seems pretty reasonable, but could it be 0.05 seconds?
  2. Removing general concepts: 0.6 second is okay, but this seems like our slowest general processing step. Could this be 0.06 seconds?

Conclusion: How could we be faster?

  1. We could timeout our KPs faster. I think I overheard that Aragorn times out their KPs at 10s
  2. We could remove general concepts faster? My sense is that that could be a lot faster, knowing nothing about what's actually happening here.
  3. We could cache the whole initial query. If this same exact query has been done before very recently, why do it again?
  4. We could cache KP queries/results. If we sent an exact same query to a KP very recently, why do it again?
@isbluis
Copy link
Member

isbluis commented Sep 12, 2024

I will add that some of these KPs are not responding well, and seem to take a long time (30-60 sec) to return an error.
See issues:
NCATSTranslator/Feedback#946
NCATSTranslator/Feedback#947
NCATSTranslator/Feedback#948

@edeutsch
Copy link
Collaborator Author

Closing this after spawning issue #2388
and #2374

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