Andreas Volz wrote:
Am Tue, 13 Nov 2007 15:15:49 -0600 schrieb John Stanton:

You might find the method used by Squid to manage its cache would be worth emulating.

I don't know how squid works. Could you explain it in simple steps?

I haven't looked at the code, but it builds a tree of directories so that no directory is excessively loaded. You can download the source and take a look.

Using TransmitFile on Windows or sendfile on Unix to despatch the
file to the network is by far the most efficient way to pass on files
from a cache.  It avoids a number of levels of buffer shadowing.

Hm, I looked into the manpage. I get the webpage with curl direct into
memory or into a file. I don't copy files later on harddisk. I would
assume curl does it the most effective way available.

Sendfile and TransmitFile basically post the file direct to the network interface without going through multiple layers of intermediate buffering as happens if you use send.

I find using that interface in a web server results in very low overhead and consequently a large traffic handling ability.

regards
Andreas

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------



-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to