<p></p>
<h2 dir="auto">What version of osm2pgsql are you using?</h2>
<blockquote>
<p dir="auto">osm2pgsql --version<br>
2023-07-23 22:08:09 osm2pgsql version 1.8.1 (1.8.1-183-g5dba2405)<br>
Build: RelWithDebInfo<br>
Compiled using the following library versions:<br>
Libosmium 2.19.0<br>
Proj [API 6] 8.2.1<br>
Lua 5.1.4 (LuaJIT 2.1.0-beta3)</p>
</blockquote>
<h2 dir="auto">What operating system and PostgreSQL/PostGIS version are you using?</h2>
<p dir="auto">Postgres version: 15.3 (Ubuntu 15.3-1.pgdg22.04+1)<br>
PostGIS version: POSTGIS="3.3.3 2355e8e" [EXTENSION] PGSQL="150" GEOS="3.10.2-CAPI-1.16.0" PROJ="8.2.1" LIBXML="2.9.13" LIBJSON="0.15" LIBPROTOBUF="1.3.3" WAGYU="0.5.0 (Internal)"</p>
<h2 dir="auto">Tell us something about your system</h2>
<p dir="auto">Bare metal 512 GB RAM, 2x Intel Xeon E5-2699 v4</p>
<h2 dir="auto">What did you do exactly?</h2>
<p dir="auto">I have been running multiple tests with both <strong>--slim</strong> and <strong>non-slim</strong> and Planet size imports in the past couple of days after upgrading to the latest master on a machine with enough RAM to hold all data in RAM if choosing to import in a <strong>non-slim</strong> mode with <strong>--flat-nodes</strong> specified.</p>
<p dir="auto">One thing I have noticed now is that consistently, the way loading in <strong>non-slim</strong> mode is about 15% <em>slower</em> than with <strong>--slim</strong>, about 70k/s for <strong>non-slim</strong> versus 85k/s for <strong>--slim</strong>.</p>
<p dir="auto">I didn't expect this, as all data is stored in RAM with <strong>non-slim</strong> mode. Both nodes and especially relations <strong>do</strong> load (much) faster (for relations I see an about 2.5x times speed increase). Admittedly, the <strong>--flat-nodes</strong> file is stored an a very capable NVMe RAID 0, but even so, I would assume data in RAM to be faster accessible.</p>
<p dir="auto">Is there any plausible explanation for this difference and the slower loading of ways in <strong>non-slim</strong> mode?</p>
<h2 dir="auto">What did you expect to happen?</h2>
<p dir="auto">Loading ways using <strong>non-slim</strong> mode is as fast or faster than with <strong>--slim</strong>.</p>
<h2 dir="auto">What did happen instead?</h2>
<p dir="auto">Loading ways using <strong>non-slim</strong> mode is about 15% slower than with <strong>--slim</strong>.</p>
<h2 dir="auto">What did you do to try analyzing the problem?</h2>
<p dir="auto">Run multiple import sessions in both <strong>--slim</strong> and <strong>non-slim</strong> mode to verify the witnessed speed difference was consistent. It was.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/osm2pgsql/issues/2013">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AA6353UEFE67VDH5URGBTFLXR2NDFANCNFSM6AAAAAA2VZ5OEQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AA6353RCEWTBTXEZLOMUYI3XR2NDFA5CNFSM6AAAAAA2VZ5OESWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHGYZ435U.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/osm2pgsql/issues/2013</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/osm2pgsql/issues/2013",
"url": "https://github.com/openstreetmap/osm2pgsql/issues/2013",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>