Bug 2174596

Summary: Can we have mod_file_cache now please?
Product: Red Hat Enterprise Linux 9 Reporter: Tim Bielawa <tbielawa>
Component: httpdAssignee: Joe Orton <jorton>
Status: CLOSED NOTABUG QA Contact: rhel-cs-infra-services-qe <rhel-cs-infra-services-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: jorton, luhliari
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-03-02 11:35:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tim Bielawa 2023-03-01 22:43:46 UTC
Description of problem:
mod_file_cache Is not available in httpd on RHEL 9.

I am aware of the RHEL 6 change in which that module, and a few others, were no longer supported [0]. If I had to guess, it would be that the module was dropped because it was labeled as experimental.

However, as was indicated in httpd-2.2:

> As of Apache HTTP server version 2.2 mod_cache and mod_file_cache are no longer
> marked experimental and are considered suitable for production use. These caching
> architectures provide a powerful means to accelerate HTTP handling, both as an
> origin webserver and as a proxy.

I would very much like to take advantage of this powerful means to accelerate my HTTP handling. I see that mod_cache has been enabled, what is blocking mod_file_cache?

Version-Release number of selected component (if applicable):
> [root@certs2 httpd]# rpm -q httpd
> httpd-2.4.53-7.el9_1.1.x86_64
> 
> [root@certs2 httpd]# cat /etc/redhat-release 
> Red Hat Enterprise Linux release 9.1 (Plow)

How reproducible:
Always

Steps to Reproduce:
1. Add
> LoadModule file_cache_module modules/mod_file_cache.so
Into an httpd config file, restart the service

Actual results:
> httpd: Syntax error on line 61 of /etc/httpd/conf/httpd.conf: Syntax error on line
> 1 of /etc/httpd/conf.modules.d/1337-file_cache.conf: Cannot load
> modules/mod_file_cache.so into server: /etc/httpd/modules/mod_file_cache.so:
> cannot open shared object file: No such file or directory

Additionally, I verified that the file_cache module is not in /usr/lib64/httpd/modules or anywhere else in the package.

Expected results:
mod_file_cache is loaded and serves content cached using the MMapFile directive.

Additional info:

[0] https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/migration_planning_guide/sect-migration_guide-networking-apache#doc-wrapper
[1] https://httpd.apache.org/docs/2.2/caching.html

Comment 1 Joe Orton 2023-03-02 11:35:28 UTC
I'm not aware that mod_file_cache has any measurable performance benefit on Linux systems, IIRC it was developed for Windows where caching file handles does help, and possibly was useful on something like AIX in the past too. On Linux files will be delivered via mmap() or sendfile() as appropriate anyway.

A convincing benchmark where mod_file_cache is shown to improve system performance could lead us to reconsider this, but in the absence of that it looks like additional complexity to support with no functional advantage for users. AFAIK we have had no customer requests for this module.