VM vs Kubernetes: Performance 🚀

  Рет қаралды 2,059

Anton Putra

Anton Putra

Күн бұрын

Пікірлер: 35
@AntonPutra
@AntonPutra 3 сағат бұрын
🔴 To support my channel, I'd like to offer Mentorship/On-the-Job Support/Consulting (me@antonputra.com) 🍿 Benchmarks: kzbin.info/aero/PLiMWaCMwGJXmcDLvMQeORJ-j_jayKaLVn&si=p-UOaVM_6_SFx52H 👋 AWS is expensive - Infra Support Fund: buymeacoffee.com/antonputra
@martinhotmann7868
@martinhotmann7868 3 сағат бұрын
Aaaah K8s vs Docker vs LXC vs VM would be awesome! :) All on the same HW of course.
@9inl
@9inl 3 сағат бұрын
2:22 Would you please do another one with VM vs Kubernetes but with Cilium eBPF networking instead of kube proxy?
@ayr-ton
@ayr-ton 3 сағат бұрын
Now we have opened a pandora box. Which is the fastest networking module for Kubernetes? Don't miss the next episodes.
@vadimlazovskiy8621
@vadimlazovskiy8621 2 сағат бұрын
Thanks for the video! Certain flaws in your testing methodology led to the results you've got. First, using ClusterIP service in K8s vs. VM IP is unfair. An IP-address from a service network is allocated for ClusterIP service (without `clusterIP: None` set). In your case your requests traffic goes through some iptables DNAT rules or eBPF program (depending on the CNI used), hence latency increases. Consider running your benchmark with a headless service (clusterIP: None set). Second, what is the purpose of setting CPU limits on a dedicated instance? Hitting cgroups limit is not the same as hogging the entire CPU time available, like you have in case of VM benchmark. Though achieving the same available CPU time in K8s vs. VM is not feasible due to the presence of kubelet and bunch of DaemonSet pods at the K8s instance, you are still capable of not worsening things. Just set the requests.cpu to maximum allocatable value for the node and remove the limits.cpu. Your container's cgroup will have the maximum available cpu.weight and this will have an effect for the process scheduling.
@dnfrd3187
@dnfrd3187 3 сағат бұрын
K8s clusters as can be found in providers reside on top of VMs. I guess results would be quite different for K8s deployed on bare metal...
@BakhtiyarGarashov
@BakhtiyarGarashov 2 сағат бұрын
I believe VM will still perform better than bare metal k8s cluster.
@nikolaibarinov8660
@nikolaibarinov8660 Сағат бұрын
Is it correct to run tests on the different CPU architectures? Gravitron in EKS and AMD in VM?
@Malix_Labs
@Malix_Labs 3 сағат бұрын
Hey Anton! It would be extremely interesting to see the difference with Talos (Kubernetes as an Operating System, bare metal, not even SSH or anything else in the OS)
@ramonpereira4460
@ramonpereira4460 3 сағат бұрын
What I've seen is that k8s is great for multiple apps, multiple machines, complex applications. For a simple app, I'd always use a VM or even something like AppEngine. Thanks again, Anton.
@soyangel1
@soyangel1 3 сағат бұрын
To complement this maybe you can check vs bare metal. On a provider like Hetzner you can get nice hardware for a little more than 30€/month and no setup fee (check server auction there). I'm not sure if the investment is worth for you, maybe you can run several tests on this server during that month 🤔
@Antipolitisch
@Antipolitisch Сағат бұрын
I think the flexibility and scalability of kubernetes makes this price compared to a vm more than affordable.
@Antipolitisch
@Antipolitisch 8 минут бұрын
Can you please redo the test and instanciate another kubernetes instance? I'm interessted if the kubernetes advantage of scalability can work around the fact, that more input output will bring compared to vm
@ricardopieper11
@ricardopieper11 3 сағат бұрын
So, cloud kubernetes chops off ~20% of your peak performance... good to know.
@danielh6453
@danielh6453 46 минут бұрын
My two cents: The performance difference in this example is that K8S uses iptables and ipvs to route traffic at the kernel level, whereas a VM has no need to use any abstraction; it can go directly to the endpoint. So although this example has correctly shown K8S is slower, it has really shown that K8S is slower because it uses kernel-level service discover, and if you don't need service discovery, a direct VM is a better choice. This is your point, I think, and demonstrated well.
@danielh6453
@danielh6453 27 минут бұрын
With that said, if you need service discovery, Kubernetes uses kernel-level performance to do so
@90hijacked
@90hijacked 34 минут бұрын
Random request, what about benching NATS/JetStream ? It boasts of lots of features comparable to Redis/Rabbit/Kafka/...
@banglaLang
@banglaLang 3 сағат бұрын
Would you please do another one with VM vs Kubernetes but with Go or Rust
@svetlinzarev3453
@svetlinzarev3453 43 минут бұрын
this should definitely be tried with rust
@sebastiengauthier58
@sebastiengauthier58 Сағат бұрын
You should try again with a CPU limit set as an integer, otherwise your pod will have a different QoS class. You need to have a “guaranteed” QoS class. If you want to go further you can set CPU manager policy to static to effectively pin CPU cores which also improves performance in some scenarios.
@ninele7
@ninele7 3 сағат бұрын
What would happen if you use more performant app in deployment? Maybe Kubernetes overhead would be even more noticeable?
@franciscopena7859
@franciscopena7859 Сағат бұрын
A better comparison would be kubevirt vs normal pod. K8s has a lot of resource "virtualization" built into it
@kamurashev
@kamurashev Сағат бұрын
Great stuff!
@Sergey-b2e
@Sergey-b2e 2 сағат бұрын
And what about the price? What will be cost effective?
@pandatv3994
@pandatv3994 2 сағат бұрын
Postgres SQL on VM vs. Kubernetes
@toddfisher8248
@toddfisher8248 3 сағат бұрын
now do this with dedicated instances vs vm's
@maxcoder95
@maxcoder95 3 сағат бұрын
Knative vs Lambda vs Cloud Run will be a good comparison but will be very expensive 😂
@jhonbrugg
@jhonbrugg 2 сағат бұрын
app engine também :)
@iddiiddrisu5971
@iddiiddrisu5971 3 сағат бұрын
Let's go!! VM should eat kube
@The_real_jamal
@The_real_jamal Сағат бұрын
K8s vs swarm 🙂
@jhonbrugg
@jhonbrugg 3 сағат бұрын
This bugged my mind, how does the vm have better performance than k8s?
@Grahamaan27
@Grahamaan27 3 сағат бұрын
It's pretty expected if you ask me. K8s has a ton of overhead. A service on a VM is very minimumal from the guest and application perspective (but more from the host perspective)
@kh0lis
@kh0lis 2 сағат бұрын
It is expected for simple apps. K8s use tons of layers...
@ikhwanrizqynurzaman7579
@ikhwanrizqynurzaman7579 2 сағат бұрын
Because of the overhead and layers abstraction in k8s. This overhead will become larger if we use larger replicaset. The main major benefit of using k8s is the convenience of deployment and scalability. Especially if your system has tens of applications running
@deado7282
@deado7282 2 сағат бұрын
Anton is drawing the wrong conclusions from his results. Kubernetes is just API's. It does not implement most stuff by itself. It's much more about the concrete implementations you pick for those API's. Anton is using a pretty standard EKS & applying most of it's defaults. Those are generally not tuned towards performance but convenience. First: EKS runs on top of VM's. So there is no chance of outperforming Applications running directly on those VM's anyway. It's pretty easy to create a Kubernetes Cluster on Bare Metal that outperforms minimal KVM+QEMU VM's, which is one the most performant VM Setup. Even if you combine both by using KQEMU VM's as Nodes for your cluster you would achieve vastly better results than those shown in the video.
FastAPI (Python) vs Node.js Performance
8:39
Anton Putra
Рет қаралды 8 М.
Nginx vs Traefik Performance (Reverse Proxy)
13:18
Anton Putra
Рет қаралды 29 М.
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 23 МЛН
IL'HAN - Qalqam | Official Music Video
03:17
Ilhan Ihsanov
Рет қаралды 700 М.
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН
Redis vs Memcached Performance Benchmark
8:44
Anton Putra
Рет қаралды 33 М.
Nginx vs Caddy Performance
15:27
Anton Putra
Рет қаралды 33 М.
SQLite vs PostgreSQL Performance
14:01
Anton Putra
Рет қаралды 43 М.
Nginx vs Apache Performance
14:57
Anton Putra
Рет қаралды 40 М.
Python (FastAPI) vs Go (Golang) Performance Benchmark
8:47
Anton Putra
Рет қаралды 29 М.
MongoDB vs. PostgreSQL: Performance & Functionality
14:35
Anton Putra
Рет қаралды 34 М.
Kafka vs RabbitMQ Performance
9:21
Anton Putra
Рет қаралды 44 М.
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 23 МЛН