[mapserver-users] performance problem with PostGIS layer

Pericles S. Nacionales pnaciona at gis.umn.edu
Fri Dec 7 07:59:50 PST 2001


Simon,

I was just playing with PostGIS and MapServer, using Steve Lime's demo data
(I converted using the shp2pgsql utility), and didn't notice too much of a
performance difference.  I'm using RedHat 7.2 and AMD K6-2 500Mhz cpu with
384Mb RAM...  Perhaps your database is substantially bigger than mine.  Or,
perhaps you ought to add a bit more RAM on your machine?  There are other
database admin stuff that can help you speed things up a bit but increasing
the physical memory will make those things help you even more.  Check
PostgreSQL's web site for the administrator's guide.

Try my demo at http://128.101.73.155/ms_demo/demo_init.html.  It looks just
like the "normal" demo except the data is stored as PostGIS data. (It's a
little sluggish right now as I'm doing some "real" work over the net. :)

-Perry N.

> -----Original Message-----
> From: owner-mapserver-users at lists [mailto:owner-mapserver-users at lists]On
> Behalf Of simon mercier
> Sent: Friday, December 07, 2001 8:56 AM
> To: mapserver
> Subject: [mapserver-users] performance problem with PostGIS layer
>
>
> hi,
> I have performance problem with my PostGIS layer in mapserver.. It's
> slow... vvvery slow, when zoom in, zoom out and pan.  I'am new with
> PostgreSQL, PostGIS, MapServer and realy don't know where to look for
> this problem! I have a table of 392000 row of polygon with oid and GiST
> index . I have a debian server with a 933 CPU and 128 of RAM...
>
> --I have good result when retrieving data with spatial SQL query :
> explain select count(*) from pclp_s where the_geom &&
> GeometryFromText('BOX3D(-72.15 46.43, -72.13 46.45)'::BOX3D,-1)
> Aggregate  (cost=8.94..8.94 rows=1 width=0)
>   ->  Index Scan using idx_geom_pclp_s on pclp_s  (cost=0.00..8.93
> rows=2 width=0)
>
> --With the same box, (i.e. EXTENT -72.15 46.43 -72.13 46.45 in map
> file)  it take 80 sec for display image in IE with MapServer...
>
> --A look on status server indicate postmaster take all CPU:
>  14:51:39 up 1 day, 23:31,  5 users,  load average: 0.69, 0.29, 0.10
> 60 processes: 56 sleeping, 4 running, 0 zombie, 0 stopped
> CPU states:  49.1% user,  44.7% system,   0.0% nice,   6.2% idle
> Mem:    126060K total,   122584K used,     3476K free,     1380K buffers
>
> Swap:   248968K total,    19516K used,   229452K free,    71440K cached
>
>   PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
>  7255 postgres  18   0  3920 3920  3236 R    85.6  3.1   0:13 postmaster
>
>  7254 www-data   9   0  3080 3080  1876 S     0.0  2.4   0:00 mapserv
>  7253 root      11   0   992  992   776 R     0.3  0.7   0:00 top
>
> It is a server harware problem or a soft setup problem? There is
> someting to do?
>
> regard
>
> --
> Simon Mercier
> Technicien en Géomatique
> Direction des technologies de l'information
> La Financière agricole du Quebec
> 5825, rue Saint-Georges
> Lévis, Québec,Canada G6V 4L2
> http://www.fadq.qc.ca/
>
>
>




More information about the MapServer-users mailing list