From: Enrico Weigelt <weigelt@metux.de>
To: pgsql-performance@postgresql.org
Subject: Re: BLOB's bypassing the OS Filesystem for better Image loading speed?
Date: Thu, 12 May 2005 01:26:23 +0200
Message-ID: <20050511232623.GE6485@nibiru.borg.metux.de> (raw)
In-Reply-To: <426DFA46.8090402@yahoo.de>
References: <426DFA46.8090402@yahoo.de>
* apoc9009@yahoo.de <apoc9009@yahoo.de> wrote:
Hi,
> My next queststion is dedicated to blobs in my Webapplication (using
> Tomcat 5 and JDBC
> integrated a the J2EE Appserver JBoss).
>
> Filesystems with many Filesystem Objects can slow down the Performance
> at opening and reading Data.
As others already pointed out, you probably meant: overcrowded
directories can make some filesystems slow. For ext2 this is the case.
Instead reiserfs is designed to handle very large directories
(in fact by using similar indices like an database does).
If your application is an typical web app your will probably have
the situation:
+ images get read quite often, while they get updated quite seldom.
+ you dont want to use image content in quries (ie. match against it)
+ the images will be transfered directly, without further processing
+ you can give the upload and the download-server access to a shared
filesystem or synchronize their filesystems (ie rsync)
Under this assumptions, I'd suggest directly using the filesystem.
This should save some load, ie.
+ no transfer from postgres -> webserver and further processing
(server side application) necessary, the webserver can directly
fetch files from filesystem
+ no further processing (server side application) necessary
+ backup and synchronization is quite trivial (good old fs tools)
+ clustering (using many image webservers) is quite trivial
Already mentioned that you've got to choose the right filesystem or
at least the right fs organization (ie. working with a n-level hierachy
to keep directory sizes small and lookups fast).
An RDBMS can do this for you and so will save some implementation work,
but I don't think it will be noticably faster than an good fs-side
implementation.
Of course there may be a lot of good reasons to put images into the
database, ie. if some clients directly work on db connections and
all work (including image upload) should be done over the db link.
cu
--
---------------------------------------------------------------------
Enrico Weigelt == metux IT service
phone: +49 36207 519931 www: http://www.metux.de/
fax: +49 36207 519932 email: contact@metux.de
---------------------------------------------------------------------
Realtime Forex/Stock Exchange trading powered by postgresSQL :))
http://www.fxignal.net/
---------------------------------------------------------------------
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: weigelt@metux.de
Subject: Re: BLOB's bypassing the OS Filesystem for better Image loading speed?
In-Reply-To: <20050511232623.GE6485@nibiru.borg.metux.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox