pitrou opened a new issue, #45860:
URL: https://github.com/apache/arrow/issues/45860

   ### Describe the enhancement requested
   
   When using something like `taskset` to reduce the number of CPUs actually 
usable by the current process, Arrow C++ should also limit its number of CPU 
threads to avoid thread oversubscription:
   
   Compare with what Python does:
   
   ```console
   $ ipython
   >>> import os
   >>> os.process_cpu_count()
   24
   >>> from multiprocessing.pool import ThreadPool
   >>> pool = ThreadPool()
   >>> pool._processes
   24
   >>> import pyarrow as pa
   >>> pa.cpu_count()
   24
   
   $ taskset -c 1,2,3 ipython
   >>> import os
   >>> os.process_cpu_count()
   3
   >>> from multiprocessing.pool import ThreadPool
   >>> pool = ThreadPool()
   >>> pool._processes
   3
   >>> import pyarrow as pa
   >>> pa.cpu_count()
   24
   ```
   
   
   ### Component(s)
   
   C++


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to