[Geoserver-users] WMS Seems To Be Slow

Hi! I'm running GeoServer 1.7.3 with PostgreSQL 8.1/PostGIS. I have a single table containing six polygons. I am using OpenLayers to visualize this data. The server is Debian Etch.

I'm finding the loading of the WMS data seems to be a bit slow. Here is a screenshot showing the details from Firebug:

   http://files.britishideas.com/public/mapping/wmsload.gif

As you can see the four accesses to the WMS server all took longer than 47 seconds. The PC accessing the web page is on the same wired LAN as the server running GeoServer. I have no speed problems getting Osmarender tiles from a remote server in other tests.

Are there any hints or tips on how I can speed this up? Here is a snippet of Javascript that I am using:

--------------------------------------------------
map = new OpenLayers.Map ("map", {
   controls:[
     new OpenLayers.Control.Navigation(),
     new OpenLayers.Control.PanZoomBar(),
     new OpenLayers.Control.Attribution(),
     new OpenLayers.Control.LayerSwitcher()],
     maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
     maxResolution: 156543.0399,
     numZoomLevels: 19,
     units: 'm',
     projection: new OpenLayers.Projection("EPSG:900913"),
     displayProjection: new OpenLayers.Projection("EPSG:4326")
} );

var wms = new OpenLayers.Layer.WMS("Test", "http://myserver.net:8080/geoserver/wms",
   {
     layers: 'test:pima', tiled: 'true'
   },
   {buffer: 0}
);
map.addLayer(wms);

var lonLat = new OpenLayers.LonLat(lon, lat).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject());
map.setCenter (lonLat, zoom);
--------------------------------------------------

I've tried it with and without the buffer option.

thanks, Andy

--
Andy
PGP Key ID: 0xDC1B5864

Depends on how big the table is and the SLD (style) you are applying ?

Running "top" on the server while making the request may also shed some light, whether it's java, postgres or iowait that are taking all the CPU.

-Arne

Andrew Ayre wrote:

Hi! I'm running GeoServer 1.7.3 with PostgreSQL 8.1/PostGIS. I have a single table containing six polygons. I am using OpenLayers to visualize this data. The server is Debian Etch.

I'm finding the loading of the WMS data seems to be a bit slow. Here is a screenshot showing the details from Firebug:

   http://files.britishideas.com/public/mapping/wmsload.gif

As you can see the four accesses to the WMS server all took longer than 47 seconds. The PC accessing the web page is on the same wired LAN as the server running GeoServer. I have no speed problems getting Osmarender tiles from a remote server in other tests.

Are there any hints or tips on how I can speed this up? Here is a snippet of Javascript that I am using:

--------------------------------------------------
map = new OpenLayers.Map ("map", {
   controls:[
     new OpenLayers.Control.Navigation(),
     new OpenLayers.Control.PanZoomBar(),
     new OpenLayers.Control.Attribution(),
     new OpenLayers.Control.LayerSwitcher()],
     maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
     maxResolution: 156543.0399,
     numZoomLevels: 19,
     units: 'm',
     projection: new OpenLayers.Projection("EPSG:900913"),
     displayProjection: new OpenLayers.Projection("EPSG:4326")
} );

var wms = new OpenLayers.Layer.WMS("Test", "http://myserver.net:8080/geoserver/wms",
   {
     layers: 'test:pima', tiled: 'true'
   },
   {buffer: 0}
);
map.addLayer(wms);

var lonLat = new OpenLayers.LonLat(lon, lat).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject());
map.setCenter (lonLat, zoom);
--------------------------------------------------

I've tried it with and without the buffer option.

thanks, Andy

--
Arne Kepp
OpenGeo - http://opengeo.org
Expert service straight from the developers

Hi Arne,

This morning I started my browser (GeoServer is running all the time right now) and viewed my map. Nice and fast. I added an OSM layer and it was working great. My overlay only covers Arizona so I started browsing other countries like Chile, Spain, etc. Then I went back to Arizona and... it got stuck again.

