Ideal containers count for a lot of services. Recommend me please CPU+RAM settings for containers!

MrBruce

New Member
Mar 7, 2020
25
3
3
Hi everyone

My hardware + software for work 0-24 all day as home server:
CPU i7-4790K, 32GB RAM but if not needed all, I can use with only 16GB too.
HDD: 2x 1TB HDD (Seagate Enterprise Capacity, ST1000NM0008) with software raid
Latest Debian + software raid + latest Proxmox install, all works fine.
I know, with SSD will be better. Maybe if too slow, i replace HDD to SSD. But for start I try this.

These services are needed:

samba: file sharing: movies, music (for raspberry pi music players) and for windows notebooks for movies, music all about 200GB
nfs and tftp: raspberry pi network boot and usage without disk. For 4 raspberry pi with sensors, posting data to mqtt
mysql: for zabbix 5 monitoring, for home assistant and for sensor data
redis: for emoncms
mqtt: for raspberry pi for sensor data manage
influxdb: for sensor data
rrdtool: for sensor data visualization
grafana: for sensor data visualization
emoncms (PHP 7.0.30): for power usage data stats and visualization
zoneminder (PHP: 7.4): for security, with 3 web usb webcam
zabbix 5 (PHP: 7.4): monitoring devices and alarms
home assistant: home automation, sensor data triggers
qbittorrent: for downloading

My plan to use only possible the minimum count of LXC containers, my current settings:

4 cores, 12GB ram, 100 file sharing: samba tftp nfs , qbittorrent
4 cores, 20GB ram, 101 databases: mysql, redis, MQTT influxdb
4 cores, 12GB ram, 102 monitoring: zabbix 5, zoneminder, emoncms, home assistant (Python), grafana, rrdtool

But now I see: nfs not working at same machine as the samba, etc.

Please recommend me an ideal container count with a recommended services at same container.
Also, how many ram and CPU recommended for that. Or other settings what optimal for that.
You recommend me to use only 16GB of ram instead of 32GB?
Reason why I share more ram than I have: if any container not using all ram, others can use. It's good idea or not?
 
You have even more control. For example (from the reference documentation):
it is perfectly valid to assign two cores to a container, but restrict overall CPU consumption to half a core.


But now I see: nfs not working at same machine as the samba, etc.
The overhead for creating more containers is not really big. I'd just create another container.
Please recommend me an ideal container count with a recommended services at same container.
I'd choose the amount of containers so that the amount of problems like your nfs-samba-problem is minimal.

You recommend me to use only 16GB of ram instead of 32GB?
The more the better.

Maybe if too slow, i replace HDD to SSD. But for start I try this.
You could use the same idea "just try it and change if necessary" for the resources of your containers. Assigning a different amount of RAM or CPU for containers only takes a few clicks in the GUI.
 
  • Like
Reactions: MrBruce
You have even more control. For example (from the reference documentation):

Thank you, I reading more about this. Currently no load at server.
I should add more containers then.

The reason I thinking with less container:
I have not using any about services just ssh to host and I see stable 0.4 load. I think it's high load for 3 idle container with few installed services what do nothing.

Possible to disable many services in Ubuntu 18 LTS containers to use less CPU? Any safe service disable list? Like no need sound, etc.
 
load == "Load average" in the Summary GUI of your host?

There is a list of services for your Proxmox VE host in the wiki. You should be able to disable some services in your guests, but because of the infinite amount of possible guest types and different requirements we cannot maintain a general "safe disable list".
 
  • Like
Reactions: MrBruce
load == "Load average" in the Summary GUI of your host?

Yes.

Thank you for list, very helpful.
Maybe possible way to get lower "load average" to disable services inside in LXC container, currently disable Ubuntu 18 LTS services what not needed, right? I preferred to optimize containers services first, and if needed after the Proxmox services.

Thank you again.
 
Taking into account that (see e.g. this explanation)
  • in a multicore system 1 is not full load
  • and in Linux load is not only CPU load (use something like htop to view cpu utilization)
0.4 load does not look high to me. I personally would prioritize getting your services running using a setup of containers that makes this as easy as possible. Then you see how much resources really need and avoid spending time on early optimization based on assumptions about what you might need.
 
  • Like
Reactions: MrBruce
If you think you will soon have more questions about this, you can leave this thread open. Otherwise it would be great if you could mark the thread as 'solved' by editing your opening post :) This way others know what to expect. Of course, you can always open a new thread if a new issue comes up!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!