I'm having the craziest GeoServer experience right now and I was hoping to get some input on what might be causing this behaviour.
I'm using Apache Bench to benchmark rendering performance for a layer via GeoServer's WMS interface and accidentally discovered that the vector icon size has a very significant effect on performance. The image I'm rendering:
- 25,000 point features
- Single rendering rule in SLD
- 1900x1200 pixels
- Request concurrency is 5
- GeoServer is 2.6.1
- JVM is Oracle Java 7 SE
- Not using native JAI
The SLD's single rendering rule looks like this:
<PointSymbolizer> <Graphic> <Mark> <WellKnownName>circle</WellKnownName> <Fill> <CssParameter name="fill">#FF0000</CssParameter> <CssParameter name="fill-opacity">1.0</CssParameter> </Fill> </Mark> <Size> <ogc:Literal>50</ogc:Literal> </Size> </Graphic> </PointSymbolizer>
This chart shows how response time for the same request varies based on icon size
As this is a vector icon I had assumed that rendering any size had as much impact on performance as any other size, but it appears that beyond a certain size (perhaps 16px) performance begins to suffer and beyond 30px it drops dramatically.
This has obvious implications for how I author future SLDs but right now I am more interested in why this would happen. Any thoughts?
EDIT: With a little more investigation I have found that increasing the (scaled) size of a PNG icon gives a much more linear increase in rendering time and there is a size, for this particular layer, when PNG icons become faster than vector icons. I have also seen that the relationship between icon size and performance is more linear with a smaller number of features. As it looks like the number of features and icon size both interact to affect performance I can only assume this is related to memory usage, I'm just not sure exactly how.