We're Hiring!

basic config to improve speed of thumbnail responses

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

basic config to improve speed of thumbnail responses

Postby jwarren » Wed Jul 30, 2014 2:52 pm

Hi

We are using the webgateway to render thumbnails in our Java Webapp like this http://ourserver:4080/webgateway/render ... l/1239/200 using the public user (thanks again for the previous help in getting this working)

The issue we have now is that it's about 10X slower than when we had generated the thumbnails ourselfs and served them just using a basic tomcat pointing at a directory.

I'm sure I read in the documentation somewhere that I could turn off the creation of thumbnails on image upload - but I'd like to be sure with our omero 5.0.2 installation that we are creating thumbnails on upload of images and that we have optimal thumbnails all waiting ready to be returned i.e of width 200px?

Is it possible to specify the size of the thumbnails created? Any other things I can do to make the response faster?

Any tips and hints welcome.

Thanks

Jonathan.
jwarren
 
Posts: 102
Joined: Wed Jul 09, 2014 1:35 pm

Re: basic config to improve speed of thumbnail responses

Postby wmoore » Wed Jul 30, 2014 3:09 pm

Hi,

You can specify the size of thumbnail (longest side) with the last parameter. E.g size 96 thumbnail:

https://nightshade.openmicroscopy.org/w ... 925543/96/

Also, using size 96 may be faster, since this is the size of thumbnails that are generated and cached on import.

We have recently improved the speed of thumbnail generation under some permissions scenarios (when you are not the owner of the image but CAN save rendering settings - E.g. read-annotate group).
Previously, this required the generation of new rendering settings for each thumbnail, but since 5.0.2 we simply reuse the owner's rendering settings.
However, I'm not sure that this will help in your case.

Will.
User avatar
wmoore
Team Member
 
Posts: 674
Joined: Mon May 18, 2009 12:46 pm

Re: basic config to improve speed of thumbnail responses

Postby jwarren » Wed Jul 30, 2014 3:31 pm

Thanks Will.

I already tried 96 and found it to be faster (the url above showed the 200 that we want though), but wasn't sure if that was just a reduction in the amount of data being passed back for the smaller image. But you are saying it is cached.

So on the import I can't specify the size of the thumbnails is what you are saying? It sounds like that would be a good option to add?

There are currently no options for me to improve the speed- either via parameters on upload or giving more memory to the server or something?
jwarren
 
Posts: 102
Joined: Wed Jul 09, 2014 1:35 pm

Re: basic config to improve speed of thumbnail responses

Postby jwarren » Wed Jul 30, 2014 3:42 pm

Using 96 in the request url and displaying it with width 200 is probably ok for us. It does seem a bit faster - but I'd still be interested to hear anything else we can do to speed it up if possible?

Thanks
jwarren
 
Posts: 102
Joined: Wed Jul 09, 2014 1:35 pm

Re: basic config to improve speed of thumbnail responses

Postby atarkowska » Thu Jul 31, 2014 9:57 am

Hi Jonathan,

I have an impression you are using development web server to access the content through OMERO.web. I am pretty sure using real production web server such us nginx will speed it up.

Once you have nginx installed, follow nginx related sections on http://www.openmicroscopy.org/site/supp ... unix-linux.

Nginx config can be tweaked depends on how many thumbnails you want to load at once. You may be interested in reading http://stackoverflow.com/questions/7325 ... ts-per-min

Hope that helps
Ola
atarkowska
 
Posts: 327
Joined: Mon May 18, 2009 12:44 pm

Re: basic config to improve speed of thumbnail responses

Postby jwarren » Thu Jul 31, 2014 10:13 am

Thanks. That makes sense. I did wonder what the config set to development actually meant in real terms :D
jwarren
 
Posts: 102
Joined: Wed Jul 09, 2014 1:35 pm

Re: basic config to improve speed of thumbnail responses

Postby atarkowska » Thu Jul 31, 2014 10:24 am

As the name describe is for developers, to not have to restart webserver on every change. We made some improvement in the doc that will be available with the next coming release. I hope it will be much more clear then.

Let me know how the performance improved.

Ola
atarkowska
 
Posts: 327
Joined: Mon May 18, 2009 12:44 pm


Return to Developer Discussion

Who is online

Users browsing this forum: No registered users and 1 guest