You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

GeoServer WMS结合OpenLayers与OSM数据性能缓慢问题求助

地图服务渲染性能优化求助

我是GIS领域新手,基于PostgreSQL/PostGIS、GeoServer、OpenLayers及OSM数据搭建地图服务,当前仅覆盖北美大陆,但在缩放级别2下渲染包含道路、边界和土地利用属性的完整地图耗时约20秒,无法满足使用需求。

数据库配置

类型服务商版本内存虚拟CPU存储容量存储类型提供的IOPS存储吞吐量
PostgresqlAWS RDS13.7128GB162TBgp3 SSD12,000500 Mibps

数据库调优参数

Shared BuffersWork MemMain. Work MemAutoVac Work MemCheckpt TimeoutMax Wal SizeCheckpt Completion TargetMax Wal SendersRandom Page Cost
125 MB3 GB10 GB2GB60 Min10GB0.951.0

目前仅1位用户使用该服务,数据库CPU利用率从未超过20%,我认为数据库并非问题所在,但仍希望帮忙检查配置。

GeoServer配置

GeoServer运行在ECS集群的Docker容器中,实例为t3.2xlarge,配置32.0 GB内存和8 vCPU。相关配置包含以下截图:

  • DataStore配置
  • 服务器状态
  • 系统状态1
  • 系统状态2

GeoServer似乎并未充分利用分配的CPU或内存。

前端OpenLayers代码

let extent: Ext.Extent
let locations_layer: VectorLayer<VectorSource<Geometry>>
if (location_list.length > 0) {
    console.log(bbox)
    extent = createExtentFromBoundingBox(JSON.parse(bbox))
    console.log(extent)
    const location_features = createLocationFeatures(JSON.parse(location_list));
    console.log(location_features)
    const locations_source = new VectorSource({ features: location_features });
    locations_layer = new VectorLayer({ source: locations_source });
} else {
    extent = null

}
const view = new View({ center: [0, 0], zoom: 2 });


const main_roads = new Tile({
    source: new TileWMS({
        url: 'http://3.129.23.222/geoserver/wms',
        params: { LAYERS: 'atlas-workspace:planet_osm_roads', TILED: true },
        serverType: 'geoserver',
        transition: 0
    })
});

const polygon = new Tile({
    source: new TileWMS({
        url: 'http://3.129.23.222/geoserver/wms',
        params: { LAYERS: 'atlas-workspace:planet_osm_polygon', TILED: true },
        serverType: 'geoserver',
        transition: 0
    })
});

const supporting_roads = new Tile({
    source: new TileWMS({
        url: 'http://3.129.23.222/geoserver/wms',
        params: { LAYERS: 'atlas-workspace:planet_osm_line', TILED: true },
        serverType: 'geoserver',
        transition: 0
    })
});

const points = new Tile({
    source: new TileWMS({
        url: 'http://3.129.23.222/geoserver/wms',
        params: { LAYERS: 'atlas-workspace:planet_osm_point', TILED: true },
        serverType: 'geoserver',
        transition: 0
    })
});

map = new Map({
    target: target,
    view: view,
    layers: [polygon, supporting_roads, main_roads, points]
})

view.fit(extent);
});

服务可访问地址:http://3.19.245.25:8080/

我已查阅大量在线资料但仍未解决问题,恳请提供帮助。


内容的提问来源于stack exchange,提问作者jamesnebeker

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.10 14:50:45