Pytorch impeded performance with internet connect

lostalot: <p>I have been training two neural networks on a computer with two graphics cards.  Each pytorch/python is run in its own instance of Spyder, and each runs on its own graphics card.</p>
<p>Training per epoch for each card is consistent 14.xx seconds when NOT connected to the internet.  However when simply connecting to the internet, the training time per epoch begins to alternate for each epoch 14.xx, then 16.xx, then 14.xx seconds.  This occurs in both instances.</p>
<p>When I simply unplug the WAN connection to the internet, (leaving the local network alone) the epoch training stabilizes to 14.xx seconds per epoch for each card.</p>
<p>The system is a server running Ubuntu 22.04, nothing else is running on it.  The only difference that causes the change in performance is connecting to the local network to the internet, and not.</p>
<p>I suspect I am I missing something very basic.  Can anyone provide any insight as to what is causing this?</p>

ptrblck: <p>Could you check if any processes are spawned once you are connected which could then slow down the CPU? A full profile with a timeline (e.g. via Nsight Systems) should also show it in case the CPU has trouble keeping up.</p>

lostalot: <p>Keeping in mind that the server is on a local 10Gbe hub, and that hub is connected to a 1Gbe switch that runs the dhcp. It is the switch’s connection to the internet that I am connecting/disconnecting, and which causes the issue, while not touching anything else.</p>
<p>There are roughly 1322 processes and 1 user as reported by gkrell, with the combined processor running between 24% and 40%.   I am not seeing any process other than python processes moving on the CPU utilization list, which varies with the epoch processing.  as shown below.</p>
<p>I will have to install the Nsight system.</p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/4/f/4f6194cb64697b1c629ef9796d2f1aa22689f64e.png" data-download-href="https://discuss.pytorch.org/uploads/default/4f6194cb64697b1c629ef9796d2f1aa22689f64e" title="system_load1"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/4/f/4f6194cb64697b1c629ef9796d2f1aa22689f64e_2_385x500.png" alt="system_load1" data-base62-sha1="bkeMNaaJ6eRVqAd3dqSLR1y9bQi" width="385" height="500" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/4/f/4f6194cb64697b1c629ef9796d2f1aa22689f64e_2_385x500.png, https://discuss.pytorch.org/uploads/default/optimized/3X/4/f/4f6194cb64697b1c629ef9796d2f1aa22689f64e_2_577x750.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/4/f/4f6194cb64697b1c629ef9796d2f1aa22689f64e_2_770x1000.png 2x" data-dominant-color="EAE9E9"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">system_load1</span><span class="informations">780×1011 279 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p>For reference the system is running a xeon w5-3435x, a x13swa-tf server board, and two rtx3090ti gpus</p>

lostalot: <p>This appears to be an issue with how systemd-timesyncd works on Ubuntu 22.04.<br>
I couldn’t find any processes that were magically starting when I connected the switch to the internet.<br>
But I did notice that there were NTP calls going out, that could not go out when the internet was disconnected.   Creating an NTP server on the local network and pointing the server to it solved the problem.  Now there is consistent time between epochs being reported with and without the switch connected to the internet.  SOLVED.</p>