[Tile-serving] osm2pgsql - Disk usage
Frederik Ramm
frederik at remote.org
Sun Apr 21 23:02:09 UTC 2019
Hi,
On 21.04.19 21:15, JunkMail wrote:
> I have imported all of the nodes, ways, and routes. Currently, it is
> "sorting data and creating indexes". However, I am quickly running out
> of disk space. I have already deleted the pbf file(will this cause
> issues? I assumed it was no longer needed) and only have 15GB remaining.
> I worry I will run out of space before it completes.
480 GB will be sufficient for the final database but it could indeed
happen that you *temporarily* need a bit more.
> At this point of the import, am I safe to delete the flat file? Using
> fuser, I found that there are no processes accessing it.
It is not needed any more. Though I'm not 100% sure if osm2pgsql will
not try to delete the file later and then complain that it's not there
any more ;)
> I have two other(significantly less urgent) questions. First of all, is
> it possible to use nginx instead of apache for serving tiles?
Not with mod_tile. You can look into using nginx+mapproxy+mapnik for
rendering, or nginx+mapserver+mapcache, but in both cases you'll be far
away from what everyone else does, and that tends to make things more
difficult.
> Second of all, I
> plan on moving the server from the SSD to an HDD after the import is
> complete. Will I experience disk bottlenecks when serving tiles off the
> disk? I will not be updating the database in the future.
Yes. Of course, if you can find a way to pre-render all the tiles you
need, then that will be a non-issue, and you don't need to move the
database at all, you can simply stuff the tiles into a huge mbtiles file
and serve from that. *That* would then also get rid of mod_tile and you
could use any web server you want. Of course that's only possible if you
need the world on z0-12 or z0-13 at most, or maybe a few selected areas
down to higher zooms.
Bye
Frederik
--
Frederik Ramm ## eMail frederik at remote.org ## N49°00'09" E008°23'33"
More information about the Tile-serving
mailing list