Solaris lseek when reading shape files

Stephen Woodbridge woodbri at SWOODBRIDGE.COM
Thu Apr 7 17:41:52 EDT 2005


Don,

As Frank mentions, the qix file should make a difference, unless you are
rendering everything in the shapefile. I'm not sure what your file
structure is, but you might want to run something like:

find /path/to/data -name "*.shp" -exec shptree {} \;

just to make sure you have them all in place, They should not slow
anything down.

Also I did not catch that these are calls to open/read/lseek which are
the low level system IO calls and not fopen/fread/fseek which are the
calls the shapelib uses, so I would concur that this is the underlying
Solaris IO system you are tracing which is outside the control of
mapsever. This is not to say that this might not also be your problem,
but I would investigate other mapserver config issues first. Do you have
this "same" setup still on linux, can you compare the directory trees,
the mapfile, are you really comparing apples to apples.

Also, how large are the shapefile files that you are reading? How many
entities? Are really rendering all entities in them?

-Steve W.

Frank Warmerdam wrote:
>>>Don Drake wrote:
>>>
>>>>I'm using street-level data broken out by counties (tileindexed) and
>>>>I'm running into some performance problems on Solaris.  We have this
>>>>working on Linux, similar maps take 5 seconds max and on Solaris they
>>>>take 45 seconds.
>
> ...
>
>>>>The seeks continue on for about a million more lines (seriously) and
>>>>this takes forever.
>>>>
>>>>This is a really inefficient way to scan a file, what can I do?
>>>>
>>>>I"m running Mapserver 4.2.5 on Solaris 9.
>
>
> Don,
>
> Looking at the pattern of seeks and reads, it would seem that stuff
> is getting read in 8K chunks which I would presume is being done by
> the C stdio library in response to lots of little reads in mapserver.
> Similarly it would seem that the low level seeks are being generated
> by the stdio library.
>
> In other words, I don't think this is under the control of MapServer.
> I'm not sure why things are so much slower on your Solaris box.
> As SteveW mentions, you didn't have the qix before but you say
> it didn't help.  The qix should ensure that only (roughly) the right
> data is getting read.   Are you essentially rendering everything?
> Have you verified that it is really the IO that is slowing you down?
>
> Best regards,
> --
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | Geospatial Programmer for Rent
>



More information about the mapserver-users mailing list