[Tile-serving] [openstreetmap/mod_tile] memory consumption (#181)
Stephan
notifications at github.com
Mon Apr 5 07:47:16 UTC 2021
I figured out the source for my memory leak in PostgreSQL. It is a problem with JIT leaking memory. Upstream in Bug 16707:
https://www.postgresql.org/message-id/flat/16707-f5df308978a55bf8%40postgresql.org
So if you have the symptom, that RssAnon of your postgres backend is continuously increasing check whether tuning off JIT helps.
use ps to figure out one or mire PIDs of the backends in use by user osm:
# ps auxw | grep -E "postgres: osm"
postgres 1340 34.4 0.0 3884840 100620 ? Rs 07:01 12:22 postgres: osm gis 172.20.0.3(36596) SELECT
postgres 1341 31.8 0.0 3874076 95448 ? Rs 07:01 11:26 postgres: osm gis 172.20.0.3(36594) SELECT
postgres 1342 34.5 0.0 3875604 97188 ? Ss 07:01 12:24 postgres: osm gis 172.20.0.3(36598) idle
postgres 1343 35.3 0.0 3873320 94616 ? Rs 07:01 12:40 postgres: osm gis 172.20.0.3(36600) SELECT
postgres 1344 34.4 0.0 3876880 98176 ? Ss 07:01 12:21 postgres: osm gis 172.20.0.3(36602) idle
postgres 1391 32.4 0.0 3882716 98844 ? Rs 07:01 11:34 postgres: osm gis 172.20.0.3(36640) SELECT
postgres 1396 32.8 0.0 3874436 96100 ? Rs 07:01 11:42 postgres: osm gis 172.20.0.3(36642) SELECT
postgres 1444 34.1 0.0 3874480 96336 ? Ss 07:01 12:05 postgres: osm gis 172.20.0.3(36674) idle
Then check out RssAnon memory allocation:
# grep RssAnon /proc/1340/status
RssAnon: 48316 kB
This value should stay relatively constant during rendering activity. Mine did increase with a rate of roughly 250MB/hour.
If affected, check whether you have JIT enabled.
# echo "SHOW jit;" | psql -U postgres
jit
-----
on
(1 row)
If this shows **on**, you can likely fix the leak by turning it off. Either in the configuration file or by alter system.
# echo "ALTER SYSTEM SET jit=off; SELECT pg_reload_conf();" | psql -U postgres
According to upstream reports, the leak exists since PostgreSQL 12. So at least the leak within PostgreSQL mentioned in this bug report is addressed. The potential leak inside renderd might still be there.
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/mod_tile/issues/181#issuecomment-813253225
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20210405/0fe9a232/attachment.htm>
More information about the Tile-serving
mailing list