[Geoserver-users] JAI merging granules performance

Hi all,

I am running Geoserver 2.12.1 on Windows (Java8, 32bits, JAI & JAI ImageIO installed).

I have set up an ImagePyramid wich works OK, but performance is not as good as what I expected.
From the logs, the time taken between the parsing of the request and the end of the granules collection is OK (~ 200ms to query the index stored in a PostGIS DB, collect 6 granules, which are 1000x1000px TIFF files with LZW compression).

But then, it takes almost 1 second for JAI to merge these granules into the final PNG.
I have enabled multithreading on this layers which helped quite a lot, and disabled JAI_IMAGEREAD which helped a little.

The log files shows nothing special happening, so I guess it's just the process that is not very fast : https://pastebin.com/EH8K6tUJ

I have left the defaults in JAI and Coverage Access settings.

Is there anything I could try to make things faster ?

Thanks a lot !

--
Arnaud

Hi,
do you have the “use JAI ImageRead” parameter turned on? (it is by default)
In that case the read is deferred, happens when the JAI chain starts pulling tiles, so you see also the data reading
as part of the image processing time.

Side note, LZW decompression is awfully slow, if you want to use lossless compression I’d suggest to switch to DEFLATE instead

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.

Hi Andrea, thanks for your answer !

Le 04/10/2018 à 13:05, Andrea Aime a écrit :

do you have the "use JAI ImageRead" parameter turned on? (it is by default)
In that case the read is deferred, happens when the JAI chain starts pulling tiles, so you see also the data reading
as part of the image processing time.

I have AllowMultiThread = true and USE_JAI_IMAGEREAD = false.
I had seen this suggestion in many blogs / threads so it is the first one that I applied.

Side note, LZW decompression is awfully slow, if you want to use lossless compression I'd suggest to switch to DEFLATE instead

Thanks for the advice.
Unfortunately it is an old dataset of nearly 1 million rasters, and the actual backend use to stich them together (closed source dll build on who knows what) does not support many options. I'm switching from that to GeoServer, but I'd like to keep the same performance.

I already managed to get a small improvement by setting priority to 10 in JAI. Not the best, but OK anyway.

Regards
--
Arnaud