[Zope] WHY ? -- Performace in serving large media files from ZODB vs from external file system

Toby Dickenson tdickenson@geminidataloggers.com
Fri, 06 Jul 2001 10:20:12 +0100


On Thu, 5 Jul 2001 11:46:37 +0300, "Sedat Yilmazer" <sedat@kibele.com>
wrote:

>Hi Zopers
>
>In the performance for large image files discussion Dieter Wrote
>
>> Both will be quite slow when servered by ZServer.
>What could be the reason for being "slow". Since the files are large, =
the setup time can be ignored ( time to locate the object) Once the =
object is found only thing that remains is the reading the file from DB (=
 should be a plain read) and push it to the connection. I do not see a =
reason for beeing slow on the db read once the data is located inside the=
 DB.=20
>Data may or may not be in a continuous block as in the file system. I =
see no code / decode or copmress/decompress in the process. So why should=
 the ZServer be slow? Do I miss something here?
>IMHO moving some stuff from zope for minimal performance reasons breaks =
zope OOWEB idea!

The policy used by the default File and Image classes for large
content is to spool the content from ZODB into a temporary file as
quickly as possible, allowing ZServer to trickle data back to the
client as quickly as the client will allow.

This policy is a good one, but by itself is not as quick as serving a
flat file from a convential http server.

The best of both worlds is to sit Zope behind a caching proxy (I favor
squid), so that Zope is not involved with most requests for big files.

I hope this helps,


Toby Dickenson
tdickenson@geminidataloggers.com