[Geoserver-users] Geoserver to run faster

I would like to know if there is anyway to speed up geoserver as I seem to be
running out of options.

I have a base layer map that has 15 items on it that is need to make the map
look decent.

I have also added the native JAI and the Native JAI ImageIO installed and
its reading it although I had to reinstall everything on the 32 bit.

I am using geoserver 2.4.0 with tomcat 7 and java 7 on a windows machine.

It takes nearly 5min to load a section of the map and I need to try and
increase the speed.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Geoserver-to-run-faster-tp5086061.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Ravyn,

what is the source of the data? A database or shapefile? By 15 items do you mean 15 layers?

GeoWebCache caching allows GeoServer to store WMS images for reuse by subsequent requests, making it much, much faster:
http://docs.geoserver.org/stable/en/user/geowebcache/

Google Maps uses a similar trick, caching prerendered tiles at discrete resolutions. GeoWebCache does more as it can be configured for different coordinate reference systems.

You can also use a generic raw (non-spatial) HTTP cache ("web application accelerator") on top. One example is Varnish but I do not think it supports Windows. There are likely equivalent tools for Windows.

Kind regards,
Ben.

On 28/10/13 19:50, Ravyn wrote:

I would like to know if there is anyway to speed up geoserver as I seem to be
running out of options.

I have a base layer map that has 15 items on it that is need to make the map
look decent.

I have also added the native JAI and the Native JAI ImageIO installed and
its reading it although I had to reinstall everything on the 32 bit.

I am using geoserver 2.4.0 with tomcat 7 and java 7 on a windows machine.

It takes nearly 5min to load a section of the map and I need to try and
increase the speed.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Geoserver-to-run-faster-tp5086061.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

Hi Ravyn,
could you please provide some more details about the data you are rendering?

Which type of data are you serving? Is it raster data? In that case, which format is?

Please, let us know so we can provide you more suggestions.

Best Regards,
Daniele

···

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Daniele Romagnoli
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


On Mon, Oct 28, 2013 at 12:50 PM, Ravyn <smrcoutts24@anonymised.com> wrote:

I would like to know if there is anyway to speed up geoserver as I seem to be
running out of options.

I have a base layer map that has 15 items on it that is need to make the map
look decent.

I have also added the native JAI and the Native JAI ImageIO installed and
its reading it although I had to reinstall everything on the 32 bit.

I am using geoserver 2.4.0 with tomcat 7 and java 7 on a windows machine.

It takes nearly 5min to load a section of the map and I need to try and
increase the speed.


View this message in context: http://osgeo-org.1560.x6.nabble.com/Geoserver-to-run-faster-tp5086061.html
Sent from the GeoServer - User mailing list archive at Nabble.com.


Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

And you might also consider production-grade changes such as increasing the Java heap size:
http://docs.geoserver.org/latest/en/user/production/
http://docs.geoserver.org/latest/en/user/production/container.html#optimize-your-jvm

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

The source data is a database. Yes I mean 15 layers in the base map.

I have had a look at the geowebcache and copied the war file in the apache
tomcat webaps folder but for some reason when I click on it , it gives me a
whole error file list so I am not to sure what exactly I'm doing wrong with
it. I'm sort of not 100% sure how it works with geoserver though either.

Will look more into the issue of the geowebcache as soon as I can figure out
the error it keeps giving me.

thanks

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Geoserver-to-run-faster-tp5086061p5086292.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Rayvn,

please do not copy GeoWebCache into GeoServer as there is already a GeoWebCache version bundled in the GeoServer WAR. Instead, configure GeoWebCache using the GeoServer web administration interface GeoWebCache page.

Please also consider database optimisations such as indices, both ordinary and spatial. What database are you using>?

Kind regards,
Ben.

On 29/10/13 17:25, Ravyn wrote:

The source data is a database. Yes I mean 15 layers in the base map.

I have had a look at the geowebcache and copied the war file in the apache
tomcat webaps folder but for some reason when I click on it , it gives me a
whole error file list so I am not to sure what exactly I'm doing wrong with
it. I'm sort of not 100% sure how it works with geoserver though either.

Will look more into the issue of the geowebcache as soon as I can figure out
the error it keeps giving me.

thanks

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

Hi Ravyn
(Sorry for the direct reply, this one goes to the list instead)

The source data is a database. Yes I mean 15 layers in the base map.

In our experience, and I am sure that many here will agree, there are
then several things you could look at DBS, Geoserver, caching, and
clustering - the usual culprit we see is "poor" database design. The
reason I say "usual" is that people often focus on tuning the front
end - ie. GeoServer or GeoWebCache - and forget the backend.

Most DBS support some sort of spatial index - in my experience the
best and easiest are found in PostGIS, whereas for instance MSSQLs
implementation needs to be (continuously) hand-tuned. If you have some
common filters you use (either from Geoserver or in a WHERE-clause)
then make sure that these are analyzed and properly index accordingly.

Maybe you could give us a little more detail on your database system/setup?

I have had a look at the geowebcache and copied the war file in the apache
tomcat webaps folder but for some reason when I click on it , it gives me a
whole error file list so I am not to sure what exactly I'm doing wrong with
it. I'm sort of not 100% sure how it works with geoserver though either.

Please do not do that, GeoServer comes with a built-in GWC which
should suit most needs.

Best regards,

Greg

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

···

I must concur with Greg; we have a layergroup that has layers from about 60 different database tables, though only up to 15 are visible at any one time. This takes along time to render (up to a full minute) - and after investigation it appears this is because of the database/GeoServer interaction. The database is Oracle. We’re doing a few things to try and optimise it.

To find out what is taking time, turn on GEOTOOLSDEVELOPER level logging. Then run the slow query. When it’s finished look in the logs and you should be able to gather what parts of the query are taking how long (or you can post it to pastebin and link it here).

Jonathan

On 29 October 2013 10:04, Hans Gregers Petersen <gregers@anonymised.com> wrote:

Hi Ravyn
(Sorry for the direct reply, this one goes to the list instead)

The source data is a database. Yes I mean 15 layers in the base map.

In our experience, and I am sure that many here will agree, there are
then several things you could look at DBS, Geoserver, caching, and
clustering - the usual culprit we see is “poor” database design. The
reason I say “usual” is that people often focus on tuning the front
end - ie. GeoServer or GeoWebCache - and forget the backend.

Most DBS support some sort of spatial index - in my experience the
best and easiest are found in PostGIS, whereas for instance MSSQLs
implementation needs to be (continuously) hand-tuned. If you have some
common filters you use (either from Geoserver or in a WHERE-clause)
then make sure that these are analyzed and properly index accordingly.

Maybe you could give us a little more detail on your database system/setup?

I have had a look at the geowebcache and copied the war file in the apache
tomcat webaps folder but for some reason when I click on it , it gives me a
whole error file list so I am not to sure what exactly I’m doing wrong with
it. I’m sort of not 100% sure how it works with geoserver though either.

Please do not do that, GeoServer comes with a built-in GWC which
should suit most needs.

Best regards,

Greg


Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

I am using postgreSql with geoserver.

Ok will try to get that sorted out then with the geowebcache.

I do have indexes with all my tables I know I have I think just the normal
indexes so maybe need to look at the other type too.

thanks

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Geoserver-to-run-faster-tp5086061p5086322.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

I have tried to add these
http://docs.geoserver.org/latest/en/user/production/container.html#optimize-your-jvm
<http://docs.geoserver.org/latest/en/user/production/container.html#optimize-your-jvm&gt;
but for some reason that seems to keep breaking the geoserver bit it does
not seem to allow me to go into the geoserver and then does not want to
start it at all in the tomcat manager.

will go through the the other link that you sent me and see what I can fix
and change there too.

thanks

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Geoserver-to-run-faster-tp5086061p5086325.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

I keep getting a HTTP Status 500 - Servlet.init() for servlet geowebcache
threw exception error when I try and access the geowebcache.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Geoserver-to-run-faster-tp5086061p5086343.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

On Tue, Oct 29, 2013 at 12:30 PM, Ravyn <smrcoutts24@anonymised.com> wrote:

I am using postgreSql with geoserver.

Ok will try to get that sorted out then with the geowebcache.

I do have indexes with all my tables I know I have I think just the normal
indexes so maybe need to look at the other type too.

You definitely need spatial indexes if you don't have them already.
Other suggestions:
http://elogeo.nottingham.ac.uk/xmlui/bitstream/handle/url/226/gs_steroids_sgiannec_foss4g2013_01.03.pdf?sequence=1

Generally speaking, if it's taking 5 minutes don't bother changing the
setups
of the JVM or installing native JAI extensions and so on, those help once
your response time is around 0.1seconds and you need to improve it further,
at 5 minutes you most likely have a wrong data/style setup.

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

Hi all
My database has about 115,000 tables in GEOSERVER they are represented as 127,000 layers and layers of group 18000
The first building WMS composes about 5 minutes after it's generated tiles goes very quickly.
But all the same the first request, are very slow
Sorry for my bad English

29.10.2013, 17:06, "Andrea Aime" <andrea.aime@anonymised.com>:

On Tue, Oct 29, 2013 at 12:30 PM, Ravyn <smrcoutts24@anonymised.com> wrote:

I am using postgreSql with geoserver.

Ok will try to get that sorted out then with the geowebcache.

I do have indexes with all my tables I know I have I think just the normal
indexes so maybe need to look at the other type too.

You definitely need spatial indexes if you don't have them already.
Other suggestions:
http://elogeo.nottingham.ac.uk/xmlui/bitstream/handle/url/226/gs_steroids_sgiannec_foss4g2013_01.03.pdf?sequence=1

Generally speaking, if it's taking 5 minutes don't bother changing the setups
of the JVM or installing native JAI extensions and so on, those help once
your response time is around 0.1seconds and you need to improve it further,
at 5 minutes you most likely have a wrong data/style setup.

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

,
------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk

,
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Hi Ravyn,

I am using postgreSql with geoserver.

I do have indexes with all my tables I know I have I think just the normal
indexes so maybe need to look at the other type too.

Ok, so - as Andrea also states - you will definitely need some spatial indexes.
Look into that further - for instance under "Indexing the data" in
this guide (which is a bit old, but still a good short introduction):
http://www.bostongis.com/PrinterFriendly.aspx?content_name=postgis_tut01

Basically if your table is called "myTable" and your geometry field is
called "geom" - you simply do this query (once) on the table:
CREATE INDEX idx_myTable_geom ON myTable USING gist(geom);
...And it should speed up your queries significantly.

Best regards,

Greg