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

PE-4903 - parallel unbundling #65

Merged
merged 3 commits into from
Nov 30, 2023
Merged

Conversation

djwhitt
Copy link
Collaborator

@djwhitt djwhitt commented Nov 28, 2023

Adds worker threads to the Ans104Parser implemented in a similar fashion to the SQLite workers. There is a fixed size worker pool. Each worker takes work as it becomes available, processes it, and then repeats. Callers block until work is complete. The number of workers defaults to 2 but is configurable via the ANS104_UNBUNDLE_WORKERS environment variable. Along with this change, The number of data item indexing workers is increased from 1 to 2 to help ensure that communication round tip latency between the main thread the DB threads is not the bottleneck for data item indexing.

This allows users adjust the nodejs GC max old gen size. This can help
avoid out of memory crashes when running a lot of workers to process
GraphQL queries or do unbundling. This also raises the default to 2GB
from 512MB.
Defaulting to the number of CPU cores is fine until you have 128 cores.
Then you run out of memory. :) This limits the max SQLite GQL workers to
12 with the number of CPU cores as the default below 12. In the future
we may make this configurable.
Adds worker threads to the Ans104Parser implemented in a similar fashion
to the SQLite workers. There is a fixed size worker pool. Each worker
takes work as it becomes available, processes it, and then repeats.
Callers block until work is complete. The number of workers defaults to
2 but is configurable via the ANS104_UNBUNDLE_WORKERS environment
variable. Along with this change, The number of data item indexing
workers is increased from 1 to 2 to help ensure that communication round
tip latency between the main thread the DB threads is not the bottleneck
for data item indexing.
Copy link

codecov bot commented Nov 28, 2023

Codecov Report

Attention: 154 lines in your changes are missing coverage. Please review.

Comparison is base (d81bc52) 57.72% compared to head (d7a3c1f) 57.26%.

Files Patch % Lines
src/lib/ans-104.ts 3.14% 154 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #65      +/-   ##
===========================================
- Coverage    57.72%   57.26%   -0.47%     
===========================================
  Files           18       18              
  Lines         5280     5335      +55     
  Branches       260      260              
===========================================
+ Hits          3048     3055       +7     
- Misses        2228     2276      +48     
  Partials         4        4              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@djwhitt djwhitt merged commit 811c31f into develop Nov 30, 2023
5 of 7 checks passed
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.

1 participant