You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Brian Pane <bp...@pacbell.net> on 2002/05/07 03:34:15 UTC
call for votes: preventing mmap of file buckets
For performance reasons, it's sometimes preferable to read a file
instead of mmap'ing it. Read scales better on some multiprocessor
systems, for example, and read appears to require fewer NFS ops than
mmap if the file is on an NFS-mounted filesystem.
Here's my proposal for changing the httpd and apr-util to support
run-time selection of mmap:
apr-util changes:
- Add "apr_bucket_file_allow_mmap(int)" to allow apps to enable or
disable mmap on a per-file basis. (Default is to allow mmap,for
backward compatibility.)
httpd changes:
- Add a new config directive "EnableMMAP (on|off)", default=on.
- In the core handler, after creating a file bucket, call
apr_bucket_file_allow_mmap(false) if mmap has been disabled for this
dir.
--Brian