[Mapserver-users] Performance Drain
Phil Shevlin
pshevlin at cityftmyers.com
Fri Nov 7 10:33:20 PST 2003
I'm just starting out with Mapserver (about 10 days ago). My app uses OGR
to connect to MapInfo .tab files. The map file is below.
I am using:
Dell Server with Dual Celeron 600MHz's
1GB RAM
Windows 2K server
MapServer 3.6.6
PHP 4.3.3
MapLab 2.0.1
OGR --> MapInfo .tab's
My problem is that when the application is run, the CPUs run at 55% for a
second or two. If I increase the image size to 750 by 584 it peaks out at
100%. This occurs when only one person accesses the application. It will
not be open to the public, but the performance is less then optimal.
Does anyone have any suggestions on where I should look to improve
performance?
Phil Shevlin
########### map file #############################
MAP
NAME "Incidents_"
STATUS ON
EXTENT -81.917574 26.569844 -81.755026 26.691756
SIZE 512 384
SHAPEPATH "data"
SYMBOLSET "symbols/symbols35.sym"
FONTSET "fonts/fonts.list"
UNITS dd
IMAGETYPE png
WEB
MAXSCALE 80000
IMAGEPATH "E:/Inetpub/wwwroot/tmp/"
IMAGEURL "/tmp/"
TEMPLATE "template_lo.html"
ERROR "javascript:;"
END
QUERYMAP
STATUS ON
SIZE 512 384
COLOR 204 51 255
STYLE HILITE
END
LEGEND
STATUS EMBED
IMAGECOLOR 228 228 204
POSITION LR
KEYSIZE 15 10
LABEL
TYPE truetype
FONT "arial"
SIZE 8
COLOR 0 0 0
END
END
SCALEBAR
STATUS ON
COLOR 0 0 0
IMAGECOLOR 255 255 255
TRANSPARENT FALSE
UNITS MILES
INTERVALS 5
SIZE 500 2
STYLE 1
LABEL
SIZE TINY
COLOR 0 0 0
END
END
SYMBOL
NAME "Circle"
TYPE ELLIPSE
FILLED TRUE
POINTS
1 1
END
END
SYMBOL
NAME "icon_burg"
TYPE PIXMAP
IMAGE "e:/Inetpub/wwwroot/MapServer/fonts/gifs/house.gif"
END
SYMBOL
NAME "icon_gta"
TYPE PIXMAP
IMAGE "e:/Inetpub/wwwroot/MapServer/fonts/gifs/gta.gif"
END
SYMBOL
NAME "icon_robb"
TYPE PIXMAP
IMAGE "e:/Inetpub/wwwroot/MapServer/fonts/gifs/robbery.gif"
END
# Start of LAYER DEFINITIONS ---------------------------------------------
# Wards layer begins here ----------------------------------
LAYER
NAME "Ward_1"
STATUS DEFAULT
CONNECTIONTYPE OGR # connect to .tab file
CONNECTION "e:/maps/data/area1.tab" # which .tab file
TYPE POLYGON
CLASS
NAME "Ward1"
COLOR 255 228 255
OUTLINECOLOR 255 128 255
END
END
LAYER
NAME "Ward_2"
STATUS DEFAULT
CONNECTIONTYPE OGR # connect to .tab file
CONNECTION "e:/maps/data/area2.tab" # which .tab file
TYPE POLYGON
CLASS
NAME "Ward2"
COLOR 228 255 255
OUTLINECOLOR 128 255 255
END
END
LAYER
NAME "Ward_3"
STATUS DEFAULT
CONNECTIONTYPE OGR # connect to .tab file
CONNECTION "e:/maps/data/area3.tab" # which .tab file
TYPE POLYGON
CLASS
NAME "Ward3"
COLOR 255 255 228
OUTLINECOLOR 255 255 128
END
END
LAYER
NAME "Ward_4"
STATUS DEFAULT
CONNECTIONTYPE OGR # connect to .tab file
CONNECTION "e:/maps/data/area4.tab" # which .tab file
TYPE POLYGON
CLASS
NAME "Ward4"
COLOR 255 228 228
OUTLINECOLOR 255 128 128
END
END
LAYER
NAME "Ward_5"
STATUS DEFAULT
CONNECTIONTYPE OGR # connect to .tab file
CONNECTION "e:/maps/data/area5.tab" # which .tab file
TYPE POLYGON
CLASS
NAME "Ward5"
COLOR 228 228 255
OUTLINECOLOR 128 128 255
END
END
# Wards layer ends here ----------------------------------
# Water layer begins here ----------------------------------
LAYER
NAME "WaterBody"
STATUS DEFAULT
CONNECTIONTYPE OGR # connect to .tab file
CONNECTION "e:/maps/data/water.tab" # which .tab file
TYPE POLYGON
CLASS
NAME "Water"
COLOR 153 153 204
END
END
LAYER
NAME "WaterLines"
STATUS DEFAULT
CONNECTIONTYPE OGR # connect to .tab file
CONNECTION "e:/maps/data/waterlines.tab" # which .tab file
TYPE LINE
CLASS
NAME "Canals"
COLOR 51 51 153
END
END
# Water layer ends here ----------------------------------
# Streets layer begins here ----------------------------------
LAYER
NAME "streets"
STATUS DEFAULT
#DATA "streets_polyline"
CONNECTIONTYPE OGR # connect to .tab file
CONNECTION "e:/maps/data/streets.tab" # which .tab file
TYPE LINE
LABELITEM "NAME"
LABELMAXSCALE 50000
CLASS
NAME "Local Street"
EXPRESSION ('[CFCC_Code]' = "A41")
COLOR 32 32 32
LABEL
TYPE truetype
FONT "arial"
SIZE 7
POSITION uc
ANGLE auto
BUFFER 10
MINDISTANCE 400
COLOR 128 128 128
END
END
CLASS
NAME "Main Road"
EXPRESSION (('[CFCC_Code]' = "A31") or ('[CFCC_Code]' = "A21")
or('[CFCC_Code]' = "A35"))
COLOR 32 32 32
SYMBOL "Circle"
SIZE 2
LABEL
TYPE truetype
FONT "arial"
SIZE 7
POSITION uc
ANGLE auto
BUFFER 10
MINDISTANCE 400
COLOR 0 0 0
END
END
CLASS
NAME "Interstate"
EXPRESSION ('[CFCC_Code]' = "A15")
COLOR 255 0 0
SYMBOL "Circle"
SIZE 3
LABEL
TYPE truetype
FONT "arial"
SIZE 7
POSITION uc
ANGLE auto
BUFFER 10
MINDISTANCE 400
COLOR 64 64 64
END
END
END
# streets layer ends here ----------------------------------
# Incidents layer begins here ----------------------------------
LAYER
NAME "Incidents"
STATUS DEFAULT
CONNECTIONTYPE OGR # connect to .tab file
CONNECTION "e:/maps/offense_maps/incidents.tab" # which .tab file
TYPE POINT
TOLERANCE 8 # click sensitivity
CLASS
NAME "Signal23" # Text shown on legend
EXPRESSION ([NAT_CODE] = 23 and ([INC_DATE] >= %sDate% and [INC_DATE]
<= %eDate%)) # query burg only
SYMBOL "icon_burg" # symbol definition
COLOR 0 0 0 # color needed to make it visible
SIZE 16
TEMPLATE "template_lo.html" # set query template
END
CLASS
NAME "Signal10" # Text shown on legend
EXPRESSION ([NAT_CODE] = 10 and ([INC_DATE] >= %sDate% and [INC_DATE]
<= %eDate%)) # query burg only
SYMBOL "icon_gta" # symbol definition
COLOR 0 0 0
SIZE 18
TEMPLATE "template_lo.html" # set query template
END
CLASS
NAME "Signal27" # Text shown on legend
EXPRESSION ([NAT_CODE] = 27 and ([INC_DATE] >= %sDate% and [INC_DATE]
<= %eDate%)) # query burg only
SYMBOL "icon_robb" # symbol definition
COLOR 0 0 0
SIZE 16
TEMPLATE "template_lo.html" # set query template
END
END
# Incidents layer ends here ----------------------------------
# End of LAYER DEFINITIONS -------------------------------
END
More information about the MapServer-users
mailing list