Skip to content

Control size of AwsEventLoop thread pool #2195

@adamrboxall

Description

@adamrboxall

Hi, I wonder if anyone can help with a configuration question around the AwsEventLoop thread pool associated with a TileDB context. It seems the size of this thread pool defaults to the number of physical cores on the machine (is this the case?), however in a multi-processing scenario and a HPC environment this can lead to a very large number of threads.

How can I configure the size of this thread pool, to reduce the number of threads?

Thanks very much!


Reproducible example:

(.venv) $ OMP_NUM_THREADS=1 python 
Python 3.10.12 (main, Feb  4 2025, 14:57:36) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tiledb
>>> ctx = tiledb.default_ctx({"sm.io_concurrency_level": 1, "sm.compute_concurrency_level": 1})

Resulting threads on a machine with 32 physical cores:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions