Reload config performance #86
|
Hi, It runs on a 2 core 4GB machine while using SQLite and all hosts and locations are using docker integration with swarm mode and service mesh both enabled. Is SQLite the issue and I should switch to PostgreSQL? If not, could a reload button on each host work to avoid reloading stuff that did not change? Thank you! |
Replies: 1 comment 3 replies
|
Hi @Kegelcizer. I recommend switching to PostgreSQL just because is a production deployment. SQLite is intended for initial tests to see if Ignition works for you. Once you decide to use it for real, a more robust solution (PostgreSQL) is recommended to lower the odds of data loss/corruption. If it helps, there's an example compose here. Regarding the delays, SQLite could be a contributing factor, but it's hard to know for sure without debugging or profiling. Another thing you can try is to override the memory limit by setting the During a reload hosts are retrieved into memory to build the config files. With 30+ hosts and 20+ locations each, a lot of memory can be used (specially using SQLite for the reasons mentioned above), leading Ignition to spend significant CPU time trying to free memory that it can't release yet because the reload process is still using it. As a result, the reload becomes very slow and CPU usage spikes. CPU usage is actually a good indicator to know if can be the memory limit or not: if it goes very high during a reload, it's a strong signal that the memory limit is too low. |
Hi @Kegelcizer.
I recommend switching to PostgreSQL just because is a production deployment. SQLite is intended for initial tests to see if Ignition works for you. Once you decide to use it for real, a more robust solution (PostgreSQL) is recommended to lower the odds of data loss/corruption. If it helps, there's an example compose here.
Regarding the delays, SQLite could be a contributing factor, but it's hard to know for sure without debugging or profiling.
Another thing you can try is to override the memory limit by setting the
GOMEMLIMITenvironment variable on the Docker container. By default Nginx Ignition uses128MiBas the limit, which is fine for the target usage scenario (homela…