[
https://issues.apache.org/jira/browse/IMPALA-13478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17942250#comment-17942250
]
Joe McDonnell commented on IMPALA-13478:
----------------------------------------
The tuple cache can write at very fast rates. If this rate is faster than the
speed of the disk, dirty buffers will accumulate. On Linux, as this gets to the
dirty_background_ratio (% of memory, default is often 10), the OS starts to
flush to disk itself. When this reaches dirty_ratio (% of memory, default is
often 20), it switches to synchronous writes and this will throttle query
execution. This can spill over to writes that are not for the tuple cache, so
it can slow down unrelated things.
The solution to this needs to involve backpressure that avoids writing too
quickly for the underlying disk and reaching the dirty_ratio. It is better to
skip writing a cache entry rather than slow down the query. One way to do this
is to track the amount of in-progress writes and keep it under a certain limit
that is below the dirty_ratio.
> Don't sync tuple cache file contents to disk immediately
> --------------------------------------------------------
>
> Key: IMPALA-13478
> URL: https://issues.apache.org/jira/browse/IMPALA-13478
> Project: IMPALA
> Issue Type: Task
> Components: Backend
> Affects Versions: Impala 4.5.0
> Reporter: Joe McDonnell
> Assignee: Joe McDonnell
> Priority: Major
>
> Currently, the tuple cache file writer syncs the file contents to disk before
> closing the file. This slows down the write path considerably, especially if
> disks are slow. This should be moved off of the fast path and done
> asynchronously. As a first step, this can remove the sync call and close the
> file without syncing. Other readers are still able to access it, and the
> kernel will flush the buffers as needed.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]