Re: Large File Download

2015-03-28 Thread Issac Goldstand
sendfile is much more efficient than that. At the most basic level, sendfile allows a file to be streamed directly from the block device (or OS cache) to the network, all in kernel-space (see sendfile(2)). What you describe below is less effective, since you need to ask the kernel to read the dat

Re: Large File Download

2015-03-28 Thread Randolf Richardson
> Randolf Richardson wrote: > >> I know that it's possible(and arguably best practice) to use Apache to > >> download large files efficiently and quickly, without passing them through > >> mod_perl. However, the data I need to download from my application is both > >> dynamically generated and sens

Re: Large File Download

2015-03-28 Thread Dr James Smith
You can effectively stream a file byte by byte - you just need to print a chunk at a time and mod_perl and apache will handle it appropriately... I do this all the time to handle large data downloads (the systems I manage are backed by peta bytes of data)... The art is often not in the output

Re: Large File Download

2015-03-28 Thread John Dunlap
sendfile sounds like its exactly what I'm looking for. I see it in the API documentation for Apache2::RequestIO but how do I get a reference to it from the reference to Apache2::RequestRec which is passed to my handler? On Sat, Mar 28, 2015 at 9:54 AM, Perrin Harkins wrote: > Yeah, sendfile() is

Re: Large File Download

2015-03-28 Thread Perrin Harkins
Yeah, sendfile() is how I've done this in the past, although I was using mod_perl 1.x for it. On Sat, Mar 28, 2015 at 5:55 AM, André Warnier wrote: > Randolf Richardson wrote: > >> I know that it's possible(and arguably best practice) to use Apache to >>> download large files efficiently and qui

Re: Large File Download

2015-03-28 Thread André Warnier
Randolf Richardson wrote: I know that it's possible(and arguably best practice) to use Apache to download large files efficiently and quickly, without passing them through mod_perl. However, the data I need to download from my application is both dynamically generated and sensitive so I cannot ex