0
votes

Each linux machine can only open up to a certain number of concurrent socket 64k (theoretically), usually only around 20K max. What if I have multiple vmware machines running in a single physical hardware (assuming i install vmware on the barebone hardware). Will each virtual machine can open up to 20K socket? Or all of them will still be limited by the physical machine of 20k.

Thanks,

Sean Nguyen

1
Why do you think there is a theoretical limit of 64K sockets? That is the number of ports but it is very easy exceed that -- the only restriction is that each socket has a unique (source address, source port, dest address, dest port) 4-tuple. - Roland

1 Answers

1
votes

There's no one-to-one mapping between sockets in the guests and sockets on the host. So the sum of the socket counts for the guest may well exceed the limits of the host. The hypervisor only has to expose/emulate a network card and the guest OS has to handle sockets on its own.

Try running your favourite OS inside KVM on Linux, open a few webpages in the guest and then run on the host:

lsof -p $(pidof kvm) | grep -i sock

Bottom line: each VM can open any number of socket within the limits of the guest OS.