top shows java using 99.4% of the CPU time. Occasionally I see postmaster running, but not very often. java has been at the top of the top table for several minutes now and no activity in the browser.

The total table size plus indexes, etc. is 140kb. I'm using the standard polygon SLD.

thanks, Andy

Arne Kepp wrote:

Depends on how big the table is and the SLD (style) you are applying ?

Running "top" on the server while making the request may also shed some light, whether it's java, postgres or iowait that are taking all the CPU.

-Arne

Andrew Ayre wrote:

Hi! I'm running GeoServer 1.7.3 with PostgreSQL 8.1/PostGIS. I have a single table containing six polygons. I am using OpenLayers to visualize this data. The server is Debian Etch.

I'm finding the loading of the WMS data seems to be a bit slow. Here is a screenshot showing the details from Firebug:

   http://files.britishideas.com/public/mapping/wmsload.gif

As you can see the four accesses to the WMS server all took longer than 47 seconds. The PC accessing the web page is on the same wired LAN as the server running GeoServer. I have no speed problems getting Osmarender tiles from a remote server in other tests.

Are there any hints or tips on how I can speed this up? Here is a snippet of Javascript that I am using:

--------------------------------------------------
map = new OpenLayers.Map ("map", {
   controls:[
     new OpenLayers.Control.Navigation(),
     new OpenLayers.Control.PanZoomBar(),
     new OpenLayers.Control.Attribution(),
     new OpenLayers.Control.LayerSwitcher()],
     maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
     maxResolution: 156543.0399,
     numZoomLevels: 19,
     units: 'm',
     projection: new OpenLayers.Projection("EPSG:900913"),
     displayProjection: new OpenLayers.Projection("EPSG:4326")
} );

var wms = new OpenLayers.Layer.WMS("Test", "http://myserver.net:8080/geoserver/wms",
   {
     layers: 'test:pima', tiled: 'true'
   },
   {buffer: 0}
);
map.addLayer(wms);

var lonLat = new OpenLayers.LonLat(lon, lat).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject());
map.setCenter (lonLat, zoom);
--------------------------------------------------

I've tried it with and without the buffer option.

thanks, Andy

--
Andy
PGP Key ID: 0xDC1B5864

Andrew Ayre ha scritto:

Hi Arne,

This morning I started my browser (GeoServer is running all the time right now) and viewed my map. Nice and fast. I added an OSM layer and it was working great. My overlay only covers Arizona so I started browsing other countries like Chile, Spain, etc. Then I went back to Arizona and... it got stuck again.

top shows java using 99.4% of the CPU time. Occasionally I see postmaster running, but not very often. java has been at the top of the top table for several minutes now and no activity in the browser.

The total table size plus indexes, etc. is 140kb. I'm using the standard polygon SLD.

In this case open a bug report on jira.codehaus.org attaching your data
and whatever client you're using and I'll try to reproduce the issue.

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

I just thought of something - I am using Java 1.6 (a requirement for another piece of software). The GeoServer FAQ mentioned that there are problems with Java 1.5. I don't see any errors on stdout. Could this be the cause though?

Andy

Andrew Ayre wrote:

Hi Arne,

This morning I started my browser (GeoServer is running all the time right now) and viewed my map. Nice and fast. I added an OSM layer and it was working great. My overlay only covers Arizona so I started browsing other countries like Chile, Spain, etc. Then I went back to Arizona and... it got stuck again.

top shows java using 99.4% of the CPU time. Occasionally I see postmaster running, but not very often. java has been at the top of the top table for several minutes now and no activity in the browser.

The total table size plus indexes, etc. is 140kb. I'm using the standard polygon SLD.

thanks, Andy

Arne Kepp wrote:

Depends on how big the table is and the SLD (style) you are applying ?

Running "top" on the server while making the request may also shed some light, whether it's java, postgres or iowait that are taking all the CPU.

