[Geoserver-users] Performance on GetLegendGraphic

Hi,

We are experiencing quite drastic differences in performance when requesting legend graphics (request=GetLegendGraphic) on WMS services running on different GeoServer installations.

In one case each request uses around 20 ms and in another similar requests use 800-1000 ms.

The general performance of the two servers is quite similar.

Any hints on what determines the processing time on such requests?

Best regards,

Morten Storm
Chefkonsulent


image001.png

image002.png

GetLegendGraphic in general should be quick, as it just has to inspect the style and render the data.
However, there are parameters that make it access data, they are the ones to count features matched, and
eliminate rules that are not on the current map… in that case, it would definitely take more time.

Hard to say more, you’re not giving us much context… GeoServer version, the legend graphic request, the styles, and so on…

Cheers
Andrea

image001.png

image002.png

···

Regards,

Andrea Aime

==
GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions Group
phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 333 8128928

https://www.geosolutionsgroup.com/

http://twitter.com/geosolutions_it


Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail

Sorry for the sparse context description – and my delayed response.

I have now made a comparison using the same style (albeit on two different polygon layers) on two different servers both running GeoServer v. 2.14.5.

Specs for server I:

  • Intel Xeon Gold 6234 (1 socket, 4 virtual processors)
  • 24 GB RAM

Specs for server II:

  • Intel Xeon Silver 4208 (2 sockets, 4 virtual processors)
  • 32 GB RAM

I have setup layers with the following (simple) style on both servers:

<?xml version="1.0" encoding="UTF-8"?>

sld:NamedLayer

sld:NamePolygon_style</sld:Name>

sld:UserStyle

sld:NamePolygon_style</sld:Name>

sld:TitlePolygon style</sld:Title>

sld:FeatureTypeStyle

sld:Namename</sld:Name>

sld:Rule

sld:Name7_BYGNDIV</sld:Name>

sld:Title7_BYGNDIV</sld:Title>

sld:MaxScaleDenominator2000</sld:MaxScaleDenominator>

sld:PolygonSymbolizer

sld:Fill

sld:GraphicFill

sld:Graphic

sld:Mark

sld:WellKnownNameshape://backslash</sld:WellKnownName>

sld:Fill

<sld:CssParameter name=“fill”>#6E6E6E</sld:CssParameter>

</sld:Fill>

sld:Stroke

<sld:CssParameter name=“stroke”>#6E6E6E</sld:CssParameter>

</sld:Stroke>

</sld:Mark>

sld:Size10</sld:Size>

</sld:Graphic>

</sld:GraphicFill>

<sld:CssParameter name=“fill”>#6E6E6E</sld:CssParameter>

</sld:Fill>

sld:Stroke

<sld:CssParameter name=“stroke”>#FF0000</sld:CssParameter>

</sld:Stroke>

</sld:PolygonSymbolizer>

</sld:Rule>

</sld:FeatureTypeStyle>

</sld:UserStyle>

</sld:NamedLayer>

</sld:StyledLayerDescriptor>

The request is

https:///Server/MapServiceProxy?mapServiceId=eca7ca5c-f0fe-45d8-a279-747eb9bfbae6&service=WMS&version=1.1.1&request=GetLegendGraphic&FORMAT=image/png&transparent=true&layer=Forsyning:Polygon

The response time for this request is:

On server I: 17-23 ms

On server II: 904-962 ms

Any hints on what causes this huge difference in response time?? The same difference is seen generally on all GetLegendGraphic requests, causing server I to load the webpage very much faster than server II…

Best regards,

Morten Storm

image001.png

image002.png

···

Fra: Andrea Aime <andrea.aime@…10949…>
Sendt: 6. september 2021 15:53
Til: Morten Storm <ms@…8610…>
Cc: geoserver-users@lists.sourceforge.net
Emne: Re: [Geoserver-users] Performance on GetLegendGraphic

GetLegendGraphic in general should be quick, as it just has to inspect the style and render the data.

However, there are parameters that make it access data, they are the ones to count features matched, and

eliminate rules that are not on the current map… in that case, it would definitely take more time.

Hard to say more, you’re not giving us much context… GeoServer version, the legend graphic request, the styles, and so on…

Cheers

Andrea

On Mon, Sep 6, 2021 at 3:02 PM Morten Storm via Geoserver-users <geoserver-users@lists.sourceforge.net> wrote:

Hi,

We are experiencing quite drastic differences in performance when requesting legend graphics (request=GetLegendGraphic) on WMS services running on different GeoServer installations.

In one case each request uses around 20 ms and in another similar requests use 800-1000 ms.

The general performance of the two servers is quite similar.

Any hints on what determines the processing time on such requests?

Best regards,

Morten Storm
Chefkonsulent



Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Regards,

Andrea Aime

==
GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions Group
phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 333 8128928

https://www.geosolutionsgroup.com/

http://twitter.com/geosolutions_it


Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail

The style is pretty much self contained, so should be pretty quick to render. The GeoServer version is the same… would seem to suggest the difference is somewhere else.
Did you check the proxying thing you have going on? This URL is not coming from a straight GeoServer call, it even says “proxy” in it:

https:///Server/MapServiceProxy?mapServiceId=eca7ca5c-f0fe-45d8-a279-747eb9bfbae6

Try making direct requests to GeoServer, without going through that proxy and possible authentication, is the timing still different?

Cheers
Andrea

image001.png

image002.png

···

Regards,

Andrea Aime

==
GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions Group
phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 333 8128928

https://www.geosolutionsgroup.com/

http://twitter.com/geosolutions_it


Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail