Hi, We have started to build a tile server. I have installed Mapnik and mod_tile on the server (Fedora 21, 64GB RAM, 8 Cores 2.5GHz) and the standard openstreetmap-carto stylesheet is used for rendering tiles. The problem is, openstreetmap-carto stylesheet's quries are really slow on our database. Some of the queries take few seconds to complete! Here are few examples queries from postgresql log file with a very long duration time: log file For some queries (for instance this one) the result set contains more than 120K records! does standard layout really need to fetch this many records to render some of the tiles? Here are more details about the steps I took to build the map server: I used this command to import data into database: osm2pgsql --create --slim --latlong --hstore --hstore-match-only --number-processes 4 --cache 20000 --style default.style --input-reader pbf planet-latest.osm.pbf All the indexes are in place (I added few more indexes suggested here which helped a bit but still queries are too slow) I also ran vacuum(analyze, verbose); kernel.shmmax is 8589934592 In postgres.config file we have: I really appriciate any help! asked 10 Nov '15, 17:29 khamooshi |
I have a similar issue, it turned out that in the osm carto style the srid parameter is missing and mapnik run an expensive query to find it. Adding the line "srid: 900913" under "osm2pgsql" section of project.yaml improved the performances dramatically. answered 15 Dec '15, 16:18 Stefano Salv... |