Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
haxen
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
haxen
6y ago
> ZGC will have a <1ms worst-case latency In our benchmarks we never saw a GC pause of more than 2 ms on either ZGC or Shenandoah, but the end-to-end latency, the one the user cares about, is impacted by much more than a single GC pau
32.
▲
by
haxen
6y ago
For < 10 µs latency there are hoops in any language, as well as the OS, like thread-pinning, marking CPU cores unusable for OS interrupt handling, all kinds of virtual memory issues, etc. And you can't afford a single network hop or
33.
▲
by
haxen
6y ago
> I mean that they don't require any explicit yields. So in this sense, are Kotlin coroutines also non-cooperative? They don't explicitly yield, but do have a mandatory API to use for "blocking" calls.
34.
▲
by
haxen
6y ago
"Virtual threads" are fibers? When you say they aren't cooperative, you mean there's JVM infrastructure that actually pre-empts a fiber?
35.
▲
by
haxen
6y ago
All the modern GCs scan the heap concurrently, the hardest problem is scanning the GC roots in the call stack. ZGC is currently implementing concurrent stack scanning.
36.
▲
by
haxen
6y ago
We use the same technique of cooperative multithreading under any name, but without the low-level support to be able to write plain sequential Java code. However, even though that changes our internal programming model, the behavior with re
37.
▲
by
haxen
6y ago
We did measure on Shenandoah as well, it helped but not enough to be within 10 ms. Since this post is about Hazelcast Jet getting the best latency, we didn't report that.
38.
▲
Sub-10 ms Latency in Java: Concurrent GC with Green Threads
(jet-start.sh)
154 points
by
haxen
6y ago
|
191 comments
39.
▲
by
haxen
6y ago
An ahead-of-time compiler doesn't have the advantage of the call profile of polymorphic call sites. The JIT compiler has much more inlining opportunities, and in some cases this results in better performance. Also, there are cases wher
40.
▲
by
haxen
6y ago
If you ever try to write a bash script that calls a Java program in a tight loop, you'll know the limitations of a fat interpreting runtime with JIT compilation. Another relevant use case is the Stateless Lambda server-side architectur
41.
▲
by
haxen
6y ago
Keep in mind that it's not fundamental. Generational GCs just make a bet that you can save a lot of effort by segregating the objects by age. In almost all Java workloads there's plenty of short-lived objects, and a generational G
42.
▲
by
haxen
6y ago
In the case of Hazelcast Jet and similar products, loads of young garbage are unavoidable because it comes from the data streaming through the pipeline. A generational GC should in principle get a great head start in this kind of workload,
43.
▲
by
haxen
6y ago
The worst things happen when value objects are stuck on the heap for a while and then turn into garbage when the value is updated. Escape Analysis doesn't help there, only a good GC can help.
44.
▲
by
haxen
8y ago
Nothing special to see here, run-of-the-mill Tesla FUD. All the discussed events were forecasted before this year began. The delivery pipelines to anywhere outside the US were being fired up for the first time; naturally the number of units
45.
▲
by
haxen
8y ago
Yes, as I wrote the previous comment that stood out as the "obvious fix". However, there are many other hurdles to this model, like handling all the logistics behind the batteries: charging them up, shipping them around as demand
46.
▲
by
haxen
8y ago
Comparison with smartphones doesn't stand: swapping a phone battery means shelling out cash for a brand new one, done once in several years. Quick-swapping the EV battery means getting another, used one, in a questionable state. Car ow