Skip to content

Conversation

pjonsson
Copy link
Contributor

@pjonsson pjonsson commented Sep 7, 2025

Detect the number of cores in the machine,
but cap the default value to 16.

Cap only applies to the default value, so
if a user specifies --jobs 48, they will
get 48 workers.


📚 Documentation preview 📚: https://datacube-explorer--844.org.readthedocs.build/en/844/

Detect the number of cores in the machine,
but cap the default value to 16.

Cap only applies to the default value, so
if a user specifies --jobs 48, they will
get 48 workers.
Copy link

codecov bot commented Sep 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.36%. Comparing base (5737151) to head (cf6246b).
⚠️ Report is 16 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #844   +/-   ##
========================================
  Coverage    84.36%   84.36%           
========================================
  Files           35       35           
  Lines         4253     4254    +1     
  Branches       537      537           
========================================
+ Hits          3588     3589    +1     
  Misses         469      469           
  Partials       196      196           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@omad omad left a comment

Choose a reason for hiding this comment

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

I like the idea of setting this automatically, but unfortunately this isn't a suitable way of doing it.

  • The number of concurrent processes is limited by the database server, which is very often not on the same machine as the python process.
  • CPU Scheduler Affinity is a rarely used mechanism for restricting a process to one or more specific CPU cores, which is different from how much CPU time a process can use. If we did need to know how much processor time we could use in this process we'd want to use either https://docs.python.org/3.13/library/os.html#os.process_cpu_count (Python 3.13+ only) or dask.system.cpu_count

@omad omad closed this Sep 7, 2025
@pjonsson pjonsson deleted the autodetect-cores branch September 8, 2025 07:43
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.

2 participants