logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Question on the open_entity function in mod_disk_cache.c
Author
Anirudh



Joined: 23 Oct 2011
Posts: 1

PostPosted: Tue 25 Oct '11 9:21    Post subject: Question on the open_entity function in mod_disk_cache.c Reply with quote

Hello,

This question could be really stupid but is there any reason as to why we call the apr_file_open without the APR_XTHREAD flag (in the open_entity function when the headers file is opened).

On the other hand, when the data file is opened, the APR_SENDFILE_ENABLED is being passed and there is a check in open.c in the APR library based on which the XTHREADS flag is set.

if (flag & APR_FOPEN_SENDFILE_ENABLED) {
/* This feature is required to enable sendfile operations
* against the file on Win32. Also implies APR_FOPEN_XTHREAD.
*/
flag |= APR_FOPEN_XTHREAD;
attributes |= FILE_FLAG_SEQUENTIAL_SCAN | FILE_FLAG_OVERLAPPED;
}

Also, has anyone ever seen a delay in the apr_open_file that is called to open an existing header in mod_disk_cache.c?

Thank you,
Anirudh
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Fri 28 Oct '11 17:07    Post subject: Reply with quote

I'm not a c programer, but from my experience send file is not the best solution on windows. I had better results by disabling it when sending static files. Maybe that is a hint into some direction for you. My Advise is to ask the guys on the apr dev mailing list.

http://apr.apache.org/mailing-lists.html
Back to top


Reply to topic   Topic: Question on the open_entity function in mod_disk_cache.c View previous topic :: View next topic
Post new topic   Forum Index -> Apache