<p></p>
<p>According to the <a href="https://osm2pgsql.org/doc/manual.html#caching" rel="nofollow">docs</a>:</p>
<pre><code>The rule of thumb in slim mode is as follows: use the size of the PBF file you are trying to import or about 75% of RAM, whatever is smaller.
</code></pre>
<p>But in fact seems that cache size must be above twice lager then source file.<br>
I've made tests on 2 pbf-files and it shown that for cache size equal to source file size import speed for ways just 30-40% from max possible.</p>
<p><a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/603401/111852498-3670ee80-8928-11eb-8ff3-4be8090798d7.png"><img src="https://user-images.githubusercontent.com/603401/111852498-3670ee80-8928-11eb-8ff3-4be8090798d7.png" alt="image" style="max-width:100%;"></a></p>
<p><a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/603401/111852512-44267400-8928-11eb-9033-60eea746a200.png"><img src="https://user-images.githubusercontent.com/603401/111852512-44267400-8928-11eb-9033-60eea746a200.png" alt="image" style="max-width:100%;"></a></p>
<p><a href="https://docs.google.com/spreadsheets/d/1IjCndMOyr6cM2FDRu53ASZdIR6ZdmUeqoREf-V9TGGk/edit?usp=sharing" rel="nofollow">Google sheet with tests results</a>.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/osm2pgsql/issues/1431">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AA6353X2JAV6LNRJMLRBSHDTEPQT3ANCNFSM4ZPXKIRA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AA6353WT3MQTIGJSVOY42CTTEPQT3A5CNFSM4ZPXKIRKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4MO4BVVA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/osm2pgsql/issues/1431",
"url": "https://github.com/openstreetmap/osm2pgsql/issues/1431",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>