Mapserver caching and map generation

Ed McNierney ed at TOPOZONE.COM
Wed Mar 1 23:38:09 EST 2006


Emmanuel -

There is no cache.  Therefore, there are no cached images, and there
cannot be an "expire after" time, because there's no image cache.
Really - there's no cache.

You can certainly have your Web server cache requests, but that's not
MapServer.  MapServer does not cache output images - it never does that.
Your OS will cache disk reads, but that's not MapServer caching.

It is very difficult to do accurate multi-user performance testing, but
it is entirely possible that several factors can contribute to the
performance differences you see.  For example, the PostGIS queries may
run faster if the same query is made several times in quick succession
(under the right circumstances).  All data read from disk may be in
operating system's disk cache.  If the MapServer CGI requests, followed
by the image retrieval requests, happen in such a way that the disk
subsystem does several writes followed by several reads
(write-write-write-read-read-read) you will probably get faster
performance than if they are interleaved
(write-read-write-read-write-read).

	- Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
Phone: +1 (978) 251-4242
Fax: +1 (978) 251-1396
ed at topozone.com

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Emmanuel BELO
Sent: Wednesday, March 01, 2006 4:07 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] Mapserver caching and map generation

Thank you Ed for your answer,

We are working with data supplied from postgis. Images will mainly be
cached (neither pan neither zoom, only defined shortcuts).

After some test, it occurs that images that are often requested are
faster delivered that others. Is there an "expire after time" parameter
for cached images?

eb



Ed McNierney wrote:
> Emmanuel -
> 
> Each map request generates a unique image, and the URL for that image 
> is returned to the client browser requesting that image.  Since your 
> Web server can process several HTTP requests at one time, there can be

> several MapServer instances all running at the same time.
> 
> There will be some interaction with the disk subsystem on which the 
> temporary images are written, and from which they are read by the 
> client browsers.  Some disk systems can handle multiple simultaneous 
> read/write requests better than others.  Nothing will break - but some

> disk subsystems will take longer than others to respond when multiple 
> reads and writes are happening.
> 
> In case you haven't discovered it yet, using MapServer as a WMS server

> or in the CGI "mode=map" mode, the output image is written directly to

> the client and no temporary files are written to disk.
> 
>      - Ed
> 
> Ed McNierney
> President and Chief Mapmaker
> TopoZone.com / Maps a la carte, Inc.
> 73 Princeton Street, Suite 305
> North Chelmsford, MA  01863
> ed at topozone.com
> (978) 251-4242
> 
> -----Original Message-----
> From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] 
> On Behalf Of Emmanuel BELO
> Sent: Wednesday, March 01, 2006 12:26 PM
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: [UMN_MAPSERVER-USERS] Mapserver caching and map generation
> 
> Hello,
> 
> after cleaning the cache, mapserver generates the new images on
request.
> 
> What happens if 10 users ask for the same map during the generation of

> the first map? Are their request delayed or will 10 processes in 
> parallel be initiated?
> 
> Best regards,
> 
> Emmanuel BELO
> emmanuel.belo at microgis.ch



More information about the mapserver-users mailing list