0

I have a question about a new server that I want to buy. This server has 2CPUs and 32gb of ram in total. My question is: can I use all the 32gb of ram for proxmox, and therefore for the vm, or can I use only 16gb?

1 Answers1

0

I would personally use 30GB of RAM out of 32GB, and leave 1-2GB of host RAM, for iptables, fail2ban, etc. and add some SWAP RAM on top. Same if you choose the 16GB server: 14GB for guests, 2GB for host.

Assuming you're referring to Proxmox to manage guest virtual machines, you can give it as much RAM as you want.

But, the very first thing I would do is submit a ticket to the cloud/ISP you're using and ask them if the server you want has nested virtualization.

If the server has KVM and allows "nested virtualization", you'll be fine. If not, it will struggle with more than 1 guest VM.

If the answer is yes to "nested virtualization", then you can use unlimited RAM really, and QEMU will do what it's told because all the guests will share the 2 CPUs.

If the answer is no to "nested virtualization", then the 2 CPUs with 32GB is most likely 2x vCPUs, and its going to struggle.

From experience, I doubt 2 CPUs with 32GB of ram will have "nested virt.".

You can check when you're in the server:

Enable KVM first.

sudo modprobe kvm

See if KVM works:

stat /dev/kvm
stat /dev/kvm
#  File: /dev/kvm
#  Size: 0          Blocks: 0          IO Block: 4096   character special #file
#Device: 0,5    Inode: 780         Links: 1     Device type: 10,232
#Access: (0666/crw-rw-rw-)  Uid: (    0/    root)   Gid: (   78/     kvm)
#Access: 2022-01-29 11:26:05.478771780 +0000
#Modify: 2022-01-29 11:26:05.478771780 +0000
#Change: 2022-01-29 11:26:05.478771780 +0000
# Birth: -

If you get stat: cannot statx '/dev/kvm: No such file or directory then the server will struggle, and you will most likely want a refund on that server.

You can check the CPU info too:

cat /proc/cpuinfo

Here's a virtual CPU with no nested virtualization

[root@hostname ~]# cat /proc/cpuinfo 
processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 85
model name  : Virtual CPU 82d9ed4018dd

Here's a normal CPU with virtualization

[user@hostname ~]$ cat /proc/cpuinfo 
processor   : 0
vendor_id   : AuthenticAMD
cpu family  : 23
model       : 96
model name  : AMD Ryzen 9 4900H with Radeon Graphics

Then you can watch the RAM as you use the server.

# see all RAM usage
free -mh
sickcodes
  • 81
  • 3
  • Thank you for the fantastic explanation, but is not the answer for my question.... maybe i was not clear. I want to buy a physic server and it has 2CPUs(X5650) and 32gb of ram split between the 2CPUs(16gb on the first and 16gb on the second). My question was: Can i use all the 32gb of my server or only 16gb because the ram is split? – Project_piffa Jan 29 '22 at 12:50
  • Sorry, I thought you means 2 CPU's, like 2 CPU cores, as most clouds present their offerings. It sounds like you're purchasing 2 X5650's, so that would be 6 cores on each, so 12 cores, with 24 threads between the two systems? I am unaware of being able to "aggregate" two servers. Hope that helps – sickcodes Jan 29 '22 at 12:57
  • Yeah, a server with 2 sockets and so 2CPUs (dell r710) – Project_piffa Jan 29 '22 at 13:53