Hi, for reference, we have an open issue about updating the number of tasks Increase the default maximum number of tasks for balenaEngine · Issue #1844 · balena-os/meta-balena · GitHub.
We would like to find a way to increase it just for the engine and not for all the system units as the global change would do.
Also, re-mounting the filesystem and making changes to the filesystem is something we do not recommend or suggest unless it is the debug specific problems. Also, the changes will be lost when you perform a hostOS update.
Anyway, changing the global systemd configuration is device independent and should work for both the examples you provide.
Maybe you misunderstand what I have been doing to increase the max number of threads.
Our solution did not require any re-mount of the filesystem, no hostOS access and thus no changes were lost even on hostOS upgrades.
We increased the thread limit by commanding this in our main application container itself: echo "DefaultTasksMax=12000" >> /etc/systemd/system.conf
… and so far this has worked for intelNUC as described above.
But when using the generic X86 image, this has no effect.