Quarkus (Java) vs Fiber (Go): Performance Benchmark in Kubernetes

  Рет қаралды 50,795

Anton Putra

Anton Putra

Күн бұрын

Пікірлер: 344
@AntonPutra
@AntonPutra 29 күн бұрын
🔴 What should I test next??? 👉 [Playlist] New Benchmarks: kzbin.info/aero/PLiMWaCMwGJXmcDLvMQeORJ-j_jayKaLVn&si=p-UOaVM_6_SFx52H
@ooijaz6063
@ooijaz6063 27 күн бұрын
Are you sure that both apps are using same amount of connections in pool? Connection pool often makes most of the performance diff in this kind of benchmark. Quarkus defaults to 20 concurrent connections, and pgpool to 4 or runtime.NumCPU() from what I have read. Have you check performance for more than 20 connections in a pool?
@AntonPutra
@AntonPutra 27 күн бұрын
@@ooijaz6063 I used the defaults, but for the next tests, I'll double-check how many connections are actually opened on the PostgreSQL side.
@111segasonic
@111segasonic 24 күн бұрын
Perhaps you could also try helidon SE instead of quarkus. Helidon was built from the ground up by Oracle labs to use the latest java tech like virtual threads to serve requests
@AntonPutra
@AntonPutra 24 күн бұрын
@@111segasonic thanks i'll try it out
@Comeyd
@Comeyd 21 күн бұрын
I’d love to see Rust thrown into the mix as well!
@avalagum7957
@avalagum7957 29 күн бұрын
Wow, this is really good. The setup (kubernetes cluster, prometheus, grafana ...) deserves another video.
@AntonPutra
@AntonPutra 29 күн бұрын
Thanks! Just in case, the source code with all of these components is in my GitHub: github.com/antonputra/tutorials/tree/main/lessons/201/monitoring.
@rajivkumar-ub6uj
@rajivkumar-ub6uj 26 күн бұрын
Hey, can you make a video on how to setup this in local? May be with k8s supplied with docker desktop if relevant?
@AntonPutra
@AntonPutra 25 күн бұрын
@@rajivkumar-ub6uj i think so, the easiest way is just package everything as docker compose or perhaps just use local minuke cluster. i'll think about it
@rajivkumar-ub6uj
@rajivkumar-ub6uj 25 күн бұрын
@@AntonPutra yes, compose is the best way for larger audience. Would appreciate if you can share the compose config for this, thanks in advance
@AntonPutra
@AntonPutra 25 күн бұрын
@@rajivkumar-ub6uj ok
@PanicAtProduction
@PanicAtProduction 29 күн бұрын
A benchmark must be like this. State of art. Good job!
@AntonPutra
@AntonPutra 29 күн бұрын
@ChengPhansivang
@ChengPhansivang 21 күн бұрын
What is state of art mean ?
@AntonPutra
@AntonPutra 19 күн бұрын
@@ChengPhansivang i guess something that people can relate to :)
@user-fr6gw8xr4b
@user-fr6gw8xr4b 29 күн бұрын
I am go fanboy but I really like applications written in Quarkus. My first language was Java and it is mind-blowing how fast and light Quarkus feels compared to Spring
@AntonPutra
@AntonPutra 29 күн бұрын
some people say it is slower than jvm based, I'll see if I can test it
@lufenmartofilia5804
@lufenmartofilia5804 23 күн бұрын
You would be surprised how far spring came his way. With that being said, for long running app spring boot as none aot compiled would remain faster thanks to the jit compiler. Quarkus is really only good of you need fast startup or low ram consumption
@awesomesuprise9141
@awesomesuprise9141 22 күн бұрын
@@lufenmartofilia5804 good point
@AntonPutra
@AntonPutra 19 күн бұрын
@@lufenmartofilia5804 will test, when you say long running, how long?
@chrisfreel
@chrisfreel 17 күн бұрын
@AntonPutra long running is at least 10,000 tx before you start measuring. In the real world, weeks or months...
@SeySvK
@SeySvK 29 күн бұрын
Love these benchmark videos, nice work
@AntonPutra
@AntonPutra 29 күн бұрын
thank you! :)
@TweakMDS
@TweakMDS 28 күн бұрын
This second test scenario is absolute perfection in testing real world applications. It's easy to get excited about a performance difference of like 400% (for example) in a synthetic benchmark, but by including database, storage and (de)serializing, it gives a much more nuanced picture of how it would actually scale and perform. In this case I would say both applications performed well and comparable. I'd be interested in a bit of a deeper dive in these applications by including opentelemetry and seeing what functions might bottleneck.
@AntonPutra
@AntonPutra 28 күн бұрын
Thanks. Well, in some tests, I used OpenTelemetry clients with this Prometheus client in both Go and Java. I'm wondering what else you would instrument besides these function calls to S3 and the database. I might include it in the following videos. example - github.com/antonputra/tutorials/blob/main/lessons/201/go-app/images.go#L50-L62
@TweakMDS
@TweakMDS 28 күн бұрын
@@AntonPutra Must have missed that detail, very well done and thanks for the reply!
@AntonPutra
@AntonPutra 28 күн бұрын
@@TweakMDS thanks!
@GBXS
@GBXS 21 күн бұрын
But it doesn't do that much. The programs doesn't change any data. It just uploads it.
@AntonPutra
@AntonPutra 19 күн бұрын
@@GBXS I'm thinking about adding an additional test with Kafka consumer/producer and perhaps a simple ETL pipeline. Any suggestions?
@jorgetovar621
@jorgetovar621 29 күн бұрын
This is definitely the best DevOps channel.
@AntonPutra
@AntonPutra 29 күн бұрын
@charliesta.abc123
@charliesta.abc123 29 күн бұрын
Would love to see C# vs Go
@krzysi3k-yt
@krzysi3k-yt 29 күн бұрын
C# vs Go vs Java would be nice
@AntonPutra
@AntonPutra 29 күн бұрын
any specific test scenarios? or the same
@krzysi3k-yt
@krzysi3k-yt 29 күн бұрын
@@AntonPutra your current test scenarios are very good so I wouldn't change anything. Regarding C# I would use LTS version (dotnet 8) which is the fastest one amongst other versions according to Microsoft.
@AntonPutra
@AntonPutra 29 күн бұрын
@@krzysi3k-yt ok, I'll maybe do it next
@1wsm1
@1wsm1 29 күн бұрын
Rust - same tests
@GabrielPozo
@GabrielPozo 29 күн бұрын
Love these benchmark videos, your work is amazing!
@AntonPutra
@AntonPutra 29 күн бұрын
❤️
@DillPL
@DillPL 27 күн бұрын
Interesting comparison, BUT: - the first tests does not test the startup time itself (should be
@AntonPutra
@AntonPutra 25 күн бұрын
I try to improve each time I create benchmarks. Next time, I will definitely use the v2 Go SDK and apply some other recommendations from your side. Thank you for taking the time to leave this feedback.
@DillPL
@DillPL 25 күн бұрын
@@AntonPutra glad I could help and you haven't taken it as a personal attack or something :D I really value your videos and open source code for every video! Looking forward to seeing more of them.
@AntonPutra
@AntonPutra 24 күн бұрын
@@DillPL thank you! i actually implemented your suggested idea in the new video and reduced the size by 6 mb (45 -> 39) :) - kzbin.info/www/bejne/a2e3hpmtms9-nNE will try other tips next as well and finally update that sdk lol
@mayboroda
@mayboroda 16 күн бұрын
First of all, this is the best content on youtube so far. Well done. Thank you!
@AntonPutra
@AntonPutra 13 күн бұрын
thank you! :)
@ninjaasmoke
@ninjaasmoke 22 күн бұрын
Finally! A detailed comparison that just doesn’t test the /hello-world endpoint
@AntonPutra
@AntonPutra 19 күн бұрын
haha, thanks!
@KhoaH11
@KhoaH11 29 күн бұрын
Nice work! The explanation around the benchmark is easy to understand and full of information there. IMHO, you should start to build your own courses on Udemy :)
@AntonPutra
@AntonPutra 29 күн бұрын
thanks! maybe
@or1699
@or1699 28 күн бұрын
Great video! The benchmarks were really helpful. Keep up the great work!
@AntonPutra
@AntonPutra 28 күн бұрын
thank you! will do
@Bourn77
@Bourn77 23 күн бұрын
please do c# vs Java, use minimal api with AOT for c# and GraalVM or whatever AOT thing Java has.
@AntonPutra
@AntonPutra 23 күн бұрын
ok will do soon!
@ManuelMartinez-nl5cy
@ManuelMartinez-nl5cy 28 күн бұрын
Great videos like the rest of what you do. I'm using your video sto improve my knowledge on cloud/kubernetes area.❤❤
@AntonPutra
@AntonPutra 28 күн бұрын
thank you!❤
@xelesarc1680
@xelesarc1680 29 күн бұрын
Please test dotnet lastest 8 vs go thanks
@AntonPutra
@AntonPutra 29 күн бұрын
ok, comming next
@metaltyphoon
@metaltyphoon 28 күн бұрын
@@AntonPutraensure to use Minimal APIs and compile it AOT.
@phyohtetpaing44
@phyohtetpaing44 29 күн бұрын
There was a non-blocking Netty server implemented with Spring Reactive Web, which is more efficient. for databae approach use R2DBC the reactive nonblocking data repository. btw spring also support graalvm and it is not outdated.
@AntonPutra
@AntonPutra 29 күн бұрын
ok thanks, it's not outdated just it's been around for a long time
@yohanebergerkouokamkuisu4238
@yohanebergerkouokamkuisu4238 21 күн бұрын
Quarkus uses non-blocking netty
@pi3ni0
@pi3ni0 29 күн бұрын
Nice job, I would like to see Test 2, but with higher RPS
@AntonPutra
@AntonPutra 29 күн бұрын
Okay, I might just include additional screenshots under lesson '201' in my GitHub repo
@pi3ni0
@pi3ni0 29 күн бұрын
@@AntonPutra It would be great, thank you Anton!
@Nick-yd3rc
@Nick-yd3rc 29 күн бұрын
Interestingly, in your Test scenario 2, your Quarkus app is spiking in DB latency while having constant times in between, as if the Postgres client would be idling to gather the queries (or waiting on a lock?) and send them in bursts.
@nisem0no
@nisem0no 29 күн бұрын
If this is indeed the case it does make the results a bit harder to pull conclusions from.
@AntonPutra
@AntonPutra 29 күн бұрын
yeah, I noticed it
@nabeelmemon6852
@nabeelmemon6852 8 күн бұрын
Interesting. These tests could be extended to compare Hotspot VM, Generational ZGC and a few other switches. Can you make a video of your entire testing setup (focusing on docker, kubernetes, prometheus and grafana) from scratch? I think it's totally worth it.
@renbangbprd7236
@renbangbprd7236 6 күн бұрын
Please do Java Spring Boot (Native) vs Spring Boot (JDK) VS Quarkus (Native) vs Quarkus (JDK)
@AntonPutra
@AntonPutra 5 күн бұрын
ntoed!
@harshwardhanparmar8258
@harshwardhanparmar8258 16 күн бұрын
Amazing video, great job !!
@AntonPutra
@AntonPutra 16 күн бұрын
thank you!
@humanardaki7911
@humanardaki7911 15 күн бұрын
"There are no solutions. There are only trade-offs" Thomas Sowell servers are cheaper than developer time
@AntonPutra
@AntonPutra 14 күн бұрын
true
@henryong7788
@henryong7788 29 күн бұрын
Seems like Java 21 was used but Virtual threads wasn't used for the Quarkus application. Wasn't that the whole point to using newer Java version with the performance improvements and non-blocking reactivity APIs?
@AntonPutra
@AntonPutra 29 күн бұрын
yeah, i used java 21. I'll make sure to test virtual threads next time, maybe try to compare different java frameworks as well
@henryong7788
@henryong7788 29 күн бұрын
​@@AntonPutrahey, thanks for making this video. Just that needed to point out the code looks to be done in a older/traditional method even though Quarkus has annotations that resolves traditional blocking calls that modern programming languages like Go probably already has underlying. Great detailed video as always! Maybe I'll try this out on my local machine to test out too!
@AntonPutra
@AntonPutra 28 күн бұрын
@@henryong7788 I'll soon be comparing Quarkus with Spring Boot, and I'll make sure to use the latest language features.
@EricSouzarys
@EricSouzarys 28 күн бұрын
Virtual Threads are not better in performance compared to fully reactive code. Quarkus fully reactive or Spring fully reactive will always beat virtual threads, both in performance and resources usage.
@AntonPutra
@AntonPutra 27 күн бұрын
@@EricSouzarys good to know thanks
@bonk1463
@bonk1463 23 күн бұрын
hey good test! can you test with go-chi instead of Fiber? go-chi is more optimized in terms of memory usage so that might explains why Java was using less memory in that first test. Overall, good video! Keep it up
@AntonPutra
@AntonPutra 19 күн бұрын
Thank you! I used Chi for one of my projects, but I think memory usage doesn’t play a major role in the user experience, such as client latency etc..
@user-md2fk3jj1e
@user-md2fk3jj1e 27 күн бұрын
good test after previous tries ;) but I would not accentuate memory consumption at the start of compiled java, as it does not affect anything. Also it looks like cpu doesn't do anything, so no reason to seriously compare 3% with 5%. But latency values are valuable! PS: looking at the low cpu consumption test I got an idea to test cpu intensive application. Try to create something like a redis (hashmap is fast, lets use treemap and its concurrent versions), the app will add, update and get some data, for example count of values that are greater than received in a controller. PPS: interesting to see how regular java 21 works with virtual threads, but I heard that java file io on linux is synchronous and only 22 will be modern, so it could be a reason why you got these values in the current test. Also testing regular java in a container is tricky, it’s better to test different Xmx-Xms values first, I mean starting java under the memory limit of 500mb is not the same as with 2000mb (so using compiled java leaves that headache, but compiled has lower throughput and latency :) )
@AntonPutra
@AntonPutra 27 күн бұрын
Thanks, I appreciate your feedback.
@Jollyrogger805
@Jollyrogger805 17 күн бұрын
I work on both Java and go, your results are similar to my observations. Java consumes memory due to too much of autoconfigurations which involves hell lot of classes + some of jdk had garbage collection issue but if you develop an enterprise ready application in go with distributed tracing, logging, metrics, database writes heavy operation etc, their performance is almost equivalent. I had to manually write all those functionalities in go Lang due to lack of autoconfiguration and libraries
@nojerome497
@nojerome497 9 күн бұрын
Very good point. Java frameworks like Quarkus are doing a lot to make large scale application development easier. All of that stuff it's doing will affect runtime performance.
@kamurashev
@kamurashev 29 күн бұрын
It would be interesting to see what happens if you push requests to the limits and how high that limits are. Additionally for the Java it can be build to native image with spring boot as well. It sometimes not that smooth though but honestly I expect it to perform better with spring boot.
@ooijaz6063
@ooijaz6063 29 күн бұрын
Idk, native image crashes randomly and have lower performance than jited code atm. It's good only (if not crashes) for low traffic applications on serverless.
@kamurashev
@kamurashev 29 күн бұрын
@@ooijaz6063 I haven’t loaded my test app extensively but for me it worked ok and had better performance.
@ooijaz6063
@ooijaz6063 29 күн бұрын
It may change though with strong adoption of virtual threads in next few years and servlet api will be good again.
@AntonPutra
@AntonPutra 29 күн бұрын
I have the same limits for both: github.com/antonputra/tutorials/blob/main/lessons/201/deploy/java-app/deployment.yaml#L27-L33, and I run them on dedicated nodes using the ESXi Hypervisor.
@kamurashev
@kamurashev 29 күн бұрын
@@AntonPutra I do understand, what I wanted to say is what happens if you push client requests higher and higher. The load seemed to be not that high, so the light load conditions were tested but what would happen under high load? It can be really detrimental in real world.
@shamilAliyev92
@shamilAliyev92 29 күн бұрын
Could you do the same test for Kotlin and Java ? Or Kotlin and Go. Please 🙏
@AntonPutra
@AntonPutra 29 күн бұрын
ok let me see
@belkocik
@belkocik 29 күн бұрын
​@@AntonPutra Would love see a Quarkus and Kotlin benchmarks compared to Spring Boot and Kotlin
@AntonPutra
@AntonPutra 29 күн бұрын
@@belkocik 🫡
@zeroows
@zeroows 27 күн бұрын
Add rust and javascript to the mix. Thank you for your channel
@AntonPutra
@AntonPutra 27 күн бұрын
will do, i'm thinking about webassembly vs js, what do you think?
@havefun599
@havefun599 29 күн бұрын
Like always you rock, can you make a video about database architecture for production like MySql Replication Group etc, Thank you
@AntonPutra
@AntonPutra 29 күн бұрын
thank you! let me see
@mantovani96
@mantovani96 23 күн бұрын
Loved the video, subscribed!
@AntonPutra
@AntonPutra 23 күн бұрын
thanks!!
@germandavid2520
@germandavid2520 24 күн бұрын
Would be cool to see in a future video the framework web for Kotlin called Ktor.
@AntonPutra
@AntonPutra 19 күн бұрын
noted!
@marcwinner567
@marcwinner567 23 күн бұрын
Love these benchmarks! 🎉
@AntonPutra
@AntonPutra 19 күн бұрын
thanks! i try to add some extra
@john33john33
@john33john33 29 күн бұрын
a good indeed comparison. only one thing wanna further look into, how do same test behave at high throughput like 500 / 1000+ req/s
@AntonPutra
@AntonPutra 29 күн бұрын
Thanks, I may include screenshots or just improve my tests in the future.
@ZzooD
@ZzooD 7 күн бұрын
It would be interesting to see a test to failure, who and under what load will start throttling
@AntonPutra
@AntonPutra 7 күн бұрын
yes will do with improved java next time
@bibahbibah5108
@bibahbibah5108 29 күн бұрын
i wona see spring boot native image vs Quarkus vs go spring native is framework like Quarkus so it's nice to compare this 2 framework
@AntonPutra
@AntonPutra 29 күн бұрын
ok noted!
@ПавелАвдеев
@ПавелАвдеев 29 күн бұрын
I'd be interesting to compare Hotspot (various GC) vs GraalVM(Quarkus, SpringBoot)
@AntonPutra
@AntonPutra 29 күн бұрын
ok let me see
@terribleprogrammer
@terribleprogrammer 22 күн бұрын
It would be interesting to test long term throughput in this comparison.
@AntonPutra
@AntonPutra 19 күн бұрын
@@terribleprogrammer how long? day, 2, a week?
@terribleprogrammer
@terribleprogrammer 19 күн бұрын
@@AntonPutra one week would be interesting. You can also mix up jvm, graalvm and go Lang in a single video
@AntonPutra
@AntonPutra 19 күн бұрын
@@terribleprogrammer ok, i'll see if it makes any difference and if it does i'll make something
@pauluslestyo7646
@pauluslestyo7646 29 күн бұрын
It's great if you can benchmark framework from bun runtime like Hono and ElysiaJS
@AntonPutra
@AntonPutra 28 күн бұрын
ok noted!
@alvinxyz7419
@alvinxyz7419 28 күн бұрын
this is very neat, i love it
@AntonPutra
@AntonPutra 27 күн бұрын
thank you!
@gabrielmartinez2455
@gabrielmartinez2455 28 күн бұрын
C# vs Go would be amazing to see. Maybe add to test 2 some simple reads from the database, and maybe add test 3 with some simple data structure or general purpose calculations to see how well each language performs. Amazing content. I am currently writing a high performance C# application for the government with .Net 8 and it is incredibly fast. I wonder if .net 8 has been improved so much that might even beat Java at this point.
@AntonPutra
@AntonPutra 28 күн бұрын
Can you elaborate on using simple data structures or general-purpose calculations to evaluate how well each language performs? I don't really want to run fibonacci anymore lol
@gabrielmartinez2455
@gabrielmartinez2455 28 күн бұрын
@@AntonPutra You can try to implement 3 different types of algorithms (In addition to the 2 tests you already did in your previous video). 1- Searching Algorithms (linear search) - ex: Create a List of 1 million objects (person: {Id, Name} - Id: must be unique integer 1 to 1,000,000. Name: generate random string. Populate your list with 1 objects (Person). Test: Generate a random Int value from 1 to 1million and find the Person object (by ID) using the random generated Int, and get the Name, then find the object in the list (by Name) compare and validate both ID match 2- Sorting Algorithms (sort the entire 1 million object (person) by name. 3 - File I/O Operations - generate random Int value from 1 to 1 million, find the Person in the List, write the Person's name to the first line in a file, if file already contains a line replace with the new name. Leverage ChatGPT to create the code for you in both languages. Just some ideas, lol
@AntonPutra
@AntonPutra 27 күн бұрын
@@gabrielmartinez2455 thanks! i'll try it
@陳秉寬-t7y
@陳秉寬-t7y 12 күн бұрын
The sql latency difference might be due to the use of prepared statement
@AntonPutra
@AntonPutra 12 күн бұрын
maybe, but go postgres driver does it by default and do not recommend explicitly "prepare" statements before execution.
@sarabwt
@sarabwt 17 күн бұрын
It would be interesting if you compare go vs java non native, as non native should have better performance than native. You compile java to native only if you are building a CLI or a lambda, when you need fast startup.
@AntonPutra
@AntonPutra 16 күн бұрын
ok noted!
@lprimak
@lprimak 29 күн бұрын
As was mentioned before, GoRoutine performance vs. non-virtual threads in Java is not a fair comparison. I bet if you enable virtual threads, Java would handily beat Go performance at almost any task. Also, I would love to see JVM (not native image) performance vs. Go as well. Perhaps Java would use slightly more memory, but I bet performance would be orders of magnitude better with Java at high scale than Go could ever achieve.
@AntonPutra
@AntonPutra 29 күн бұрын
i would love to create a benchmark where java would beat go, can you please describe one or two use cases and preferably libraries that i should use
@lprimak
@lprimak 29 күн бұрын
@@AntonPutra Same exact use case as you have now. 1- Enable virtual threads. 2- Use JLink / JVM mode instead of compiling to native image. And thank you for your video!
@AntonPutra
@AntonPutra 29 күн бұрын
@@lprimak ok thanks, i'll give it a shot
@Nick-yd3rc
@Nick-yd3rc 29 күн бұрын
Quarkus REST reactive is running on Vert.x, which runs on Netty, Anton’s DB impl is on Mutiny based PgPool. It’s all reactive on an event loop. No virtual threads needed. By TechEmpower you can’t have a better production ready stack. I don’t think the difference would be “orders of magnitude”, Go is simply very efficient.
@Nick-yd3rc
@Nick-yd3rc 29 күн бұрын
@@AntonPutra warmed up, JITted HotSpot with the Shenandoah collector, with -Xmx2g or more, on 2+ cores tends to perform quite a bit better on such IO tasks. You can preallocate all heap at start. If RAM permits, you can try ZGC. You can try to use FastJSON 2 instead of Jackson for more efficient serialization.
@madmasontv7254
@madmasontv7254 22 күн бұрын
Thanks for you video! I really like it. Could you do the same tests for Spring vs Quarkus?
@AntonPutra
@AntonPutra 19 күн бұрын
thanks, will do, but first rust vs go
@awesomesuprise9141
@awesomesuprise9141 22 күн бұрын
Wonderful content Anton!
@AntonPutra
@AntonPutra 19 күн бұрын
thank you!
@korbendallasmultipass1524
@korbendallasmultipass1524 27 күн бұрын
Would be good to see a native build test with GraalVM in comparison. Furthermore can Quarkus use Mutiny as Reactive Framework - maybe this would bring the two closer together as well.
@AntonPutra
@AntonPutra 27 күн бұрын
ok noted!
@kawin-vir
@kawin-vir 28 күн бұрын
Would be nice to see Go (Fiber) vs Bun (Elysia)
@AntonPutra
@AntonPutra 28 күн бұрын
ok noted!
@Ayush-lj6pq
@Ayush-lj6pq 27 күн бұрын
Please make a tutorial on Golang.
@AntonPutra
@AntonPutra 27 күн бұрын
i have couple... How to Monitor/Instrument Golang with Prometheus (Counter - Gauge - Histogram - Summary) - kzbin.info/www/bejne/jYalm5-Ar65ll5I OpenTelemetry Golang Tutorial (Tracing in Grafana & Kubernetes & Tempo) - kzbin.info/www/bejne/kHqxaHtmZdqfh9k
@miguelalzate4850
@miguelalzate4850 23 күн бұрын
I would like a test that includes all programming languages up to now and allows for ranking them.
@AntonPutra
@AntonPutra 19 күн бұрын
there are a lot of variables especially in the cloud, noise neighbors etc so it would be hard to compare all of them...
@hectors.1644
@hectors.1644 26 күн бұрын
Very Nice! great analysis
@AntonPutra
@AntonPutra 25 күн бұрын
thank you!!
@laurentperez8632
@laurentperez8632 29 күн бұрын
This video is good but really is not a fair comparison if you used GraalVM CE. You're comparing apples to oranges. GraalVM EE has PGO which allows the native build to benefit from, well, profiling, so it'd map and optimize the call tree among other things. Obv. EE is not free. This is the whole point, Oracle would not freely distribute optimizations to the CE edition.
@AntonPutra
@AntonPutra 29 күн бұрын
thanks, noted
@rajivkumar-ub6uj
@rajivkumar-ub6uj 28 күн бұрын
+1 and use jdk 22 with virtual threads enabled
@AntonPutra
@AntonPutra 28 күн бұрын
@@rajivkumar-ub6uj thanks, I'll use virtual threads next time, but for some reason, jdk 22 isn't available for ubuntu yet
@dukim632
@dukim632 26 күн бұрын
this is a great video! tnx!
@AntonPutra
@AntonPutra 25 күн бұрын
my pleasure!!
@rolandbayor4444
@rolandbayor4444 24 күн бұрын
I run some tests a while ago just benchmarking algorithms with different languages. To my surprise Java always run them faster than GO
@AntonPutra
@AntonPutra 24 күн бұрын
Well, when you deploy to Kubernetes, you have cgroups and other constraints that could affect performance. But as soon as I find a use case where Java performs better, I'll make an updated video-maybe something like a Kafka consumer/producer data pipeline. I'll see.
@VideoRambler
@VideoRambler 22 күн бұрын
Thank you, very interesting. Would be nice to test .net 8 vs java vs GoLang, .net 8 was also optimized for performance and memory usage comparing to .net 7
@AntonPutra
@AntonPutra 19 күн бұрын
noted, .net 8 vs java coming son..
@dessavio
@dessavio 9 күн бұрын
I'd like to see how these both perform in multithreading and concurrency scenarios.
@AntonPutra
@AntonPutra 9 күн бұрын
can you suggest any use cases?
@dessavio
@dessavio 9 күн бұрын
@@AntonPutra Perhaps an ETL pipeline or batch processing. Ingest a large dataset, split it into chunks then process each in separate threads. Store the results into a database.
@KushLemon
@KushLemon 21 күн бұрын
Enjoyable video. Subscribed.
@AntonPutra
@AntonPutra 19 күн бұрын
thank you! more to come
@namila007
@namila007 23 күн бұрын
great video!!
@AntonPutra
@AntonPutra 23 күн бұрын
thank you!
@stephennfernandes
@stephennfernandes 29 күн бұрын
you need to do this with golang vs rust or maybe web frameworks like (golang) fiber/mux vs (python) flastAPI vs (rust) actix/axum doing concurrent CRUD operations .. i could help in writing the code for all frameworks
@AchwaqKhalid
@AchwaqKhalid 29 күн бұрын
You got my vote 👍🏻
@AntonPutra
@AntonPutra 29 күн бұрын
ok thanks, let me think about it
@bjo004
@bjo004 26 күн бұрын
Quarkus vs Rust 😊
@AntonPutra
@AntonPutra 25 күн бұрын
🫡
@vladimirkashitsyn1871
@vladimirkashitsyn1871 10 күн бұрын
Please, compare native image of Vert.X (with java 21) and Go)
@AntonPutra
@AntonPutra 10 күн бұрын
thanks for the suggestion, noted!
@reinhard_silaen
@reinhard_silaen 29 күн бұрын
Now do Go vs Rust
@AntonPutra
@AntonPutra 29 күн бұрын
i already did it :) video - kzbin.info/www/bejne/h4ivqnx4oKelopI
@vivekchaudhary5728
@vivekchaudhary5728 24 күн бұрын
can you please do a GO vs node.js Lambda testing? with cold start time, memory usage and other metrics
@AntonPutra
@AntonPutra 24 күн бұрын
ok i already have some lambda benchmarks in that playlist but i'll refresh it soon
@taufiqdev
@taufiqdev 28 күн бұрын
please use colour-blind friendly colours :(
@AntonPutra
@AntonPutra 28 күн бұрын
🫡
@AntonPutra
@AntonPutra 28 күн бұрын
any suggestions? examples - coolors.co/palettes/palettes
@KangoV
@KangoV 22 күн бұрын
Try Micronaut with its ahead of time compiled JSON databinding (Micronaut Serialisation).
@AntonPutra
@AntonPutra 19 күн бұрын
ok, will try
@ilyanemtsev2790
@ilyanemtsev2790 3 күн бұрын
Can you test Spring Boot vs Spring Boot WebFlux
@AntonPutra
@AntonPutra 2 күн бұрын
ok noted!
@Mrhennayo
@Mrhennayo 21 күн бұрын
Java wise it's normal I didn't check your code but I assume that you used blocking request which in turn adds more over head and drops The cpu usage is divided between jvm + code + gc Memory java allocates the memory it needs from the get go and keeps increasing until it hits the headspace limits I'm pretty sure that maybe go can be a bit faster but we can ultimately optimize the application to handle more requests and minimize the drops by using reactor But before concluding I'm not saying that java or go or even delphi is better, constraints defines the application and vice-versa
@AntonPutra
@AntonPutra 19 күн бұрын
I want to test the Java Kafka Streams API, maybe with Go, and perhaps build a simple ETL pipeline. What do you think?
@Mrhennayo
@Mrhennayo 19 күн бұрын
@@AntonPutra that's sounds great, I created a dummy project for that if you wanna play with
@AntonPutra
@AntonPutra 17 күн бұрын
@@Mrhennayo thanks
@vasilekx8
@vasilekx8 27 күн бұрын
Please compare envoy with nginx, traffic, caddy
@AntonPutra
@AntonPutra 27 күн бұрын
ok will do caddy soon.. Nginx vs. Envoy performance benchmark - kzbin.info/www/bejne/ZoKcemCuYpKhppY Apache vs. Nginx performance benchmark - kzbin.info/www/bejne/fKmbkpmMj69_mpY Traefik vs. Nginx performance benchmark - kzbin.info/www/bejne/mJjGl3iNlL6bbac
@whiletrue1-wb6xf
@whiletrue1-wb6xf 24 күн бұрын
Great work ! What about C++ vs GO ?
@AntonPutra
@AntonPutra 24 күн бұрын
will do! :) any specific frameworks on c++?
@eugehacks
@eugehacks 6 күн бұрын
@@AntonPutra drogon framework is very very fast and well written
@Nephtys1
@Nephtys1 28 күн бұрын
Can someone explain the extreme drop in memory usage for Java here? Under Hotspot JIT I would assume something similar, but this is running on SubstrateVM instead of JVM. Sadly I have little experience with Native Image and Substrate, so an explanation eludes me. What is happening here with memory usage?
@AntonPutra
@AntonPutra 28 күн бұрын
I'm not an expert in Java, and I hope to get feedback from someone who is, but it looks like it optimizes for the load that is given to the application.
@EricSouzarys
@EricSouzarys 28 күн бұрын
probably because of garbage collections (graalvm stills have a simple GC). The GC learns what objects need to be cycle e and what does not need. Missing JIT actually affects CPU usage. You can easily test this by running a benchmark against native code and JVM. You will see that under high load JVM version uses less CPU
@AntonPutra
@AntonPutra 27 күн бұрын
@@EricSouzarys i'll be testing quarkus vs jvm spring boot soon, any suggestions?
@EricSouzarys
@EricSouzarys 27 күн бұрын
@@AntonPutra I think that you Just need to be careful to not compare orange and apples. I think you can compare these combinations if the tests are going to be applied to an I/O bound app: 1. Quarkus Blocking vs Spring Blocking 2. Quarkus fully reactive vs Spring Fully reactive (with webflux) 3. Quarkus with virtual threads vs Spring with virtual Threads. An extra combination could be Quarkus Fully Reactive vs Spring with Virtual Threads as virtual threads with Spring is more used than with quarkus. A comparison between reactive quarkus against Spring (without virtual threads) would not be fair
@AntonPutra
@AntonPutra 27 күн бұрын
@@EricSouzarys ok noted!
@everyhandletaken
@everyhandletaken 24 күн бұрын
Exactly when to chose Java over Go:
@AntonPutra
@AntonPutra 24 күн бұрын
I’m not sure, but I would say it’s best to keep using the same technologies and languages that other teammates use. It’s easier for us "DevOps" people to maintain the same infrastructure rather than dealing with multiple frameworks, lol.
@esatozturk5439
@esatozturk5439 21 күн бұрын
Perfect work 👍
@AntonPutra
@AntonPutra 19 күн бұрын
thank you!❤️
@picatchumm64
@picatchumm64 29 күн бұрын
Hi, Nice job, thank you. idea for next benchmark test : Kubernetes vs K3s
@premierde
@premierde 29 күн бұрын
They are platform so how would you like to compare?. If I have some nodes & VMs then I will stick to K8s, otherwise K3s.
@AntonPutra
@AntonPutra 29 күн бұрын
ok, I'll see if it makes sense. I'll create some benchmarks or maybe just make comparisons.
@picatchumm64
@picatchumm64 29 күн бұрын
@@AntonPutra I was thinking about CPU and memory benchmarks on the NODE, i.e. what Kubernetes vs K3s eats of the Node performance. Otherwise, I just discovered the ClickHouse and meilisearch databases, it seems really good. (sorry for my English)
@AntonPutra
@AntonPutra 29 күн бұрын
@@picatchumm64 ok, got it, basically infrastructure test, how well both can handle load etc, and which one is more efficient/cost effective
@ragama623
@ragama623 17 күн бұрын
Java vs JavaScript please
@AntonPutra
@AntonPutra 16 күн бұрын
noted!
@user-le1yd4fc6f
@user-le1yd4fc6f 25 күн бұрын
This is amazing work, It would be really helpful if you can run VertX java (without graalvm) VS go Fiber (with graalvm it uses less memory but downgrades performance under load)
@AntonPutra
@AntonPutra 25 күн бұрын
ok let me try
@a.nk.r7209
@a.nk.r7209 28 күн бұрын
How to create this setup of k8s + grafana + promethues . Please create a video of this setup
@AntonPutra
@AntonPutra 28 күн бұрын
well i use esxi hypervisor to host my Kubernetes at home, i have some steps to reproduce it with metalb if you are interested - github.com/antonputra/kubernetes-on-premise Also to deploy monitoring stack (prometheus & grafana & cadvisor & kube-state-metrics etc) i use terraform with yaml tf - github.com/antonputra/tutorials/tree/main/lessons/201/terraform yaml - github.com/antonputra/tutorials/tree/main/lessons/201/monitoring
@a.nk.r7209
@a.nk.r7209 28 күн бұрын
@@AntonPutra thanks! 🫱🏻‍🫲🏼
@peteryo
@peteryo 23 күн бұрын
"Since we are using a framework for java, it makes sense to use one for go, as well" Java NEEDS a framework because doing it on ur own is tedious and error-prone. One of the benefits of go is the nice standard library. You are erasing one of its benefits - also fiber is not a top performer.
@AntonPutra
@AntonPutra 17 күн бұрын
i get your point, i'll try to use std lib next time
@perarneng
@perarneng 25 күн бұрын
The timestamp of the second test is 13:37 😎
@AntonPutra
@AntonPutra 25 күн бұрын
yeap, i have them in the description :)
@ionutale1950
@ionutale1950 29 күн бұрын
nice comprarison, this could work great on a batch. how is it going to compare on an app, that has peaks during a specific time of the day?
@AntonPutra
@AntonPutra 29 күн бұрын
Thanks! There is a very small difference in terms of scalability; both are small with a fast startup time. I think Go is a little more efficient, so potentially you would need fewer compute resources.
@ionutale1950
@ionutale1950 29 күн бұрын
​@@AntonPutra the way java is using memory with GraalVM is very smart, is like observing the needs, then optimise the RAM needs. This could suggest that we could provision the JAVA container with a smaller POD in term of RAM. My concern is: how well does java handle random peaks? if we have 200 req/s, than right after the RAM stabilises suddenly we get 500 req/s, how well does JAVA handle that peak? is java going to panic and ask for wayyyy more memory than it actually needs? if this is the case, than the JAVA app may actually crash for insuficient container memory. Does it make any sense, what i've just said?
@AntonPutra
@AntonPutra 28 күн бұрын
@@ionutale1950 yes, it does. i'll try to configure the client next time to simulate such spikes when I compare spring boot with quarkus
@glebbondarenko67
@glebbondarenko67 23 күн бұрын
Interesting why Java has spikes in database latency graph...
@AntonPutra
@AntonPutra 23 күн бұрын
interesting, i may add more metrics next time
@StefanoV827
@StefanoV827 23 күн бұрын
Test PHP with Swoole and GO
@AntonPutra
@AntonPutra 19 күн бұрын
noted!
@DamaxThomas
@DamaxThomas 21 күн бұрын
Go vs Rust could be a interesting comparison
@DamaxThomas
@DamaxThomas 21 күн бұрын
The video already exists! Watching now 😀
@AntonPutra
@AntonPutra 19 күн бұрын
just finished a new one... results in a couple of days.
@AntonPutra
@AntonPutra 19 күн бұрын
@@DamaxThomas well that one uses fibonacci and compares with gin, new one have different results 🤭
@domson_0478
@domson_0478 27 күн бұрын
After all JS is better ❤
@AntonPutra
@AntonPutra 27 күн бұрын
what about TS? :)
@domson_0478
@domson_0478 26 күн бұрын
@@AntonPutra TS is even better
@AntonPutra
@AntonPutra 25 күн бұрын
@@domson_0478 ok :)
@richarmunicosamaniego8216
@richarmunicosamaniego8216 29 күн бұрын
and what will happend with Quarkus vs SpringBoot
@AntonPutra
@AntonPutra 29 күн бұрын
interesting, i'll test it soon
@metaltyphoon
@metaltyphoon 28 күн бұрын
Should try Java’s stronger brother… C#. Use minimal APIs compiled as AOT.
@AntonPutra
@AntonPutra 27 күн бұрын
thanks, i already created a .net project using minimal APIs, testing now
@carloseduardodossantosoliv2078
@carloseduardodossantosoliv2078 25 күн бұрын
Hey... Java could be speedup passing some args into JAVA_OPTS env variable.
@AntonPutra
@AntonPutra 25 күн бұрын
I try to use defaults as much as possible because most people would use them. What arguments do you mean exactly? I would definitely try it next time.
@martinhotmann7868
@martinhotmann7868 14 күн бұрын
Please always add to the title, that you are using Fiber as a webframework in golang. Java (Quarkus) Go (Fiber) Not: Go (Golang).
@AntonPutra
@AntonPutra 13 күн бұрын
ok thanks! next video will be Go (stdlib vs fiber vs gin) tomorrow or after tomorrow. probably after that will keep using stdlib :)
@adesopekingsley9967
@adesopekingsley9967 23 күн бұрын
I subscribed...❤
@AntonPutra
@AntonPutra 19 күн бұрын
thank you!
@kovlabs
@kovlabs 29 күн бұрын
Please include C# in there as well
@AntonPutra
@AntonPutra 29 күн бұрын
coming next
@VuLinhAssassin
@VuLinhAssassin 18 күн бұрын
Can you do with Java 21 using virtual thread vs go coroutine?
@AntonPutra
@AntonPutra 18 күн бұрын
i'll probably go with 22, i have something in mind
@LawZist
@LawZist 29 күн бұрын
Great Benchmark! can you share the promQL for the metrics? is it some plugin or you wrote it by yourself? thanks
@AntonPutra
@AntonPutra 29 күн бұрын
thanks! it's just open source and i actually have dedicated youtube tutorials how to measure, cpu/memory/vpc etc.. here is a dashboard and promql queries for this specific video - github.com/antonputra/tutorials/blob/main/lessons/201/dashboard.json java metrics - github.com/antonputra/tutorials/blob/main/lessons/201/java-app/src/main/java/com/antonputra/ImageResource.java#L51-L59 golang metrics - github.com/antonputra/tutorials/blob/main/lessons/201/go-app/metrics.go#L13-L27
@LawZist
@LawZist 29 күн бұрын
@@AntonPutra is there any reason to prefer summary over histogram? And can you please share the link for your measure tutorials? Thanks a lot!
@AntonPutra
@AntonPutra 28 күн бұрын
@@LawZist use summary in edge cases when you have a single instance of the app and you can only scale vertically, cause it's not possible to aggregate them over multiple instances, for example to get p90 percentile for 5 replicas of your app. With summary prometheus compute p90 on the client itself. Use histogram in all other cases kzbin.info/www/bejne/jYalm5-Ar65ll5I kzbin.info/www/bejne/jJupd619e96Jors kzbin.info/www/bejne/mn7GkmegfcaZqpo kzbin.info/www/bejne/nJfCiXujbpuDgbM
@LawZist
@LawZist 28 күн бұрын
@@AntonPutra thanks!!
@yashshinde8185
@yashshinde8185 23 күн бұрын
How to get this bench mark dashboard to check the memory, etc. performance.
@AntonPutra
@AntonPutra 23 күн бұрын
I haven't published it yet, I may consider doing so in the future, but the Grafana dashboards themselves are in the repo.
@reinhard_silaen
@reinhard_silaen 29 күн бұрын
Out of topic, i thought you're Indonesian
@AntonPutra
@AntonPutra 29 күн бұрын
😊
@AreYouExperienced0
@AreYouExperienced0 24 күн бұрын
Who wins?
@AntonPutra
@AntonPutra 24 күн бұрын
rust
@AreYouExperienced0
@AreYouExperienced0 24 күн бұрын
@@AntonPutra lol
@AntonPutra
@AntonPutra 24 күн бұрын
@@AreYouExperienced0 go so far but last time i tested gin vs rust so we'll see lol
@oboynitro
@oboynitro 23 күн бұрын
please do c# vs java
@AntonPutra
@AntonPutra 19 күн бұрын
will do!
9 күн бұрын
Nice benchmark, not that much difference after all.
@AntonPutra
@AntonPutra 9 күн бұрын
not much
@arief_
@arief_ 25 күн бұрын
bang anton , orang indonesia kah
@AntonPutra
@AntonPutra 25 күн бұрын
no :)
@srijanraghavula
@srijanraghavula 24 күн бұрын
Why tf is this even a question
@AntonPutra
@AntonPutra 19 күн бұрын
??
@ill4374
@ill4374 22 күн бұрын
Это перезалив? Видел подобное
@AntonPutra
@AntonPutra 19 күн бұрын
ne novoe, s novimi testami
Actix (Rust) vs Fiber (Go): Performance Benchmark in Kubernetes
20:11
Goroutines ARE USELESS
12:57
ThePrimeTime
Рет қаралды 97 М.
小丑妹妹插队被妈妈教训!#小丑#路飞#家庭#搞笑
00:12
家庭搞笑日记
Рет қаралды 35 МЛН
He bought this so I can drive too🥹😭 #tiktok #elsarca
00:22
Elsa Arca
Рет қаралды 53 МЛН
АЗАРТНИК 4 |СЕЗОН 2 Серия
31:45
Inter Production
Рет қаралды 1 МЛН
.NET (C#) vs. Fiber (Go): Performance Benchmark in Kubernetes
14:30
AI can't cross this line and we don't know why.
24:07
Welch Labs
Рет қаралды 297 М.
Spring Boot versus Quarkus
5:31
IBM Technology
Рет қаралды 39 М.
Axum (Rust) vs Stdlib (Go): Performance Benchmark in Kubernetes
17:16
Java 21 Is Good?! | Prime Reacts
27:08
ThePrimeTime
Рет қаралды 237 М.
Why I’m Switching To Go in 2024
8:10
Awesome
Рет қаралды 57 М.
Is TypeScript (NodeJS) Faster than Go?? |  A server comparison
9:54
ThePrimeagen
Рет қаралды 220 М.
Why I Gave Up On Linux
39:33
Theo - t3․gg
Рет қаралды 123 М.
小丑妹妹插队被妈妈教训!#小丑#路飞#家庭#搞笑
00:12
家庭搞笑日记
Рет қаралды 35 МЛН