ocadaruma opened a new pull request, #14289:
URL: https://github.com/apache/kafka/pull/14289

   - JIRA ticket: https://issues.apache.org/jira/browse/KAFKA-7504
   - This is a long standing issue in current Kafka architecture that calling 
`FileChannel.transferTo` (which calls sendfile syscall in Linux) in network 
threads for zero-copy file sending
     * When a file about to be sent is not on OS page cache, sendfile call will 
block and potentially disturbing all other requests/responses multiplexed on 
same socket, ended up with significant performance degradation
   - This PR adds a logic to warm-up page cache on request handler threads to 
make sure the file can be served from cache when calling sendfile on network 
threads
     * This is done by calling sendfile with setting destination to `/dev/null`
   - FYI: This patch is running in our production Kafka clusters for years 
without problems
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
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: jira-unsubscr...@kafka.apache.org

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

Reply via email to