[ 
https://issues.apache.org/jira/browse/ARROW-8774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17105524#comment-17105524
 ] 

Adam Lippai edited comment on ARROW-8774 at 5/12/20, 3:29 PM:
--------------------------------------------------------------

A thing to consider on the long run (but a single default threadpool now helps 
a lot!):
 For an optimal result reading files should have less priority than the 
computation part later.

This is what I've found on the topic: 
[https://users.rust-lang.org/t/dealing-with-work-priority-and-rayon/30954/2]

Rayon doesn't support setting priority for the tasks, but as a workaround we 
could create two threadpools, eg one with <=10 threads for file reading and 
CPU_NUM threads for the computation. If you need fine tuning the workload (S3, 
HDFS, NFS behave differently, local HDD or SSD is a different topic too) you 
could either configure the threadpool sizes (even down to 1 thread) or setting 
"nice" for the threadpool threads.

Should I add this to the design doc or is this out of scope for a while?


was (Author: alippai):
A thing to consider on the long run (but a single default threadpool now helps 
a lot!):
For an optimal result reading files should have less priority than the 
computation part later.

This is what I've found on the topic: 
[https://users.rust-lang.org/t/dealing-with-work-priority-and-rayon/30954/2]

Rayon doesn't support setting priority for the tasks, but as a workaround we 
could create two threadpools, eg one with <=10 threads for file reading and 
CPU_NUM threads for the computation. If you need fine tuning the workload (S3, 
HDFS, NFS behave differently, local HDD or SSD is a different topic too) you 
could either configure the threadpool sizes (even down to 1 thread) or setting 
"nice" for the threadpool threads.

> [Rust] [DataFusion] Improve threading model
> -------------------------------------------
>
>                 Key: ARROW-8774
>                 URL: https://issues.apache.org/jira/browse/ARROW-8774
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Rust, Rust - DataFusion
>            Reporter: Andy Grove
>            Assignee: Andy Grove
>            Priority: Major
>             Fix For: 1.0.0
>
>
> DataFusion currently spawns one thread per partition and this results in poor 
> performance if there are more partitions than available cores/threads. It 
> would be better to have a thread-pool that defaults to number of available 
> cores.
> Here is a Google doc where we can collaborate on a design discussion.
> https://docs.google.com/document/d/1_wc6diy3YrRgEIhVIGzrO5AK8yhwfjWlmKtGnvbsrrY/edit?usp=sharing



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to