How to implement smarter container provisioning for LXD Cluster?

LXD doesn’t provide any CPU load avg information, so you would need to pull that data in yourself and create containers based on your own metrics / judgements. (LXCFS can now provide per container load avgs)

From the LXD side its probably much easier to do a round robin approach as CPU load avgs can change pretty quick (i know you have 1/5/15 minute load avgs but that doesn’t mean loads don’t spike) so it can be hard to analyse and judge where is best to deploy a container.

For example if I have an LXD host dedicated to running cron jobs once an hour and I looked at the load avgs it would be quite low, so I think great and deploy a web server to it, once an hour when the cron jobs cause a spike its possible it could cause the web server to drastically slow down / be non-responsive (a pretty unlikely scenario but you get the idea)