Bug 61927 - Excessive sendfile() calls
Summary: Excessive sendfile() calls
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Core (show other bugs)
Version: 2.4.27
Hardware: PC FreeBSD
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
Depends on:
Reported: 2017-12-25 12:11 UTC by Alex Gacovski
Modified: 2018-02-12 13:36 UTC (History)
1 user (show)

Truss output from apache process. (330.79 KB, image/png)
2017-12-25 12:11 UTC, Alex Gacovski

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Gacovski 2017-12-25 12:11:44 UTC
Created attachment 35628 [details]
Truss output from apache process.

When apache attempts to send a file using the sendfile() syscall and the socket buffer is full, apache does not wait for the socket buffer to be ready for writing but will constantly call sendfile() causing high cpu usage.

OS: FreeBSD 11.1-RELEASE x64.
HTTPD: Apache 2.4.27 from precompiled freebsd fresh ports.
MPM: Prefork.