Very high number of threads: better to use LXC or QEMU ?

Olivier38

New Member
Apr 26, 2024
3
0
1
Hello,

I'm a new user of proxmox VE (6.4-4) on HP 360 DL gen 10 server (2x Intel Xeon Gold 5520 / 2x (18 cores / 36 threads)), used to run in containers/VM applications with HTTP based API with long response time and high number of request per seconds.
As a results, we can easily have 10k or 20k or simultaneous requests, and thanks to legacy java application with synchronous implementation, it ends up with a single Java process with up to 20K threads. It also generates significant disk IO due to quite verbose logging...

Knowing that this synchronous implementation is not the best option to achieve performance, I wonder what would be the best option between LXC or QEMU when, for instance, 5 guests are deployed on a single physical server. I understand LXC is supposed to be faster as there is no HW emulation, but having the host single kernel with 75K threads (5x 15K) in RUNNABLE state could also globally lead to lower performance than 5 QEMU VMs, each dealing with 15K RUNNABLE threads...

I can hardly make relevant load tests to get practical responses, so I'm be glad to have theoretical answers here. ;)
Please note that we are not doing any VCPU or memory overcommitment.

Thanks.
 
I'm a new user of proxmox VE (6.4-4)
You really should not be running such an old version.
As a results, we can easily have 10k or 20k or simultaneous requests, and thanks to legacy java application with synchronous implementation, it ends up with a single Java process with up to 20K threads. It also generates significant disk IO due to quite verbose logging...
If you're running a single application (or single system) that needs all the resources of the host, there is really no point in virtualization.
 
Thanks, we will consider upgrading the version. But the my question is still valid whatever the version, right ?

I was maybe confusing. I'm running 5 different applications, each of them in dedicated containers/VMs. And each application is running about 15K threads with a traffic around 800-1000 TPS.
 
I was maybe confusing. I'm running 5 different applications, each of them in dedicated containers/VMs. And each application is running about 15K threads with a traffic around 800-1000 TPS.
If you can use containers, then that's probably always better. You can set memory and CPU limits for each (and keep some free for Proxmox that way).
 
OK but in that case the host kernel will have to cope with context switching for 75K threads... Would this still be efficient ?
 

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!