-Arne

Andrew Ayre wrote:

Hi! I'm running GeoServer 1.7.3 with PostgreSQL 8.1/PostGIS. I have a single table containing six polygons. I am using OpenLayers to visualize this data. The server is Debian Etch.

I'm finding the loading of the WMS data seems to be a bit slow. Here is a screenshot showing the details from Firebug:

   http://files.britishideas.com/public/mapping/wmsload.gif

As you can see the four accesses to the WMS server all took longer than 47 seconds. The PC accessing the web page is on the same wired LAN as the server running GeoServer. I have no speed problems getting Osmarender tiles from a remote server in other tests.

Are there any hints or tips on how I can speed this up? Here is a snippet of Javascript that I am using:

--------------------------------------------------
map = new OpenLayers.Map ("map", {
   controls:[
     new OpenLayers.Control.Navigation(),
     new OpenLayers.Control.PanZoomBar(),
     new OpenLayers.Control.Attribution(),
     new OpenLayers.Control.LayerSwitcher()],
     maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
     maxResolution: 156543.0399,
     numZoomLevels: 19,
     units: 'm',
     projection: new OpenLayers.Projection("EPSG:900913"),
     displayProjection: new OpenLayers.Projection("EPSG:4326")
} );

var wms = new OpenLayers.Layer.WMS("Test", "http://myserver.net:8080/geoserver/wms",
   {
     layers: 'test:pima', tiled: 'true'
   },
   {buffer: 0}
);
map.addLayer(wms);

var lonLat = new OpenLayers.LonLat(lon, lat).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject());
map.setCenter (lonLat, zoom);
--------------------------------------------------

I've tried it with and without the buffer option.

thanks, Andy

--
Andy
PGP Key ID: 0xDC1B5864

Hi Andrea,

I think Java is running out of heap space. I get this with Java 1.5 and 1.6. Where can I find the memory requirements for Geoserver? My server has a total of 750Mb including real and swap. It looks like GeoServer is currently using only 66% of total memory. As this is a development server I don't mind using nearly all the memory on the PC if possible.

thanks, Andy

Andrea Aime wrote:

Andrew Ayre ha scritto:

Hi Arne,

This morning I started my browser (GeoServer is running all the time right now) and viewed my map. Nice and fast. I added an OSM layer and it was working great. My overlay only covers Arizona so I started browsing other countries like Chile, Spain, etc. Then I went back to Arizona and... it got stuck again.

top shows java using 99.4% of the CPU time. Occasionally I see postmaster running, but not very often. java has been at the top of the top table for several minutes now and no activity in the browser.

The total table size plus indexes, etc. is 140kb. I'm using the standard polygon SLD.

In this case open a bug report on jira.codehaus.org attaching your data
and whatever client you're using and I'll try to reproduce the issue.

Cheers
Andrea

--
Andy
PGP Key ID: 0xDC1B5864

Andrew Ayre ha scritto:

Hi Andrea,

I think Java is running out of heap space. I get this with Java 1.5 and 1.6. Where can I find the memory requirements for Geoserver? My server has a total of 750Mb including real and swap. It looks like GeoServer is currently using only 66% of total memory. As this is a development server I don't mind using nearly all the memory on the PC if possible.

Which looks like you're having a memory leak of some kind. That I
don't know how to reproduce. That's why I asked for data and the client
app.

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Hi Andrea,

I increased the memory to 256M and looking at top I see java chew through it until it fails again. I will post the files as you requested. Thanks!

Andy

Andrea Aime wrote:

Andrew Ayre ha scritto:

Hi Andrea,

I think Java is running out of heap space. I get this with Java 1.5 and 1.6. Where can I find the memory requirements for Geoserver? My server has a total of 750Mb including real and swap. It looks like GeoServer is currently using only 66% of total memory. As this is a development server I don't mind using nearly all the memory on the PC if possible.

