[mapserver-users] High CPU

Jeff McKenna jmckenna at gatewaygeomatics.com
Fri Sep 5 15:27:03 PDT 2008


my quick thoughts:

- make sure you are using MS4W 2.2.9 (latest)
- make sure your shp has a qix file with it (created by shptree.exe)
- test draw speed with shp2img.exe command with -map_debug 5
- make sure no projections-on-the-fly are occurring
....start with that anyway...



-- 
Jeff McKenna
FOSS4G Consulting and Training Services
http://www.gatewaygeomatics.com/



Steve White wrote:
> I’m running the latest version of MS4W on a virtual private server with 
> the following:
> 
>  
> 
> -          2003 Server
> 
> -          IIS 6.0
> 
> -          Intel Xeon CPU 3.20Ghz
> 
> -          640MB RAM
> 
>  
> 
> I have one shapefile 850KB and a basic mapfile like below:
> 
>  
> 
> MAP
> 
>   NAME                                                                 Test
> 
>   STATUS                                              ON
> 
>   UNITS                                                 METERS
> 
>   SHAPEPATH                                      "C:\Inetpub\scripts\data\"
> 
>   IMAGECOLOR                                  0 255 255
> 
>   SIZE                                                      400 400
> 
>   DEBUG                                                               ON
> 
>   IMAGETYPE                                      PNG
> 
>   EXTENT                                               -4.35 56.14 -3.23 
> 56.91
> 
>  
> 
> WEB
> 
>   METADATA
> 
>     "wms_title"                                    "Test MS"
> 
>     "wms_onlineresource"             
> "http://localhost/scripts/mapserv.exe&"
> 
>     "wms_srs"                                      "EPSG:4326 EPSG:54004 
> EPSG:27700"
> 
>     "wms_feature_info_mime_type" "text/html"
> 
>   END
> 
>  
> 
> IMAGEPATH                                       "C:\Inetpub\wwwroot\tmp\"
> 
> IMAGEURL                                          "C:\Inetpub\wwwroot\tmp\"
> 
> LOG                                                       
> "C:\Inetpub\wwwroot\tmp\mapserver.log"
> 
> TEMPLATE                                           
> "C:\Inetpub\wwwroot\Test\templates\template.html"
> 
> EMPTY                                                  
> "C:\Inetpub\wwwroot\Test\templates\template_empty.html" 
> 
>  
> 
> END
> 
>  
> 
> PROJECTION
> 
>   "init=epsg:4326"
> 
> END
> 
>  
> 
> SYMBOL
> 
>   NAME "circle"
> 
>   TYPE ellipse
> 
>   FILLED true
> 
>   POINTS
> 
>     1 1
> 
>   END
> 
> END
> 
>  
> 
> LAYER
> 
>                 NAME                                                   Test
> 
>                 METADATA
> 
>         "wms_title"                                                "Test"
> 
>                 "gml_include_items"                     "all"
> 
>                 "wms_include_items"                   "all"
> 
>                 "wms_feature_info_mime_type"           "text/html"
> 
>                 END
> 
>                 
> TYPE                                                      POINT
> 
>                 DATA                                                     
> Test
> 
>                 
> STATUS                                                                ON
> 
>                 DUMP                                                   TRUE
> 
>         CLASS
> 
>                                 TEMPLATE                           
> "C:\Inetpub\wwwroot\Test\templates\template_test.html"
> 
>                 STYLE
> 
>                                                 SYMBOL "circle"
> 
>                                                 SIZE 10
> 
>                                                 COLOR 0 0 255
> 
>                 END
> 
>         END
> 
> END #end of layer
> 
>  
> 
> END # end of mapfile
> 
>  
> 
> I’m sending WMS GetMap requests to the layer from my localhost and 
> monitoring CPU on the server.
> 
>  
> 
> Every time I send a request the server CPU hits 100% until the request ends.
> 
>  
> 
> 1)      Is 640MB RAM enough to cope with this simple request?
> 
> 2)      Is there anything wrong with the mapfile?
> 
> 3)      Are there any methods I can use to tune this further?
> 
>  
> 
> Cheers,
> 
>  
> 
> Steve
> 
> 



More information about the MapServer-users mailing list