I have following geoserver status. I have installed JAI but memory used by jai is 0 and image rendering for wms is very slow.
Is it issue with memory allocation? I am using Sql server 2008.
From this page:
So if you are drawing WMS tiles of a vector data set you will see some speed up from using the native JAI but probably not much, if your map is a coverage/raster dataset (satellite imagery or aerial photos) then you will see a speed up by using the native JAI.
If you have slow map generation from a vector source the most likely slow downs are that you don't have a spatial index on yyour datasource, are trying to draw too much data or that you are over styling it (or using an inefficient SLD file).
For more details of possible things to work on see http://www.slideshare.net/mobile/geosolutions/geoserver-on-steroids
Try adding an index to your shapefile, as suggested @iant.
The command for Geoserver is:
and it must be run from the geoserver/WEB-INF/lib directory as a user who can read/write in the shapefile directory. Depending on your geoserver version you might have to change the jar version numbers.
I first saw it mentioned here where other methods for creating the index are cited.
Thank you for your interest in this question.
Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.
Would you like to answer one of these unanswered questions instead?