Which looks like you're having a memory leak of some kind. That I
don't know how to reproduce. That's why I asked for data and the client
app.

Cheers
Andrea

--
Andy
PGP Key ID: 0xDC1B5864

Andrea Aime wrote:

Andrew Ayre ha scritto:

Hi Andrea,

I think Java is running out of heap space. I get this with Java 1.5 and 1.6. Where can I find the memory requirements for Geoserver? My server has a total of 750Mb including real and swap. It looks like GeoServer is currently using only 66% of total memory. As this is a development server I don't mind using nearly all the memory on the PC if possible.

Which looks like you're having a memory leak of some kind. That I
don't know how to reproduce. That's why I asked for data and the client
app.

Cheers
Andrea

Here you go:

http://jira.codehaus.org/browse/GEOS-2814

Andy

--
Andy
PGP Key ID: 0xDC1B5864

Woah... that FAQ item has not been updated since GeoServer 1.3. In fact, we now require Java 1.5 for 1.7.x (and 2.x betas). Java 1.6 should work too, it's good you mention it though, in case there are differences.

I've updated that entry in the FAQ.

-Arne

Andrew Ayre wrote:

I just thought of something - I am using Java 1.6 (a requirement for another piece of software). The GeoServer FAQ mentioned that there are problems with Java 1.5. I don't see any errors on stdout. Could this be the cause though?

Andy

Andrew Ayre wrote:

Hi Arne,

This morning I started my browser (GeoServer is running all the time right now) and viewed my map. Nice and fast. I added an OSM layer and it was working great. My overlay only covers Arizona so I started browsing other countries like Chile, Spain, etc. Then I went back to Arizona and... it got stuck again.

top shows java using 99.4% of the CPU time. Occasionally I see postmaster running, but not very often. java has been at the top of the top table for several minutes now and no activity in the browser.

The total table size plus indexes, etc. is 140kb. I'm using the standard polygon SLD.

thanks, Andy

Arne Kepp wrote:

Depends on how big the table is and the SLD (style) you are applying ?

Running "top" on the server while making the request may also shed some light, whether it's java, postgres or iowait that are taking all the CPU.

-Arne

Andrew Ayre wrote:

Hi! I'm running GeoServer 1.7.3 with PostgreSQL 8.1/PostGIS. I have a single table containing six polygons. I am using OpenLayers to visualize this data. The server is Debian Etch.

I'm finding the loading of the WMS data seems to be a bit slow. Here is a screenshot showing the details from Firebug:

   http://files.britishideas.com/public/mapping/wmsload.gif

As you can see the four accesses to the WMS server all took longer than 47 seconds. The PC accessing the web page is on the same wired LAN as the server running GeoServer. I have no speed problems getting Osmarender tiles from a remote server in other tests.

Are there any hints or tips on how I can speed this up? Here is a snippet of Javascript that I am using:

--------------------------------------------------
map = new OpenLayers.Map ("map", {
   controls:[
     new OpenLayers.Control.Navigation(),
     new OpenLayers.Control.PanZoomBar(),
     new OpenLayers.Control.Attribution(),
     new OpenLayers.Control.LayerSwitcher()],
     maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
     maxResolution: 156543.0399,
     numZoomLevels: 19,
     units: 'm',
     projection: new OpenLayers.Projection("EPSG:900913"),
     displayProjection: new OpenLayers.Projection("EPSG:4326")
} );

var wms = new OpenLayers.Layer.WMS("Test", "http://myserver.net:8080/geoserver/wms",
   {
     layers: 'test:pima', tiled: 'true'
   },
   {buffer: 0}
);
map.addLayer(wms);

var lonLat = new OpenLayers.LonLat(lon, lat).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject());
map.setCenter (lonLat, zoom);
--------------------------------------------------

I've tried it with and without the buffer option.

thanks, Andy

--
Arne Kepp
OpenGeo - http://opengeo.org
Expert service straight from the developers