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

Memory consumption and number of threads created #259

Open
germannocr opened this issue Jul 17, 2020 · 1 comment
Open

Memory consumption and number of threads created #259

germannocr opened this issue Jul 17, 2020 · 1 comment

Comments

@germannocr
Copy link

I am currently part of a team that develops a Python Rest API and uses Aerospike as a caching feature. However, its initialization has significantly increased the memory consumption and the number of threads, without any processing having been done. Only on startup does the number of threads increase from 2 to 18. Does this make sense? Is there any configuration that allows me to define how many threads will be used? My startup and client connection is correct according to the official documentation.

@dwelch-spike
Copy link
Contributor

dwelch-spike commented Jul 17, 2020

Hi @germannocr ,

The Python client uses a thread pool in order to send synchronous batch, scan, and query requests to multiple server nodes in parallel threads. The default thread count is 16, it can be configured upon client creation using the thread_pool_size config. You can actually set this to 0 if all node commands are sent sequentially. That means making sure all scans do not set the concurrent policy to true. Same for batch request's concurrent policy. Queries are always run concurrently so they cannot be used with a thread_pool_size of 0.

Thanks for posting and I hope this helps. :)

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