threads in mapserv

tim tim.bowden at WESTNET.COM.AU
Fri Mar 3 00:36:45 EST 2006


On Thu, 2006-03-02 at 23:58 -0500, Frank Warmerdam wrote:
> tim wrote:
> > Hi,
> > 
> > the unix compile howto at
> > http://mapserver.gis.umn.edu/docs/howto/compiling_on_unix
> > gives as an example ./configure --with-threads (as one of many options)
> > however the thread safe faq
> > http://mapserver.gis.umn.edu/docs/faq/thread_safety
> > says mapserver is /not/ thread safe.  Does this mean that the
> > --thread-safe switch should not normally be used or am I not seeing
> > something obvious here?  If so perhaps it should be noted in the howto.
> 
> Tim,
> 
> The thread-safe faq question goes on to explain that mapserver likely
> can be used safely in some contexts.  The --with-threads switch basically
> turns on mutex locking for various components.  In many cases (ie. GDAL)
> this amounts to a BigLock(tm) around the whole subsystem substantially
> limiting the amount of benefit from multi-threading.  But at least it
> keeps things known to be problematic working pretty safely.
> 
> The --with-threads switch does not need to be used in normal cgi or
> single threaded mapscript use.  It does add a modest overhead.  It
> should be used in any situations where you think multiple threads might
> be going through mapserver code at the same time.
> 
> Best regards,

Thanks Frank.  Does 'normal' cgi use include --with-fastcgi?  the
mapserver I am building gets almost all its data from a variety of sde
servers (think large state govt depts).  In our testing so far (4.6.2
and 4.8.1) we keep hitting the limit of sde's connections before we hit
mapservers limits (though we do have good hardware: Dell 3ghz dual xeons
with 4gb ram), hence our decision to re-do testing with fastcgi.

Thanks,
Tim
-- 
Mapforge Geospatial
Level 3/ 267 St Georges Tce
Perth 6000
Western Australia



More information about the mapserver-users mailing list