apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pane <bp...@pacbell.net>
Subject call for votes: preventing mmap of file buckets
Date Tue, 07 May 2002 01:34:15 GMT
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



Mime
View raw message