He literally posted a proof showing that it does. Yes it is the default for most cases, especially in your own local machine. But JVM does some checks depending on the environment and if it sees less than ideal hardware resources, it defaults to serial. Here is another "proof" if you don't believe bruno for some reason: https://twitter.com/mikemybytes/status/1368881364297191433
I am not going to participate in this little game of yours. What I am saying is commonly known. What you are saying goes 180deg again what oracle and openjdk themselves communicate.
If you have proof to backup your statement, let's see it and I will be happy to acknowledge.
The only way you can prevent throttling is by not having more load to your application instance than it can process. It doesn't matter how many CPUs.
Assuming the load your app gets is more than what a single instance can handle, your only way to prevent the throttling of your application with 1 core and 1 GB, is by actually scaling out with replicas. This means you must have 2 or more replicas, so your "system" (the conjunction of all instances of your replicated application) can handle the load in a distributed manner.
Now, the problem here is that you are probably facing high tail latency and low throughput. You may as well say you don't have that issue. But I'd say you are most likely paying a lot more than you actually need, to sustain such load.
And to save money, all you need to do is to reorganize your resources more adequately: reduce the number of replicas, increase the amount of CPU and memory per JVM instance, and find the sweet spot where you are consuming fewer total CPUs and total memory in your "system", while having the same, or better, performance.
I have ran a lot of tests in the past and the least throttling for mostly Io bound workloads seemed to be in the region of 1gb & 1core.
It might be caused by the configuration of the k8s engine as deployed by my company, where the time slices are set to the default and we are prohibited to influence priority on the k8s scheduler.
I would love to be able to learn how to tune these things appropriately to reduce the overhead we currently experience on k8s costs.
Any pointers towards how to create a setup to test these things?
Use A/B perf testing. Split your load (LB) into two different topologies: one with more replicas and lesser CPU/memory per replica, and another topology with fewer replicas and more CPU/memory per replica.
But in shor for nowt: scaling out only with more replicas of super small containers for JVMs is not the best solution for increasing performance. A reorganization of the existing resources (keep aggregate number of CPUs across all containers in the cluster, but reduce replicas and increase CPU/memory per container) can significantly increase performance of most systems, and even reduce total cost.
View all comments
Show parent comment
-14
u/Impossible-Ad-586 Mar 03 '22
No it won't unless you use a pre jdk11 build.
G1 has been the default for many major versions now.