change rerendering for zoom 13-14 tiles, change prio for daily rerenderings to be...
authorUser for running Openstreetmap-things <osm@osm.rrze.uni-erlangen.de>
Sat, 31 Jan 2015 22:43:44 +0000 (23:43 +0100)
committerUser for running Openstreetmap-things <osm@osm.rrze.uni-erlangen.de>
Sat, 31 Jan 2015 22:43:44 +0000 (23:43 +0100)
scripts/dailymaint.sh
scripts/doosmupdate.sh

index 5e4bc85d69cc7a4d1487b43f0eac623fa9d27634..dbe2a41ad937e8ca987c166e0dc50da42b064923 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 echo "Daily maintenance starting: `date`"
 # Delete tiles in zoomlevel 13-14 that are older than 336 hours = 14 days
@@ -12,10 +12,18 @@ sudo -u tirex -- /home.local/osm/bin/osmtilecleanup.pl --zoom 15-20 --action del
 sudo -u tirex -- /home.local/osm/bin/osmtilecleanup.pl --zoom 10-20 --action delete --rmemptydirs --minage 24 /var/lib/tirex/tiles/rrze-ovl
 # Regenerate a part of zoomlevel 0-12 tiles. There are at most 350000 such tiles.
 # At 5000 a day, it'll take 70 days to regenerate all. As they hardly ever change, that should be fine.
+export PRIO=31
 /home.local/osm/bin/osmtilecleanup.pl --zoom  0-12 --action rerender \
                                       --limit 5000 --rrs /home.local/osm/bin/osmrerenderwrapper.sh /var/lib/tirex/tiles/osm
 /home.local/osm/bin/osmtilecleanup.pl --zoom  0-12 --action rerender \
                                       --limit 5000 --rrs /home.local/osm/bin/osmrerenderwrapper-osmde.sh /var/lib/tirex/tiles/osmde
+# Regenerate (part of) zoomlevel 13-14 tiles. Some of these are pretty expensive, so
+# we rather rerender them scheduled than when they change (usually they really don't,
+# it is 99 percent false alerts).
+/home.local/osm/bin/osmtilecleanup.pl --zoom  13-14 --action rerender \
+                                      --limit 1000 --rrs /home.local/osm/bin/osmrerenderwrapper.sh /var/lib/tirex/tiles/osm
+/home.local/osm/bin/osmtilecleanup.pl --zoom  13-14 --action rerender \
+                                      --limit 1000 --rrs /home.local/osm/bin/osmrerenderwrapper-osmde.sh /var/lib/tirex/tiles/osmde
 # Update tile stats for munin
 tirex-tiledir-check --stats=/var/lib/tirex/stats/tiles-osm.stats osm
 tirex-tiledir-check --stats=/var/lib/tirex/stats/tiles-osmde.stats osmde
@@ -28,8 +36,8 @@ if [ "$DOW" == "6" -o "$DOW" == "3" ] ; then
 fi
 
 # Rerender Erlangen / Nuernberg. Around 4000 tiles, takes around 30 minutes.
-tirex-batch --prio=22 --expire=+14400 map=osm bbox=10.93,49.37,11.14,49.63 z=13-19
-tirex-batch --prio=22 --expire=+14400 map=osmde bbox=10.93,49.37,11.14,49.63 z=13-19
+tirex-batch --prio=${PRIO} --expire=+14400 map=osm bbox=10.93,49.37,11.14,49.63 z=13-19
+tirex-batch --prio=${PRIO} --expire=+14400 map=osmde bbox=10.93,49.37,11.14,49.63 z=13-19
 
 echo "Daily maintenance finished: `date`"
 
index 9491349eb7b0435b15744713a4a167e9be738c6e..3a8fc11ed9d4a45cf7c696066caa08add34d5282 100755 (executable)
@@ -11,7 +11,7 @@ WEBSTATEFILE=/var/www/lastdbupdate.txt
 UPDATECMD="/usr/bin/osm2pgsql --slim --cache=8000 --append --database=osm \
            --style=/home.local/osm/dbstyle/osm2pgsql-new.style \
            --flat-nodes=/mnt/database/flatnodes/flatnodes.db \
-           --hstore --expire-tiles=17-17 \
+           --hstore --multi-geometry --expire-tiles=17-17 \
            --expire-output=$EXPIRYFILE  $CHANGESFILE"
 
 cleanup()
@@ -68,16 +68,17 @@ echo "Update seems to have been successful."
 grep timestamp $OSMOSISWORKDIR/state.txt | sed -e 's/timestamp=//g' -e 's/T/ /g' -e 's/\\:/:/g' > $WEBSTATEFILE
 echo -n "Updated database: now at upstream state of "
 cat $WEBSTATEFILE
-touch /var/lib/tirex/tiles/planet-import-complete
+#touch /var/lib/tirex/tiles/planet-import-complete
 if [ -e $EXPIRYFILE ] ; then
        echo "Expiryfile exists. Telling tirex to rerender the tiles mentioned there..."
        echo "Number of lines: `wc -l $EXPIRYFILE`"
+       # Used to be zoom 13-20 but that causes too much load. Reduced to 15-20.
        cat $EXPIRYFILE | /home.local/osm/bin/osmtilecleanup.pl \
-                                   --action rerenderexpiredlist --zoom 13-20 \
+                                   --action rerenderexpiredlist --zoom 15-20 \
                                    --rrs /home.local/osm/bin/osmrerenderwrapper.sh \
                                    /var/lib/tirex/tiles/osm
        cat $EXPIRYFILE | /home.local/osm/bin/osmtilecleanup.pl \
-                                   --action rerenderexpiredlist --zoom 13-20 \
+                                   --action rerenderexpiredlist --zoom 15-20 \
                                    --rrs /home.local/osm/bin/osmrerenderwrapper-osmde.sh \
                                    /var/lib/tirex/tiles/osmde
        rm $EXPIRYFILE
This page took 0.253849 seconds and 4 git commands to generate.