On Wed, Nov 28, 2018 at 6:30 PM Daniel Urda <[email protected]>
wrote:

> Hi,
> We have used GeoServer for quite a while for serving large scanned maps
> over WMS, however we've noticed important performance issues after
> upgrading to 2.14.1, with constant memory and CPU load with no apparent
> relation to incoming request. While profiling the Tomcat instance we
> noticed that few of the connectors were constantly allocating memory though
> there was no active connection, and probing the threads we noticed they
> spent most of the time calling some JAI function. This behaviour appeared
> at random times after every server restart, but stopped once we removed JAI
> jars from the classpath.  Is there any known issue with using JAI in
> GeoServer 2.14.1?
>

GeoServer ships with JAI jars in its own WEB-INF/lib and won't work without
them. Adding them to the Tomcat libraries should not alter the situation,
neither would
adding them to the JDK installation... but I'm just speculating, I haven't
added them there in years now, most of the data we deal with has nodata or
masks, so
we don't install anything else and enable jai-ext instead (you might want
to try it out and see how it works for you):
https://docs.geoserver.org/stable/en/user/configuration/image_processing/index.html#jai-ext

In case you want to keep on using the native implementations, one thing I
remember, if you add the jai jars in the container shared libs or the JDK,
they should be removed from GeoServer own WEB-INF/lib, having them in both
places might cause issues (exceptions about sealed packages and the like,
if memory serves me right).


>
> This is the relevant part of misbehaving thread:
> ...
>     at
> com.sun.media.jai.opimage.MosaicOpImage.computeTile(MosaicOpImage.java:442)
>     at
> com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904)
>     at javax.media.jai.OpImage.getTile(OpImage.java:1129)
>     at javax.media.jai.PlanarImage.cobbleByte(PlanarImage.java:2850)
>     at javax.media.jai.PlanarImage.getData(PlanarImage.java:2169)
>     at javax.media.jai.PlanarImage.getData(PlanarImage.java:2016)
>     at javax.media.jai.RenderedOp.getData(RenderedOp.java:2266)
>     at
> it.geosolutions.imageio.plugins.png.ScanlineProviderFactory.getProvider(ScanlineProviderFactory.java:53)
>     at
> it.geosolutions.imageio.plugins.png.PNGWriter.isScanlineSupported(PNGWriter.java:129)
>     at org.geoserver.wms.map.png.PNGJWriter.writePNG(PNGJWriter.java:38)
>

This is not "runaway" or "random", it's GeoServer answering to a request,
with the PNG encoder pulling tiles from the source image
and going though a "mosaic" operation (which is not just used to mosaic
source images, but also to add collars, deal with transparency
and a few other things, so if your source is not a image mosaic, it's going
to be used anyways).
The response might take quite some time if the source data is not
optimized, and maybe the client is not there waiting for the response
(we cannot know until bytes are written to the output). So an active
connection must have started this, even if it might have been closed in the
meantime.

Cheers
Andrea



-- 

Regards, Andrea Aime == GeoServer Professional Services from the experts!
Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime
@geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054
Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339
8844549 http://www.geo-solutions.it 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.*
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

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


[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to