I'm facing a somewhat weird phenomenon I can't explain regarding to CPU/core usage. I run a couple of Docker containers on an Ubuntu machine with OpenPLC running inside the containers. The only interesting part to know about this is that when I redeploy to that PLC it runs the g++ compiler to recompile a program. I have one extra container that controls these redeployments.
So if I redeploy my program to 4 containers, 4 g++ processes will spawn and do work. Around the 4 PLC mark my i3-2310M CPU has all cores at 100%. Here I have a graph with number of containers I deploy to and the time it takes to receive data again when they're done redeploying.
These are means of 5 test runs and the error bars signify standard error. It's obvious that the time should increase as more g++ processes run, but the way it increases is something I can't explain. I would have expected linear increase.
These PLC containers send Modbus/TCP packets to the controlling container and I measure the time with Wireshark between the last message before redeploying and the first message after.
Any possible explanations for this weird pattern?