pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedMultiple Postmasters on Beowulf cluster
5+ messages / 4 participants
[nested] [flat]
* Multiple Postmasters on Beowulf cluster
@ 2002-07-27 15:24 Jan Hartmann <jhart@frw.uva.nl>
2002-07-27 15:34 ` Re: Multiple Postmasters on Beowulf cluster Tom Lane <tgl@sss.pgh.pa.us>
2002-07-29 13:30 ` Re: Multiple Postmasters on Beowulf cluster Robert M. Meyer <rmeyer@installs.com>
0 siblings, 2 replies; 5+ messages in thread
From: Jan Hartmann @ 2002-07-27 15:24 UTC (permalink / raw)
To: pgsql-admin
Hello,
I am using Postgresql with PostGis and the Minnesota MapServer on a Beowulf
cluster for web-mapping applications. It runs fine on one node, producing
very fast interactive maps for an Apache/PHP web server. However, the
cluster consists of 45 nodes, all using a shared user file system. Is it
possible to start up a postmaster on every node, using the same database?
The backend processes themselves would be completely autonomous, but they
would have to share their data from the same source. To simplify things,
only read-access is necessary. Would this be possible, and if so, how can
the different postmasters be made to use a different postmaster.pid file
(which is located in the shared data directory)?
It would be an interesting way for using the cluster, as the individual map
layers can be independently constructed on different nodes, and only finally
have to be put together in a complete map. Essentially, MapServer constructs
a map from layers, where each layer originates from an individual PostgreSQL
connection, even when using only one database. In a cluster solution
therefore, no communication between the nodes would be required. Even the
data could be distributed over the nodes and put into different databases,
but this would inevitably lead to much duplication and a set of databases
that would be very difficult to administer. In the archives, I saw some
mention of work in progress on distributed databases, but for this I don't
need much in the way of distributed facilities, just reading shared data.
Any help would be very much appreciated. It certainly would be a great
example of PostgrSQL's advanced geometrical capabilities!
Jan Hartmann
Department of Geography
University of Amsterdam
jhart@frw.uva.nl
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Multiple Postmasters on Beowulf cluster
2002-07-27 15:24 Multiple Postmasters on Beowulf cluster Jan Hartmann <jhart@frw.uva.nl>
@ 2002-07-27 15:34 ` Tom Lane <tgl@sss.pgh.pa.us>
2002-07-28 20:01 ` Re: Multiple Postmasters on Beowulf cluster Paul Ramsey <pramsey@refractions.net>
2002-07-29 16:43 ` Re: Multiple Postmasters on Beowulf cluster Jan Hartmann <jhart@frw.uva.nl>
1 sibling, 2 replies; 5+ messages in thread
From: Tom Lane @ 2002-07-27 15:34 UTC (permalink / raw)
To: Jan Hartmann <jhart@frw.uva.nl>; +Cc: pgsql-admin
"Jan Hartmann" <jhart@frw.uva.nl> writes:
> cluster consists of 45 nodes, all using a shared user file system. Is it
> possible to start up a postmaster on every node, using the same database?
No.
> The backend processes themselves would be completely autonomous, but they
> would have to share their data from the same source. To simplify things,
> only read-access is necessary.
In that case, make 45 copies of the database ...
regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Multiple Postmasters on Beowulf cluster
2002-07-27 15:24 Multiple Postmasters on Beowulf cluster Jan Hartmann <jhart@frw.uva.nl>
2002-07-27 15:34 ` Re: Multiple Postmasters on Beowulf cluster Tom Lane <tgl@sss.pgh.pa.us>
@ 2002-07-28 20:01 ` Paul Ramsey <pramsey@refractions.net>
1 sibling, 0 replies; 5+ messages in thread
From: Paul Ramsey @ 2002-07-28 20:01 UTC (permalink / raw)
To: pgsql-admin; +Cc: jhart@frw.uva.nl; tgl@sss.pgh.pa.us
Completely aside from the database issues, mapserver would need some
heavy work to make all the layer processes "independent" and amenable to
beowulf-style parallelization. It is worth noting that layers are not
really all that independant from a display point of view. If you are
drawing lake polygons on top of jurisdiction polygons, for example, you
are first drawing all the jurisdictions into the end image, then drawing
all the lakes into that image. The process of creating the final visual
product is the result of sequential application of layers. Individually
rendering then serially combining the layers may or may not be more
efficient than simply serially rendering them, depending on the render
complexity of the layers.
A little work on multi-threading mapserver on the data-access side would
not hurt though, since reading from the source data files are completely
independant actions.
As far as parallelizing database reads, Tom can correct me, but
multi-processor database systems would help (one postmaster, many
postgres's). I wonder also if a Mosix system would work as a way of
using a cluster for database work? Having the database process working
on a network mounted datastore just can't be good mojo though...
P.
Tom Lane wrote:
>
> "Jan Hartmann" <jhart@frw.uva.nl> writes:
> > cluster consists of 45 nodes, all using a shared user file system. Is it
> > possible to start up a postmaster on every node, using the same database?
>
> No.
>
> > The backend processes themselves would be completely autonomous, but they
> > would have to share their data from the same source. To simplify things,
> > only read-access is necessary.
>
> In that case, make 45 copies of the database ...
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Multiple Postmasters on Beowulf cluster
2002-07-27 15:24 Multiple Postmasters on Beowulf cluster Jan Hartmann <jhart@frw.uva.nl>
2002-07-27 15:34 ` Re: Multiple Postmasters on Beowulf cluster Tom Lane <tgl@sss.pgh.pa.us>
@ 2002-07-29 16:43 ` Jan Hartmann <jhart@frw.uva.nl>
1 sibling, 0 replies; 5+ messages in thread
From: Jan Hartmann @ 2002-07-29 16:43 UTC (permalink / raw)
To: pgsql-admin
Thanks a lot for the reactions. I experimented a bit further with the
answers in mind and got the following result:
(Tom Lane)
> In that case, make 45 copies of the database ...
Without expecting much I created 3 data-directories and made symbolic links
from everything in the original data-directory, except postmaster.pid. Next
I started PostgreSQL on 3 nodes with PGDATA set to a different directory and
PGPORT to a different port. Surprisingly it worked! First startup gave a
message on each node about not having had a proper shutdown, but afterwards
everything ran ok from all servers, even restarting PostgreSQL. MapServer
didn't have a problem at all in producing a map from layers requested from
different nodes, although without any time gain (see next point). Probably
this gives PostgreSQL wizards the creeps and I wouldn't advise it to anyone,
but just for curiosity's sake, what dangers am I running (given that only
read access is needed).
(Paul Ramsey)
> It is worth noting that layers are not really all that independant from a
display
> point of view. (...) The process of creating the final visual product is
the
> result of sequential application of layers.
Yes, I didn't realise that MapServer waits until a layer has been returned
from PostgreSQL before starting with the next, essentially doing nothing in
the meantime. I thought it worked like a web browser retrieving images,
which is done asynchronously. It should work however when asking for
complete maps from different browser frames, or retrieving a map in one
frame and getting statistics for it in another, using separate PHP scripts
targeted at different nodes. This would already help me enormously.
(Bob Meyer)
> Since disk is typically the slowest part of
> any system, I would imagine that 45 nodes, all beating on one network
> file system (or a multiport filesystem for that matter) would tend to
> slow things down dramatically. I would think that it would be better to
> make 45 separate copies of the database and then if there are updates,
> make some kind of process to pass all of the transactions to each
> instantiation of the DB. Granted, the disk space would increase to 45X
> the original estimate. How much updating/changing goes on in the Db?
I am trying this out for population statistics in Dutch municipalities
within specified distances (1, 2, 5, 10, 25 km etc ) from the railway
network. Number of railway lines: 419 (each having numerous line segments),
#municipalites: 633, size of mun. map about 10M. It takes about 30 seconds
wall time to produce a map (good compared to desktop GIS-sytems, I have no
experience with Oracle Spatial). Next step would be using the roads network,
(much larger of course, but still in the range of tens of megabytes, perhaps
a hundred), and data from very diverse sources and years, including raster
bitmaps, all not excessively large. Lots of different buffers have to be put
around all kinds of selections (type roads, geographical selections) and
compared with each other. Last step is animating the results in Flash
movies: MapServer will be supporting Flash in the very near future, and I
already got some preliminary results. This will require even more
computations of intermediate results, to get flowing movies. So the problem
is not data access, it is computing power and administration of a very
disparate bunch of data. I certainly have enough computing power, and
probably also enough disk space for a 45 fold data reduplication, but I know
from experience how error prone this is, even with duplicating scripts. Even
so, unless I am very much mistaken, the MapServer-PostgreSQL-Beowulf
combinatation should offer some very interesting prospects in GIS.
Thanks for the answers
Jan
Jan Hartmann
Department of Geography
University of Amsterdam
jhart@frw.uva.nl
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Multiple Postmasters on Beowulf cluster
2002-07-27 15:24 Multiple Postmasters on Beowulf cluster Jan Hartmann <jhart@frw.uva.nl>
@ 2002-07-29 13:30 ` Robert M. Meyer <rmeyer@installs.com>
1 sibling, 0 replies; 5+ messages in thread
From: Robert M. Meyer @ 2002-07-29 13:30 UTC (permalink / raw)
To: Jan Hartmann <jhart@frw.uva.nl>; +Cc: pgsql-admin
Aside from the problems associated with making multiple Postgresql
processes access a single data store, wouldn't you be dealing with a
severe performance penalty? Since disk is typically the slowest part of
any system, I would imagine that 45 nodes, all beating on one network
file system (or a multiport filesystem for that matter) would tend to
slow things down dramatically. I would think that it would be better to
make 45 separate copies of the database and then if there are updates,
make some kind of process to pass all of the transactions to each
instantiation of the DB. Granted, the disk space would increase to 45X
the original estimate. How much updating/changing goes on in the Db?
Cheers!
Bob
On Sat, 2002-07-27 at 11:24, Jan Hartmann wrote:
> Hello,
>
> I am using Postgresql with PostGis and the Minnesota MapServer on a Beowulf
> cluster for web-mapping applications. It runs fine on one node, producing
> very fast interactive maps for an Apache/PHP web server. However, the
> cluster consists of 45 nodes, all using a shared user file system. Is it
> possible to start up a postmaster on every node, using the same database?
> The backend processes themselves would be completely autonomous, but they
> would have to share their data from the same source. To simplify things,
> only read-access is necessary. Would this be possible, and if so, how can
> the different postmasters be made to use a different postmaster.pid file
> (which is located in the shared data directory)?
>
> It would be an interesting way for using the cluster, as the individual map
> layers can be independently constructed on different nodes, and only finally
> have to be put together in a complete map. Essentially, MapServer constructs
> a map from layers, where each layer originates from an individual PostgreSQL
> connection, even when using only one database. In a cluster solution
> therefore, no communication between the nodes would be required. Even the
> data could be distributed over the nodes and put into different databases,
> but this would inevitably lead to much duplication and a set of databases
> that would be very difficult to administer. In the archives, I saw some
> mention of work in progress on distributed databases, but for this I don't
> need much in the way of distributed facilities, just reading shared data.
>
> Any help would be very much appreciated. It certainly would be a great
> example of PostgrSQL's advanced geometrical capabilities!
>
>
> Jan Hartmann
> Department of Geography
> University of Amsterdam
> jhart@frw.uva.nl
--
Robert M. Meyer
Sr. Network Administrator
DigiVision Satellite Services
14 Lafayette Sq, Ste 410
Buffalo, NY 14203-1904
(716)332-1451
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2002-07-29 16:43 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-07-27 15:24 Multiple Postmasters on Beowulf cluster Jan Hartmann <jhart@frw.uva.nl>
2002-07-27 15:34 ` Tom Lane <tgl@sss.pgh.pa.us>
2002-07-28 20:01 ` Paul Ramsey <pramsey@refractions.net>
2002-07-29 16:43 ` Jan Hartmann <jhart@frw.uva.nl>
2002-07-29 13:30 ` Robert M. Meyer <rmeyer@installs.com>
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