[Tickets #5913] Re: Lower memory usage while downloading files

bugs at bugs.horde.org bugs at bugs.horde.org
Sun Nov 25 22:35:40 UTC 2007


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=5913
-----------------------------------------------------------------------
 Ticket             | 5913
 Updated By         | olger.diekstra at cardno.com.au
 Summary            | Lower memory usage while downloading files
 Queue              | Gollem
 Version            | HEAD
 Type               | Enhancement
 State              | New
 Priority           | 2. Medium
 Owners             | 
-----------------------------------------------------------------------


olger.diekstra at cardno.com.au (2007-11-25 14:35) wrote:

Hi Guys,

>> Looking at the sort of files that are being stored in Gollem (and 
>> the same goes for
>> attachments as well), those wouldn't dynamically change size.
>
> I'm not sure what dynamically changing size would have to do with this.

That was a comment on Chuck's remark about often not reading static
files.

But, it's really not that hard (from my point of view). Right now, (it
would appear anyhows) the entire file is read into memory, from whatever
source (DB, ftp, smb, etc). Causing memory problems with large files.
As opposed to reading the file into RAM, why not copy it to local disk and
then sending it to the client in chuncks, saving heaps on memory.
The downside of having to use so much memory is that your webserver will
start swapping to disk sooner. In general, clients sit on connections that
are way slower than average disks can read, so speed is not an issue here.
A one GB RAM server will happily serve hundreds of people a 250MB file
when this is done in chuncks, whereas it'll choke on 2 users if those files
are read into memory first. 

BTW, I live in Australia, so you might not get quick responses when you
guys are half way through the day... :-)

Cheers! Olger.



More information about the bugs mailing list