<p>I have a python code where I process some data, write neo4j queries and then commit these queries to neo4j.  When I run the code on my local machine and write the output to local neo4j it doesn't take more than 15 minutes. However, when I run my code locally and write the output to noe4j pod in k8s pod it takes double the time, and when I build my code and deploy it to k8s and run that pod and write the output to neo4j pod it takes a round 3 hours. since I'm new to k8s deployment it might something in the pod configurations or settings, so I appreciate if I can get some hints</p>

MsCurious
<p>There could be few reasons of that.</p>

<p>I would first check how much resources does your <code>pod</code> consume while you are processing data, you can do that using <code>kubectl top pod</code>.
Second I would check if there are any limits inside <code>pod</code>. You can read a great deal about them on <a href="https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/" rel="nofollow noreferrer">Managing Compute Resources for Containers</a>.</p>

<p>If you have a limit set then it might be too low and that's causing the extended time while processing data.</p>

<p>If limits are not set then it might be because of how you installed <code>minik8s</code>. I think as default it's being installed with <code>4G</code> is memory, you can look at <a href="https://microk8s.io/docs/install-alternatives" rel="nofollow noreferrer">alternative methods of installing minik8s</a>. With <a href="https://multipass.run/#install" rel="nofollow noreferrer"><code>multipass</code></a> you can specify more memory to allocate.</p>

<p>There also can be a issue with <a href="https://neo4j.com/developer/guide-performance-tuning/#_page_cache_sizing" rel="nofollow noreferrer"><code>Page Cache Sizing</code></a>, <a href="https://neo4j.com/developer/guide-performance-tuning/#_heap_sizing" rel="nofollow noreferrer"><code>Heap Sizing</code></a> or <a href="https://neo4j.com/developer/guide-performance-tuning/#open-files" rel="nofollow noreferrer">number of open files</a>. Please read the <a href="https://neo4j.com/developer/guide-performance-tuning/" rel="nofollow noreferrer">Neo4j Performance Tuning</a>.</p>
